Skip to content

Commit 3bc16ee

Browse files
committed
Clarify naming
1 parent 62d7a0e commit 3bc16ee

File tree

2 files changed

+9
-8
lines changed

2 files changed

+9
-8
lines changed

src/commands/optimize/deps-includes-by-agent.ts

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -6,19 +6,19 @@ type AgentDepsIncludesFn = (stdout: string, name: string) => boolean
66

77
const { BUN, NPM, PNPM, VLT, YARN_BERRY, YARN_CLASSIC } = constants
88

9-
function matchHumanStdout(stdout: string, name: string) {
9+
function matchLsCmdViewHumanStdout(stdout: string, name: string) {
1010
return stdout.includes(` ${name}@`)
1111
}
1212

13-
function matchQueryStdout(stdout: string, name: string) {
13+
function matchQueryCmdStdout(stdout: string, name: string) {
1414
return stdout.includes(`"${name}"`)
1515
}
1616

1717
export const depsIncludesByAgent = new Map<Agent, AgentDepsIncludesFn>([
18-
[BUN, matchHumanStdout],
19-
[NPM, matchQueryStdout],
20-
[PNPM, matchQueryStdout],
21-
[VLT, matchQueryStdout],
22-
[YARN_BERRY, matchHumanStdout],
23-
[YARN_CLASSIC, matchHumanStdout]
18+
[BUN, matchLsCmdViewHumanStdout],
19+
[NPM, matchQueryCmdStdout],
20+
[PNPM, matchQueryCmdStdout],
21+
[VLT, matchQueryCmdStdout],
22+
[YARN_BERRY, matchLsCmdViewHumanStdout],
23+
[YARN_CLASSIC, matchLsCmdViewHumanStdout]
2424
])

src/commands/optimize/ls-by-agent.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,7 @@ async function lsPnpm(
103103
async function lsVlt(agentExecPath: string, cwd: string): Promise<string> {
104104
let stdout = ''
105105
try {
106+
// See https://docs.vlt.sh/cli/commands/list#options.
106107
stdout = (
107108
await spawn(agentExecPath, ['ls', '--view', 'human', ':not(.dev)'], {
108109
cwd

0 commit comments

Comments
 (0)