@vzn/vx 0.0.388 → 0.0.390
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.
|
|
3
|
+
"version": "0.0.390",
|
|
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.390",
|
|
25
|
+
"@vzn/vx-linux-arm64": "0.0.390",
|
|
26
|
+
"@vzn/vx-darwin-x64": "0.0.390",
|
|
27
|
+
"@vzn/vx-darwin-arm64": "0.0.390"
|
|
28
28
|
},
|
|
29
29
|
"dependencies": {
|
|
30
30
|
"@anthropic-ai/sandbox-runtime": "^0.0.76"
|
package/src/orchestrator/run.ts
CHANGED
|
@@ -1270,12 +1270,26 @@ async function runOnBus(
|
|
|
1270
1270
|
// for it, and an exit 1 with no word about why is a mystery in a log.
|
|
1271
1271
|
if (keepAlive.children.length > 0 && hold) {
|
|
1272
1272
|
const held = keepAlive.children
|
|
1273
|
+
// A held server that dies on its own is said, as the foreground's
|
|
1274
|
+
// keep-alive says it: `vx watch` sat on "watching" over a dead dev
|
|
1275
|
+
// server. The holder's own stop() is not such a death.
|
|
1276
|
+
let stopping = false
|
|
1277
|
+
keepAlive.nodes.forEach((n, i) => {
|
|
1278
|
+
// One that died during the graph was said then.
|
|
1279
|
+
if (hasEnded(held[i]!)) return
|
|
1280
|
+
void held[i]!.exited.then((code) => {
|
|
1281
|
+
if (!stopping && code !== 0) log.status(`vx: ${n.id} exited with code ${code}`)
|
|
1282
|
+
})
|
|
1283
|
+
})
|
|
1273
1284
|
return {
|
|
1274
1285
|
ok,
|
|
1275
1286
|
outcomes: list,
|
|
1276
1287
|
persistent: {
|
|
1277
1288
|
ids: keepAlive.nodes.map((n) => n.id),
|
|
1278
|
-
stop: (signal) =>
|
|
1289
|
+
stop: (signal) => {
|
|
1290
|
+
stopping = true
|
|
1291
|
+
return terminateChildren(() => held, signal)
|
|
1292
|
+
},
|
|
1279
1293
|
},
|
|
1280
1294
|
}
|
|
1281
1295
|
}
|
|
@@ -58,6 +58,9 @@ export const WATCHED_BUILTIN_NAMES = [
|
|
|
58
58
|
'Map.prototype',
|
|
59
59
|
'Set.prototype',
|
|
60
60
|
'Promise.prototype',
|
|
61
|
+
// A global one config set reached every config loaded after it in the
|
|
62
|
+
// process: `--all` read it, `--filter` of the reader alone did not (D-122).
|
|
63
|
+
'globalThis',
|
|
61
64
|
] as const
|
|
62
65
|
|
|
63
66
|
const WORKER_SRC = `
|
|
@@ -111,7 +114,7 @@ self.onmessage = async (e) => {
|
|
|
111
114
|
const envBefore = watched ? { ...live } : null
|
|
112
115
|
const cwdBefore = watched ? globalThis.process.cwd() : null
|
|
113
116
|
const same = (a, b) =>
|
|
114
|
-
a !== undefined && b !== undefined && a.value
|
|
117
|
+
a !== undefined && b !== undefined && Object.is(a.value, b.value) && a.get === b.get && a.set === b.set &&
|
|
115
118
|
a.writable === b.writable && a.enumerable === b.enumerable && a.configurable === b.configurable
|
|
116
119
|
const changed = () => {
|
|
117
120
|
if (watched === null) return undefined
|
|
@@ -666,6 +666,9 @@ function builtinsChanged(changed: readonly string[], configPath?: string): UserE
|
|
|
666
666
|
: '') +
|
|
667
667
|
(changed.some((c) => c.startsWith('process.cwd'))
|
|
668
668
|
? '; a task runs in its project directory, and `cd <dir> && …` in `exec.command` moves it'
|
|
669
|
+
: '') +
|
|
670
|
+
(changed.some((c) => c.startsWith('globalThis.'))
|
|
671
|
+
? '; a constant configs share goes in a module each one imports'
|
|
669
672
|
: '')
|
|
670
673
|
return new UserError(
|
|
671
674
|
`${who} changed ${changed.join(', ')} while it was evaluated — a config must not change the built-ins vx runs on: other configs are read through them and cache keys are made with them${env}`,
|
|
@@ -738,7 +741,8 @@ function restoreCwd(before: string): string[] {
|
|
|
738
741
|
|
|
739
742
|
function sameDescriptor(a: PropertyDescriptor, b: PropertyDescriptor): boolean {
|
|
740
743
|
return (
|
|
741
|
-
|
|
744
|
+
// `globalThis.NaN` is watched (D-122), and NaN !== NaN.
|
|
745
|
+
Object.is(a.value, b.value) &&
|
|
742
746
|
a.get === b.get &&
|
|
743
747
|
a.set === b.set &&
|
|
744
748
|
a.writable === b.writable &&
|