@vzn/vx 0.0.74 → 0.0.76

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.74",
3
+ "version": "0.0.76",
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.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"
20
+ "@vzn/vx-linux-x64": "0.0.76",
21
+ "@vzn/vx-linux-arm64": "0.0.76",
22
+ "@vzn/vx-darwin-x64": "0.0.76",
23
+ "@vzn/vx-darwin-arm64": "0.0.76"
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/run.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { appendFile, mkdir } from 'node:fs/promises'
1
+ import { appendFileSync, mkdirSync } from 'node:fs'
2
2
  import path from 'node:path'
3
3
  import { documentedFlags, seeHelp } from './help.js'
4
4
  import { defaultAffectedBase, findWorkspaceRoot } from '../workspace/index.js'
@@ -649,8 +649,10 @@ export async function runCmd(args: readonly string[]): Promise<number> {
649
649
  // behaviour change rather than a drop-in.
650
650
  // Its directory made first, as `--summarize`, `--profile` and
651
651
  // `--graph` make theirs: `nr/r.md` failed alone of the four (item 993).
652
- await mkdir(path.dirname(target), { recursive: true })
653
- await appendFile(target, md)
652
+ // Sync: on a Ctrl-C the signal path exits once stdout drains, and
653
+ // an awaited write lost the race every time (E-23).
654
+ mkdirSync(path.dirname(target), { recursive: true })
655
+ appendFileSync(target, md)
654
656
  } catch (err) {
655
657
  // Same contract as --summarize / --profile: the run already
656
658
  // happened, so a write failure is reported, not fatal.
@@ -87,7 +87,21 @@ function startGuard(): void {
87
87
  detached: true,
88
88
  })
89
89
  guard.unref()
90
- guardFd = guard.stdio[3] as number
90
+ const fd = guard.stdio[3] as number
91
+ guardFd = fd
92
+ // A guard that has died (killed, the OOM killer) is handed to no later
93
+ // spawn: its pipe is broken, and a shell whose printf buffers (bash as
94
+ // macOS's sh) flushed the failed `+<pgid>` line into the task's own
95
+ // stdout, cached replay included (B-10).
96
+ void guard.exited.then(() => {
97
+ if (guardFd !== fd) return
98
+ guardFd = null
99
+ try {
100
+ closeSync(fd)
101
+ } catch {
102
+ // already closed
103
+ }
104
+ })
91
105
  } catch {
92
106
  // The limit as it was: nothing takes the groups down.
93
107
  }