@vzn/vx 0.0.252 → 0.0.254
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/cache/inputs.ts +6 -1
- 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.254",
|
|
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.254",
|
|
21
|
+
"@vzn/vx-linux-arm64": "0.0.254",
|
|
22
|
+
"@vzn/vx-darwin-x64": "0.0.254",
|
|
23
|
+
"@vzn/vx-darwin-arm64": "0.0.254"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/cache/inputs.ts
CHANGED
|
@@ -22,6 +22,7 @@ import { rm, rmdir } from 'node:fs/promises'
|
|
|
22
22
|
import type { CacheInputs } from '../config.js'
|
|
23
23
|
import {
|
|
24
24
|
asTrees,
|
|
25
|
+
executablePath,
|
|
25
26
|
isExecutableMissing,
|
|
26
27
|
isLiteralPattern,
|
|
27
28
|
normalizeGlob,
|
|
@@ -389,7 +390,11 @@ async function runRuntimeCommand(
|
|
|
389
390
|
const prefix = binDirs.join(path.delimiter)
|
|
390
391
|
let proc
|
|
391
392
|
try {
|
|
392
|
-
|
|
393
|
+
// vx's own `sh`, resolved on its PATH before the probe's: Bun.spawn looks
|
|
394
|
+
// a bare name up on the child's PATH, which leads with the project's
|
|
395
|
+
// `node_modules/.bin`, so a dependency's `sh` bin ran every probe (J-69).
|
|
396
|
+
const argv =
|
|
397
|
+
process.platform === 'win32' ? shellArgv(command) : [executablePath('sh'), '-c', command]
|
|
393
398
|
proc = Bun.spawn(argv, {
|
|
394
399
|
cwd,
|
|
395
400
|
env: { ...process.env, PATH: ambient ? `${prefix}${path.delimiter}${ambient}` : prefix },
|
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
|