@vzn/vx 0.0.73 → 0.0.74
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 +26 -0
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.74",
|
|
4
4
|
"description": "An open, extensible monorepo task runner.",
|
|
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.74",
|
|
21
|
+
"@vzn/vx-linux-arm64": "0.0.74",
|
|
22
|
+
"@vzn/vx-darwin-x64": "0.0.74",
|
|
23
|
+
"@vzn/vx-darwin-arm64": "0.0.74"
|
|
24
24
|
},
|
|
25
25
|
"dependencies": {
|
|
26
26
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/cache/inputs.ts
CHANGED
|
@@ -234,6 +234,7 @@ async function resolveWorkspaceFiles(args: {
|
|
|
234
234
|
}): Promise<string[]> {
|
|
235
235
|
const positive: string[] = []
|
|
236
236
|
const negative: string[] = []
|
|
237
|
+
refuseOneAlternativeBrace(args.workspaceFiles, 'workspaceFiles')
|
|
237
238
|
for (const entry of args.workspaceFiles) {
|
|
238
239
|
if (entry.startsWith('!')) negative.push(entry.slice(1))
|
|
239
240
|
else positive.push(entry)
|
|
@@ -895,6 +896,30 @@ function refuseUndecodable(
|
|
|
895
896
|
)
|
|
896
897
|
}
|
|
897
898
|
|
|
899
|
+
const ONE_ALTERNATIVE_BRACE = /(?<!\\)\{[^{},]*\}/
|
|
900
|
+
|
|
901
|
+
/**
|
|
902
|
+
* `Bun.Glob` reads `{b}` as a brace of one alternative, so `src/{b}.ts`
|
|
903
|
+
* matches `src/b.ts` and never a file named `{b}.ts`: that file stays out
|
|
904
|
+
* of the key and an edit to it is a hit. Neither reading is sure to be
|
|
905
|
+
* the one meant, so the entry is refused with both spellings.
|
|
906
|
+
*/
|
|
907
|
+
function refuseOneAlternativeBrace(
|
|
908
|
+
entries: readonly string[],
|
|
909
|
+
field: 'files' | 'workspaceFiles',
|
|
910
|
+
): void {
|
|
911
|
+
for (const entry of entries) {
|
|
912
|
+
const m = ONE_ALTERNATIVE_BRACE.exec(entry)
|
|
913
|
+
if (m === null) continue
|
|
914
|
+
const inner = m[0].slice(1, -1)
|
|
915
|
+
throw new UserError(
|
|
916
|
+
`cache.inputs.${field}: "${entry}" holds a brace with one alternative, which matches ` +
|
|
917
|
+
`"${inner}" and never a name holding "${m[0]}". Write "${entry.replace(m[0], inner)}", ` +
|
|
918
|
+
`or "${entry.replace(m[0], `\\{${inner}\\}`)}" for the braces themselves.`,
|
|
919
|
+
)
|
|
920
|
+
}
|
|
921
|
+
}
|
|
922
|
+
|
|
898
923
|
async function resolveFiles(args: ResolveFilesArgs): Promise<string[]> {
|
|
899
924
|
const positive: string[] = []
|
|
900
925
|
const negative: string[] = []
|
|
@@ -902,6 +927,7 @@ async function resolveFiles(args: ResolveFilesArgs): Promise<string[]> {
|
|
|
902
927
|
if (args.files === undefined) {
|
|
903
928
|
positive.push(...DEFAULT_FILE_GLOBS)
|
|
904
929
|
} else {
|
|
930
|
+
refuseOneAlternativeBrace(args.files, 'files')
|
|
905
931
|
for (const entry of args.files) {
|
|
906
932
|
if (entry.startsWith('!')) negative.push(entry.slice(1))
|
|
907
933
|
else positive.push(entry)
|