@vzn/vx 0.0.251 → 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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx",
3
- "version": "0.0.251",
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.251",
21
- "@vzn/vx-linux-arm64": "0.0.251",
22
- "@vzn/vx-darwin-x64": "0.0.251",
23
- "@vzn/vx-darwin-arm64": "0.0.251"
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: `unknown argument: ${a}${flagHint('cache prune', a ?? '')}${seeHelp('cache')}`,
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
@@ -48,7 +48,7 @@ export function helpText(pluginCommands: readonly string[] = []): string {
48
48
  ' vx upgrade [tag]',
49
49
  ' vx show [PROJECT[#TASK] | TASK] [--format pretty|json]',
50
50
  ' vx info [--format pretty|json] [--cache-dir <path>]',
51
- ' vx why [TASK | PKG#TASK] [--run <runId>] [--format pretty|json] [--cache-dir <path>]',
51
+ ' vx why (TASK | PKG#TASK) [--run <runId>] [--format pretty|json] [--cache-dir <path>]',
52
52
  ' vx last [RUNID] [--list[=N]] [--failed] [--format pretty|json] [--cache-dir <path>]',
53
53
  ' vx completions bash|zsh|fish',
54
54
  ' vx help [VERB]',
@@ -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 { ...out, error: `unknown argument: ${a}${flagHint('info', a ?? '')}${seeHelp('info')}` }
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/init.ts CHANGED
@@ -1,7 +1,8 @@
1
1
  // `vx init [--dry] [--force] [--mjs]` — a workspace from nowhere: one vx.config.ts
2
2
  // per package from its package.json scripts, and the workspace file every
3
- // run needs. Turbo and Nx are not read here; a runner's own config beside
4
- // the scripts is the richer source, and `@vzn/vx-migrate` maps it.
3
+ // run needs. In a Turbo or Nx repo it writes only the workspace file,
4
+ // declaring `turbo()` or `nx()` from `@vzn/vx-migrate`, which read the
5
+ // runner's own config live (`adopt`).
5
6
  // `vx init --plugin <seam>` writes a runnable plugin for one seam and its
6
7
  // test instead (plugin-templates.ts, the examples the gate runs).
7
8
 
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: `unknown argument: ${a}${flagHint('lock', a)}${seeHelp('lock')}`,
35
+ error: `${refusedWord(a)}: ${a}${flagHint('lock', a)}${seeHelp('lock')}`,
36
36
  }
37
37
  }
38
38
  return out