@vzn/vx 0.0.594 → 0.0.596
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/README.md +1 -1
- package/package.json +5 -5
- package/src/bin.ts +26 -11
- package/src/cache/archive.ts +2 -2
- package/src/cache/cache.ts +235 -174
- package/src/cache/chained-cache.ts +25 -7
- package/src/cache/config-evals.ts +19 -4
- package/src/cache/git-inputs.ts +19 -8
- package/src/cache/index.ts +1 -0
- package/src/cache/inputs.ts +122 -49
- package/src/cache/layer.ts +7 -5
- package/src/cache/layered-cache.ts +25 -2
- package/src/cache/policy.ts +5 -0
- package/src/cache/tar-stream.ts +1 -1
- package/src/cache/zstd.ts +10 -4
- package/src/cli/cache.ts +11 -15
- package/src/cli/completions.ts +42 -6
- package/src/cli/foreign-flags.ts +26 -5
- package/src/cli/help.ts +5 -3
- package/src/cli/init.ts +1 -1
- package/src/cli/last.ts +4 -1
- package/src/cli/plan-format.ts +9 -0
- package/src/cli/plugin-templates.ts +2 -2
- package/src/cli/run.ts +60 -42
- package/src/cli/select.ts +30 -3
- package/src/cli/show.ts +42 -3
- package/src/cli/watch-filter.ts +77 -13
- package/src/cli/watch-fs.ts +15 -7
- package/src/cli/watch-judge.ts +16 -9
- package/src/cli/watch.ts +22 -15
- package/src/config.ts +26 -26
- package/src/exec/env.ts +5 -0
- package/src/exec/index.ts +1 -0
- package/src/exec/proc-sample.ts +6 -2
- package/src/exec/runner.ts +98 -40
- package/src/exec/sandbox-paths.ts +12 -6
- package/src/exec/sandbox-runtime.ts +136 -44
- package/src/exec/sandbox-violations.ts +58 -11
- package/src/graph/index.ts +1 -0
- package/src/graph/scheduler.ts +29 -13
- package/src/graph/task-graph.ts +134 -25
- package/src/index.ts +6 -0
- package/src/orchestrator/admission.ts +12 -3
- package/src/orchestrator/events.ts +10 -1
- package/src/orchestrator/execute-task.ts +65 -20
- package/src/orchestrator/failure-mode.ts +8 -2
- package/src/orchestrator/framed-output.ts +3 -3
- package/src/orchestrator/hit-restore.ts +6 -3
- package/src/orchestrator/local-shortcircuit.ts +4 -1
- package/src/orchestrator/lockfile-claim.ts +43 -46
- package/src/orchestrator/logger.ts +11 -6
- package/src/orchestrator/metrics.ts +19 -8
- package/src/orchestrator/miss-save.ts +2 -2
- package/src/orchestrator/options.ts +7 -0
- package/src/orchestrator/plan.ts +28 -4
- package/src/orchestrator/plugin-host.ts +25 -3
- package/src/orchestrator/plugin.ts +39 -17
- package/src/orchestrator/prepare.ts +13 -4
- package/src/orchestrator/run-artifacts.ts +2 -1
- package/src/orchestrator/run.ts +72 -12
- package/src/orchestrator/sandbox-request.ts +65 -9
- package/src/orchestrator/save-lane.ts +5 -5
- package/src/orchestrator/signals.ts +5 -2
- package/src/orchestrator/summary.ts +16 -5
- package/src/orchestrator/telemetry.ts +16 -7
- package/src/util/index.ts +7 -1
- package/src/util/paths.ts +23 -3
- package/src/util/secret-mask.ts +36 -0
- package/src/util/settle.ts +15 -0
- package/src/workspace/affected.ts +30 -8
- package/src/workspace/config-cache.ts +25 -4
- package/src/workspace/config-imports.ts +8 -6
- package/src/workspace/config-schema.ts +74 -9
- package/src/workspace/filter.ts +19 -0
- package/src/workspace/migrate-scripts.ts +5 -3
- package/src/workspace/migration.ts +1 -1
- package/src/workspace/package-graph.ts +15 -3
- package/src/workspace/project-loader.ts +76 -2
- package/src/workspace/repo-id.ts +42 -4
- package/src/workspace/workspace.ts +98 -20
package/README.md
CHANGED
|
@@ -98,7 +98,7 @@ More: [Quickstart](https://vznjs.github.io/vx/quickstart/) ·
|
|
|
98
98
|
Beside `turbo.json` or `nx.json`, `vx init` writes only a
|
|
99
99
|
`vx.workspace.ts` that maps the old config until then: a temporary
|
|
100
100
|
start, not a way to run the repo. The numbers above are native vx
|
|
101
|
-
config.
|
|
101
|
+
config.
|
|
102
102
|
[Migration guide](https://vznjs.github.io/vx/guides/migrate/).
|
|
103
103
|
|
|
104
104
|
## Why it is faster
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vzn/vx",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.596",
|
|
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.
|
|
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.596",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.596",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.596",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.596"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/bin.ts
CHANGED
|
@@ -24,17 +24,10 @@ async function main(): Promise<void> {
|
|
|
24
24
|
// costs). Registered before any verb runs; the façade loads on first use.
|
|
25
25
|
registerCoreAlias(() => import('./index.js') as Promise<Record<string, unknown>>)
|
|
26
26
|
const code = await run(argv)
|
|
27
|
-
//
|
|
28
|
-
//
|
|
29
|
-
// `
|
|
30
|
-
//
|
|
31
|
-
// json` on a 300-project workspace was cut mid-string (2026-09-15).
|
|
32
|
-
// `stdout.end(cb)` fixed that on 1.4.2 — and on 1.3.11 the callback
|
|
33
|
-
// still fires early: 2 MiB written, 214 KB delivered (2026-09-20).
|
|
34
|
-
// Setting the code and letting the loop drain is the one form that
|
|
35
|
-
// does not depend on when a runtime decides a pipe is flushed; it
|
|
36
|
-
// costs a hang if a verb leaves a handle open, which the suite's
|
|
37
|
-
// several hundred spawns of this binary would show at once.
|
|
27
|
+
// Not `process.exit` here: Bun drops what a pipe has not yet taken
|
|
28
|
+
// when it follows a large write (300 KB written, 64 KiB delivered;
|
|
29
|
+
// `vx history --format json` was cut mid-string, 2026-09-15). The code
|
|
30
|
+
// is set, and `exitOnceFlushed` exits after both streams have ended.
|
|
38
31
|
process.exitCode = code
|
|
39
32
|
} catch (err) {
|
|
40
33
|
const { fsRefusalHint, isFsRefusal, isOutOfFds, isUserError, OUT_OF_FDS_HINT } =
|
|
@@ -65,6 +58,28 @@ async function main(): Promise<void> {
|
|
|
65
58
|
process.exitCode = 1
|
|
66
59
|
}
|
|
67
60
|
settled = true
|
|
61
|
+
await exitOnceFlushed()
|
|
62
|
+
}
|
|
63
|
+
|
|
64
|
+
/**
|
|
65
|
+
* Exit once stdout and stderr have ended, with the code the verb set. A
|
|
66
|
+
* config can leave a timer behind (a top-level `setInterval`, an await that
|
|
67
|
+
* hit its evaluation budget), and the loop it holds never drained: vx
|
|
68
|
+
* printed its verdict and hung for good. Only after `main` has settled, so
|
|
69
|
+
* `vx watch`, `vx mcp` and a run's kept-alive tasks end when their verb
|
|
70
|
+
* does. `end(cb)` delivers a large write whole on Bun 1.4.2 (4 MiB under a
|
|
71
|
+
* slow reader; `write('', cb)` delivered 450 KB), the floor `engines.bun`
|
|
72
|
+
* holds. A stream whose end never calls back leaves the loop to drain. A
|
|
73
|
+
* signal's handler exits by itself, with the signal's code.
|
|
74
|
+
*/
|
|
75
|
+
async function exitOnceFlushed(): Promise<void> {
|
|
76
|
+
if ((await import('./util/index.js')).exitClaimedBySignal()) return
|
|
77
|
+
let open = 2
|
|
78
|
+
const ended = (): void => {
|
|
79
|
+
if (--open === 0) process.exit()
|
|
80
|
+
}
|
|
81
|
+
process.stdout.end(ended)
|
|
82
|
+
process.stderr.end(ended)
|
|
68
83
|
}
|
|
69
84
|
|
|
70
85
|
// The loop drained while the verb was still pending: something it awaits
|
package/src/cache/archive.ts
CHANGED
|
@@ -168,7 +168,7 @@ export interface ExecUsage {
|
|
|
168
168
|
}
|
|
169
169
|
|
|
170
170
|
/** One regular file in an artifact, with its restore metadata resolved. */
|
|
171
|
-
|
|
171
|
+
interface ArchiveEntry {
|
|
172
172
|
/** Full archive-relative name, e.g. `outputs/dist/index.js`. */
|
|
173
173
|
name: string
|
|
174
174
|
size: number
|
|
@@ -192,7 +192,7 @@ export class ArchiveSecurityError extends Error {
|
|
|
192
192
|
}
|
|
193
193
|
|
|
194
194
|
/** What `packArtifactStream` packs: stdout plus archive name → absolute source path. */
|
|
195
|
-
|
|
195
|
+
interface PackArgs {
|
|
196
196
|
/** The cache key, recorded in the sidecar (item 943); ingest refuses an artifact without it. */
|
|
197
197
|
key?: string
|
|
198
198
|
stdout: string
|