@vzn/vx 0.0.443 → 0.0.445

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.
Files changed (2) hide show
  1. package/package.json +5 -5
  2. package/src/cli/index.ts +11 -0
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@vzn/vx",
3
- "version": "0.0.443",
3
+ "version": "0.0.445",
4
4
  "description": "The fastest task runner and build cache for JavaScript monorepos.",
5
5
  "type": "module",
6
6
  "exports": {
@@ -21,10 +21,10 @@
21
21
  "node": ">=18"
22
22
  },
23
23
  "optionalDependencies": {
24
- "@vzn/vx-linux-x64": "0.0.443",
25
- "@vzn/vx-linux-arm64": "0.0.443",
26
- "@vzn/vx-darwin-x64": "0.0.443",
27
- "@vzn/vx-darwin-arm64": "0.0.443"
24
+ "@vzn/vx-linux-x64": "0.0.445",
25
+ "@vzn/vx-linux-arm64": "0.0.445",
26
+ "@vzn/vx-darwin-x64": "0.0.445",
27
+ "@vzn/vx-darwin-arm64": "0.0.445"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/index.ts CHANGED
@@ -167,6 +167,17 @@ export async function run(argv: readonly string[]): Promise<number> {
167
167
  // declaring `mcp` read as a plain unknown command, and `vx mcp`
168
168
  // before the plugin was declared said nothing about the file that
169
169
  // would declare it (2026-09-20).
170
+ // A word that opens with a dash is a flag, and vx itself takes only
171
+ // --help and --version: "unknown command: --bogus" named the wrong
172
+ // thing (M-60).
173
+ if (command.startsWith('-')) {
174
+ // `-v` / `-V` is another tool's version flag, far from both names.
175
+ const flag = /^-v$/i.test(command) ? '--version' : nearest(command, ['--help', '--version'])
176
+ process.stderr.write(
177
+ `vx: unknown flag: ${command}${flag === undefined ? '' : ` (did you mean ${flag}?)`}; a verb's flags follow the verb (see \`vx help\`)\n`,
178
+ )
179
+ return 1
180
+ }
170
181
  const declaredVerbs =
171
182
  resolved !== null && 'declaredVerbs' in resolved ? resolved.declaredVerbs : []
172
183
  const guess = didYouMeanVerb(command, declaredVerbs)