@vzn/vx 0.0.327 → 0.0.328

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.327",
3
+ "version": "0.0.328",
4
4
  "description": "A fast, correct 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.327",
25
- "@vzn/vx-linux-arm64": "0.0.327",
26
- "@vzn/vx-darwin-x64": "0.0.327",
27
- "@vzn/vx-darwin-arm64": "0.0.327"
24
+ "@vzn/vx-linux-x64": "0.0.328",
25
+ "@vzn/vx-linux-arm64": "0.0.328",
26
+ "@vzn/vx-darwin-x64": "0.0.328",
27
+ "@vzn/vx-darwin-arm64": "0.0.328"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -522,10 +522,20 @@ export function translateForeign(args: readonly string[]): string[] | { error: s
522
522
  const sep = args.indexOf('--')
523
523
  const before = sep === -1 ? args : args.slice(0, sep)
524
524
  for (let i = 0; i < before.length; i++) {
525
- const a = before[i]!
525
+ let a = before[i]!
526
526
  const eq = a.indexOf('=')
527
- const name = eq === -1 ? a : a.slice(0, eq)
527
+ let name = eq === -1 ? a : a.slice(0, eq)
528
528
  const inline = eq === -1 ? undefined : a.slice(eq + 1)
529
+ // Nx's parser takes every long flag camelCased too (`--nxBail`,
530
+ // `--skipNxCache`), and its docs print that spelling; vx refused it
531
+ // as an unknown flag.
532
+ const kebab = name.startsWith('--')
533
+ ? name.replace(/[A-Z]/g, (c) => `-${c.toLowerCase()}`)
534
+ : name
535
+ if (kebab !== name && FOREIGN_FLAGS.some((f) => f.runner === 'nx' && f.names.includes(kebab))) {
536
+ name = kebab
537
+ a = inline === undefined ? kebab : `${kebab}=${inline}`
538
+ }
529
539
  const entries = FOREIGN_FLAGS.filter((f) => f.names.includes(name) || f.names.includes(a))
530
540
  const next = before[i + 1]
531
541
  const spaced = inline === undefined && next !== undefined && !next.startsWith('-')