@vzn/vx 0.0.246 → 0.0.248

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.246",
3
+ "version": "0.0.248",
4
4
  "description": "A fast, correct task runner and build cache for JavaScript monorepos.",
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.246",
21
- "@vzn/vx-linux-arm64": "0.0.246",
22
- "@vzn/vx-darwin-x64": "0.0.246",
23
- "@vzn/vx-darwin-arm64": "0.0.246"
20
+ "@vzn/vx-linux-x64": "0.0.248",
21
+ "@vzn/vx-linux-arm64": "0.0.248",
22
+ "@vzn/vx-darwin-x64": "0.0.248",
23
+ "@vzn/vx-darwin-arm64": "0.0.248"
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -153,6 +153,7 @@ export function armWatcher(
153
153
  timeoutMs = WATCH_PROBE_TIMEOUT_MS,
154
154
  ): ArmedWatcher {
155
155
  let markReady: (ok: boolean) => void = () => {}
156
+ let arrived = false
156
157
  const seen = new Promise<boolean>((resolve) => {
157
158
  markReady = resolve
158
159
  })
@@ -163,6 +164,7 @@ export function armWatcher(
163
164
  // can see; the write's own event names the file.
164
165
  if (filename === '' || filename === '.') return
165
166
  if (filename === WATCH_PROBE) {
167
+ arrived = true
166
168
  markReady(true)
167
169
  return
168
170
  }
@@ -191,7 +193,14 @@ export function armWatcher(
191
193
  break // an unwritable dir gets no proof; the watcher is kept
192
194
  }
193
195
  const remaining = deadline - Date.now()
194
- if (remaining <= 0) break
196
+ if (remaining <= 0) {
197
+ // The write itself can outlast the budget (a loaded macOS runner:
198
+ // 261 ms against 100, E-87), and the loop has not yielded yet: let
199
+ // an event already queued in before giving up on it.
200
+ await new Promise((resolve) => setTimeout(resolve, 0))
201
+ ok = arrived
202
+ break
203
+ }
195
204
  const pause = new Promise<boolean>((resolve) => {
196
205
  setTimeout(() => resolve(false), Math.min(step, remaining)).unref()
197
206
  })