@vzn/vx 0.0.462 → 0.0.464

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.462",
3
+ "version": "0.0.464",
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.462",
25
- "@vzn/vx-linux-arm64": "0.0.462",
26
- "@vzn/vx-darwin-x64": "0.0.462",
27
- "@vzn/vx-darwin-arm64": "0.0.462"
24
+ "@vzn/vx-linux-x64": "0.0.464",
25
+ "@vzn/vx-linux-arm64": "0.0.464",
26
+ "@vzn/vx-darwin-x64": "0.0.464",
27
+ "@vzn/vx-darwin-arm64": "0.0.464"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/run.ts CHANGED
@@ -667,6 +667,10 @@ export async function runCmd(args: readonly string[]): Promise<number> {
667
667
  // the scheduler, cache, retries and telemetry unchanged above it); there
668
668
  // is no whole-run delegation seam to consult.
669
669
  const summary = await runOrchestrator(opts)
670
+ if (summary.refused !== undefined) {
671
+ process.stderr.write(`vx run: ${summary.refused}\n`)
672
+ return 1
673
+ }
670
674
  const result: RunResult = { ok: summary.ok, outcomes: summary.outcomes.map(projectOutcome) }
671
675
  if (parsed.verbosity > 0) printSummary(result)
672
676
  // Report generation is post-run, gated on the flags — zero cost when
package/src/cli/watch.ts CHANGED
@@ -180,6 +180,7 @@ export async function watchCmd(args: readonly string[]): Promise<number> {
180
180
  try {
181
181
  const initial = await runOrchestrator(opts)
182
182
  held = initial.persistent
183
+ if (initial.refused !== undefined) process.stderr.write(`vx watch: ${initial.refused}\n`)
183
184
  // A run that failed having run nothing refused to start: a requested
184
185
  // name no project declares (run() says which, with a "did you mean").
185
186
  // `vx run` exits 1 on it; `vx watch buidl` watched on, re-running the
@@ -369,7 +370,9 @@ async function runWatchLoop(args: WatchLoopArgs): Promise<number> {
369
370
  held = undefined
370
371
  restartTimings()
371
372
  const start = Date.now()
372
- held = (await runOrchestrator(opts)).persistent
373
+ const cycle = await runOrchestrator(opts)
374
+ held = cycle.persistent
375
+ if (cycle.refused !== undefined) process.stderr.write(`vx watch: ${cycle.refused}\n`)
373
376
  changes.lastCycle = { start, end: Date.now() }
374
377
  if (reread && !stop.aborted) {
375
378
  reread = false
@@ -258,6 +258,12 @@ export interface RunSummary {
258
258
  outcomes: TaskOutcome[]
259
259
  /** The persistent tasks `RunOptions.holdPersistent` handed back; absent when none is running. */
260
260
  persistent?: HeldPersistent
261
+ /**
262
+ * Why the run refused to start, nothing having run (`ok` is false): a
263
+ * requested task no selected project declares, with what is near. The
264
+ * caller prints it; `vx run` writes it to stderr.
265
+ */
266
+ refused?: string
261
267
  }
262
268
 
263
269
  export interface HeldPersistent {
@@ -377,13 +377,13 @@ async function runOnBus(
377
377
  // a CI job that renames a task must go red, not silently stop running
378
378
  // it. When EVERY name is unresolved this is the `no-tasks-declared`
379
379
  // case too; the message is identical, so that branch stays below.
380
+ // A refusal is the caller's to print (on stderr, as `vx run:`): as a
381
+ // status line it went to stdout, into whatever a script piped there.
380
382
  if (prepared.unresolvedTasks.length > 0) {
381
- log.status(
382
- `No projects declare task(s): ${prepared.unresolvedTasks.join(', ')}.${elsewhereHint(prepared.declaredElsewhere)}${didYouMean(prepared.unresolvedTasks, prepared.hintProjects, prepared.declaredElsewhere)}${await initHint(prepared)}`,
383
- )
383
+ const refused = `no projects declare task(s): ${prepared.unresolvedTasks.join(', ')}.${elsewhereHint(prepared.declaredElsewhere)}${didYouMean(prepared.unresolvedTasks, prepared.hintProjects, prepared.declaredElsewhere)}${await initHint(prepared)}`
384
384
  await teardown()
385
385
  prepared.cache.close()
386
- return { ok: false, outcomes: [] }
386
+ return { ok: false, outcomes: [], refused }
387
387
  }
388
388
  if (prepared.empty === 'none-affected') {
389
389
  log.status(`No affected project declares task(s): ${options.tasks.join(', ')}.`)
@@ -396,14 +396,13 @@ async function runOnBus(
396
396
  // a clear message and return NOT-ok so the script exits 1.
397
397
  // `empty-graph` is defensive — unreachable under current
398
398
  // buildTaskGraph semantics but logged just in case.
399
- const msg =
399
+ const refused =
400
400
  prepared.empty === 'no-tasks-declared'
401
- ? `No projects declare task(s): ${options.tasks.join(', ')}.${elsewhereHint(prepared.declaredElsewhere)}${await initHint(prepared)}`
402
- : 'No tasks to run.'
403
- log.status(msg)
401
+ ? `no projects declare task(s): ${options.tasks.join(', ')}.${elsewhereHint(prepared.declaredElsewhere)}${await initHint(prepared)}`
402
+ : 'no tasks to run.'
404
403
  await teardown()
405
404
  prepared.cache.close()
406
- return { ok: false, outcomes: [] }
405
+ return { ok: false, outcomes: [], refused }
407
406
  }
408
407
  // Install user plugins as additional bus subscribers BEFORE the run
409
408
  // starts emitting events. `installPlugins` runs each plugin's optional