@vzn/vx 0.0.343 → 0.0.345

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.343",
3
+ "version": "0.0.345",
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.343",
25
- "@vzn/vx-linux-arm64": "0.0.343",
26
- "@vzn/vx-darwin-x64": "0.0.343",
27
- "@vzn/vx-darwin-arm64": "0.0.343"
24
+ "@vzn/vx-linux-x64": "0.0.345",
25
+ "@vzn/vx-linux-arm64": "0.0.345",
26
+ "@vzn/vx-darwin-x64": "0.0.345",
27
+ "@vzn/vx-darwin-arm64": "0.0.345"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/select.ts CHANGED
@@ -60,18 +60,20 @@ export async function workspaceGlobOwners(
60
60
  }
61
61
  return false
62
62
  }
63
- // A frozen run with no lock is refused here, before the tolerant sweep
64
- // below could answer "nothing affected" and exit 0 without ever reaching
65
- // the run's own refusal.
66
- if (load.frozen === true && (await readLockfile(root)) === null) {
67
- throw new UserError(FROZEN_WITHOUT_LOCK)
68
- }
69
63
  try {
70
64
  const staged = await stagedLoad()
71
65
  return [...staged.values()].filter((p) => declaresMatch(p.config)).map((p) => p.name)
72
66
  } catch {
73
67
  // Fall through to the per-file sweep.
74
68
  }
69
+ // A frozen run with no lock is refused here, before the tolerant sweep
70
+ // below could answer "nothing affected" and exit 0 without ever reaching
71
+ // the run's own refusal. Asked only once the staged load failed: a
72
+ // frozen load that succeeded read the lock, and a second read parsed it
73
+ // again (1,000 projects: a 1.1 MB lock, ~10 ms).
74
+ if (load.frozen === true && (await readLockfile(root)) === null) {
75
+ throw new UserError(FROZEN_WITHOUT_LOCK)
76
+ }
75
77
  const owners: string[] = []
76
78
  await Promise.all(
77
79
  projects.map(async (meta) => {
@@ -187,6 +187,15 @@ export async function sandboxRequestFor(
187
187
  */
188
188
  cacheDir?: string,
189
189
  ): Promise<SandboxRequest> {
190
+ // SRT reads a Linux path holding a bracket as a glob and drops it from
191
+ // the writes, so no grant here could be mounted (B-60).
192
+ const home = toRealPath(node.projectDir)
193
+ if (process.platform === 'linux' && /[[\]]/.test(home)) {
194
+ throw new UserError(
195
+ `exec.sandbox: ${home} holds a bracket ([ or ]), and the Linux sandbox mounts no path ` +
196
+ `that does — rename the directory, or run the task without exec.sandbox`,
197
+ )
198
+ }
190
199
  const depDirs = [
191
200
  path.join(node.projectDir, 'node_modules'),
192
201
  path.join(workspaceRoot, 'node_modules'),
@@ -38,7 +38,7 @@ export const WORKSPACE_FINGERPRINT_FILES = [
38
38
  'bunfig.toml',
39
39
  ]
40
40
 
41
- // DELIBERATELY ABSENT: `vx.workspace.{ts,mts,js,mjs}`. Everything it can
41
+ // DELIBERATELY ABSENT: `vx.workspace.{ts,mts,js,mjs,cts,cjs}`. Everything it can
42
42
  // declare — `concurrency`, `cacheDir`, `timeout`, and the
43
43
  // plugin list — is placement, storage or observability, never what a
44
44
  // command produces; core's three seams may change WHERE a task runs, not
@@ -23,6 +23,10 @@ export const WORKSPACE_CONFIG_FILENAMES = [
23
23
  'vx.workspace.mts',
24
24
  'vx.workspace.js',
25
25
  'vx.workspace.mjs',
26
+ // A CommonJS config (`module.exports = …`), as Vite and TS name theirs: it
27
+ // was ignored without a word (D-86).
28
+ 'vx.workspace.cts',
29
+ 'vx.workspace.cjs',
26
30
  ]
27
31
 
28
32
  /** Project configs already loaded in this process, by absolute path. */
@@ -660,7 +664,7 @@ async function refuseStaleWorkspaceImports(configPath: string, since: number): P
660
664
  }
661
665
 
662
666
  /**
663
- * Find and load `vx.workspace.{ts,mts,js,mjs}` from the workspace
667
+ * Find and load `vx.workspace.{ts,mts,js,mjs,cts,cjs}` from the workspace
664
668
  * root. Returns `null` if no such file exists (the common case;
665
669
  * the schema is fully optional). Validates the shape and throws
666
670
  * a `UserError` on malformed input.
@@ -35,7 +35,7 @@ export interface ProjectMeta {
35
35
  /** Absolute path to the project directory. */
36
36
  dir: string
37
37
  packageJson: PackageJson
38
- /** Absolute path to vx.config.{ts,mts,js,mjs} or null. */
38
+ /** Absolute path to vx.config.{ts,mts,js,mjs,cts,cjs} or null. */
39
39
  configPath: string | null
40
40
  }
41
41
 
@@ -51,6 +51,10 @@ export const PROJECT_CONFIG_FILENAMES = [
51
51
  'vx.config.mts',
52
52
  'vx.config.js',
53
53
  'vx.config.mjs',
54
+ // A CommonJS config (`module.exports = …`), as Vite and TS name theirs: it
55
+ // was ignored without a word (D-86).
56
+ 'vx.config.cts',
57
+ 'vx.config.cjs',
54
58
  ]
55
59
 
56
60
  const decoder = new TextDecoder()