@vzn/vx 0.0.252 → 0.0.253
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +5 -5
- package/src/cli/cache.ts +2 -2
- package/src/cli/help.ts +5 -0
- package/src/cli/info.ts +5 -2
- package/src/cli/lock.ts +2 -2
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.253",
|
|
4
4
|
"description": "A fast, correct task runner and build cache for JavaScript monorepos.",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"exports": {
|
|
@@ -17,10 +17,10 @@
|
|
|
17
17
|
"node": ">=18"
|
|
18
18
|
},
|
|
19
19
|
"optionalDependencies": {
|
|
20
|
-
"@vzn/vx-linux-x64": "0.0.
|
|
21
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
22
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
23
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
20
|
+
"@vzn/vx-linux-x64": "0.0.253",
|
|
21
|
+
"@vzn/vx-linux-arm64": "0.0.253",
|
|
22
|
+
"@vzn/vx-darwin-x64": "0.0.253",
|
|
23
|
+
"@vzn/vx-darwin-arm64": "0.0.253"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/cli/cache.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { existsSync } from 'node:fs'
|
|
2
2
|
import { Cache, noteSchemaReset } from '../cache/index.js'
|
|
3
|
-
import { flagHint, seeHelp } from './help.js'
|
|
3
|
+
import { flagHint, refusedWord, seeHelp } from './help.js'
|
|
4
4
|
import { nearest, parseDuration, parseSize } from '../util/index.js'
|
|
5
5
|
import { acquireRunLock } from '../orchestrator/index.js'
|
|
6
6
|
import { findWorkspaceRoot } from '../workspace/index.js'
|
|
@@ -121,7 +121,7 @@ export function parsePruneArgs(args: readonly string[]): PruneArgs {
|
|
|
121
121
|
const cd = parseCacheDirFlag(args, i)
|
|
122
122
|
if (cd === null)
|
|
123
123
|
return {
|
|
124
|
-
error:
|
|
124
|
+
error: `${refusedWord(a ?? '')}: ${a}${flagHint('cache prune', a ?? '')}${seeHelp('cache')}`,
|
|
125
125
|
}
|
|
126
126
|
if ('error' in cd) return { error: cd.error }
|
|
127
127
|
out.cacheDir = cd.cacheDir
|
package/src/cli/help.ts
CHANGED
|
@@ -201,6 +201,11 @@ export function seeHelp(verb: string): string {
|
|
|
201
201
|
return ` (see \`vx ${verb} --help\`)`
|
|
202
202
|
}
|
|
203
203
|
|
|
204
|
+
/** How a verb names a word it refuses: a flag, or a positional it takes no more of. */
|
|
205
|
+
export function refusedWord(arg: string): string {
|
|
206
|
+
return arg.startsWith('-') ? 'unknown flag' : 'unexpected argument'
|
|
207
|
+
}
|
|
208
|
+
|
|
204
209
|
/**
|
|
205
210
|
* `(did you mean --concurrency?)` for a flag within two edits of one `verb`
|
|
206
211
|
* accepts; empty for anything else (a positional included). A third edit
|
package/src/cli/info.ts
CHANGED
|
@@ -5,7 +5,7 @@
|
|
|
5
5
|
// too; this file parses the flags and renders the rows.
|
|
6
6
|
|
|
7
7
|
import { collectInfo, type FlakyTask, type InfoFacts } from '../orchestrator/index.js'
|
|
8
|
-
import { flagHint, seeHelp } from './help.js'
|
|
8
|
+
import { flagHint, refusedWord, seeHelp } from './help.js'
|
|
9
9
|
import { namedCacheDir, parseCacheDirFlag, warnToStderr } from './workspace-config.js'
|
|
10
10
|
import { formatBytes } from './format.js'
|
|
11
11
|
import { MIN_BUN } from '../util/index.js'
|
|
@@ -36,7 +36,10 @@ export function parseInfoArgs(args: readonly string[]): InfoArgs {
|
|
|
36
36
|
i = cd.next
|
|
37
37
|
continue
|
|
38
38
|
}
|
|
39
|
-
return {
|
|
39
|
+
return {
|
|
40
|
+
...out,
|
|
41
|
+
error: `${refusedWord(a ?? '')}: ${a}${flagHint('info', a ?? '')}${seeHelp('info')}`,
|
|
42
|
+
}
|
|
40
43
|
}
|
|
41
44
|
return out
|
|
42
45
|
}
|
package/src/cli/lock.ts
CHANGED
|
@@ -3,7 +3,7 @@
|
|
|
3
3
|
// current environment. Design: docs/design/config-lock-2026-06.md.
|
|
4
4
|
|
|
5
5
|
import type { ProjectConfig } from '../config.js'
|
|
6
|
-
import { flagHint, seeHelp } from './help.js'
|
|
6
|
+
import { flagHint, refusedWord, seeHelp } from './help.js'
|
|
7
7
|
import { relPosix, xxh3hex } from '../util/index.js'
|
|
8
8
|
import {
|
|
9
9
|
findWorkspaceRoot,
|
|
@@ -32,7 +32,7 @@ export function parseLockArgs(args: readonly string[]): LockArgs {
|
|
|
32
32
|
else
|
|
33
33
|
return {
|
|
34
34
|
check: false,
|
|
35
|
-
error:
|
|
35
|
+
error: `${refusedWord(a)}: ${a}${flagHint('lock', a)}${seeHelp('lock')}`,
|
|
36
36
|
}
|
|
37
37
|
}
|
|
38
38
|
return out
|