@vzn/vx 0.0.327 → 0.0.329
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/foreign-flags.ts +12 -2
- package/src/workspace/filter.ts +9 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.329",
|
|
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.
|
|
25
|
-
"@vzn/vx-linux-arm64": "0.0.
|
|
26
|
-
"@vzn/vx-darwin-x64": "0.0.
|
|
27
|
-
"@vzn/vx-darwin-arm64": "0.0.
|
|
24
|
+
"@vzn/vx-linux-x64": "0.0.329",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.329",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.329",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.329"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/cli/foreign-flags.ts
CHANGED
|
@@ -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
|
-
|
|
525
|
+
let a = before[i]!
|
|
526
526
|
const eq = a.indexOf('=')
|
|
527
|
-
|
|
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('-')
|
package/src/workspace/filter.ts
CHANGED
|
@@ -239,7 +239,15 @@ function matchSelector(filter: ParsedFilter, projects: ProjectMeta[]): string[]
|
|
|
239
239
|
for (const p of projects) {
|
|
240
240
|
if (re.test(p.name)) out.push(p.name)
|
|
241
241
|
}
|
|
242
|
-
return out
|
|
242
|
+
if (out.length > 0 || filter.matcher.includes('/')) return out
|
|
243
|
+
// pnpm's rule: the scope may be left out (`--filter core` is
|
|
244
|
+
// `@babel/core`), an exact name only when one package carries it. Nx
|
|
245
|
+
// names `@nx-example/cart` `cart`, and `-p cart` matched nothing.
|
|
246
|
+
for (const p of projects) {
|
|
247
|
+
const slash = p.name.indexOf('/')
|
|
248
|
+
if (p.name.startsWith('@') && re.test(p.name.slice(slash + 1))) out.push(p.name)
|
|
249
|
+
}
|
|
250
|
+
return filter.matcher.includes('*') || out.length === 1 ? out : []
|
|
243
251
|
}
|
|
244
252
|
|
|
245
253
|
/**
|