@vzn/vx 0.0.534 → 0.0.536

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.534",
3
+ "version": "0.0.536",
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.534",
25
- "@vzn/vx-linux-arm64": "0.0.534",
26
- "@vzn/vx-darwin-x64": "0.0.534",
27
- "@vzn/vx-darwin-arm64": "0.0.534"
24
+ "@vzn/vx-linux-x64": "0.0.536",
25
+ "@vzn/vx-linux-arm64": "0.0.536",
26
+ "@vzn/vx-darwin-x64": "0.0.536",
27
+ "@vzn/vx-darwin-arm64": "0.0.536"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/run.ts CHANGED
@@ -498,6 +498,7 @@ export async function resolveRunOptions(
498
498
  let discovered: RunOptions['discovered']
499
499
  let selectedByDiff = false
500
500
  let affected: RunOptions['affected']
501
+ let outright: string[] | undefined
501
502
  if (bareTasks.length === 0) {
502
503
  projects = undefined
503
504
  } else if (filterStrings.length > 0) {
@@ -528,6 +529,7 @@ export async function resolveRunOptions(
528
529
  staged = resolved.staged
529
530
  discovered = resolved.discovered
530
531
  affected = resolved.affected
532
+ outright = resolved.outright
531
533
  }
532
534
  } else if (parsed.all) {
533
535
  projects = undefined
@@ -573,6 +575,7 @@ export async function resolveRunOptions(
573
575
  if (projects !== undefined) opts.projects = projects
574
576
  if (selectedByDiff) opts.selectedByDiff = true
575
577
  if (affected !== undefined) opts.affected = affected
578
+ if (outright !== undefined) opts.selectedOutright = outright
576
579
  if (staged !== undefined) opts.staged = staged
577
580
  if (discovered !== undefined) opts.discovered = discovered
578
581
  if (parsed.retries !== undefined) opts.retries = parsed.retries
package/src/cli/select.ts CHANGED
@@ -182,6 +182,8 @@ export type FilterResolution =
182
182
  discovered: { root: string; projects: ProjectMeta[] }
183
183
  /** The `affected` filter's diff, for the run to seed its tasks from (`RunOptions.affected`). */
184
184
  affected?: AffectedChanges
185
+ /** What the other includes selected (`RunOptions.selectedOutright`). */
186
+ outright?: string[]
185
187
  }
186
188
  | { error: string }
187
189
  | { empty: string }
@@ -367,6 +369,22 @@ export async function resolveFilters(
367
369
  process.stderr.write(
368
370
  `vx: filter "${f}" matched no projects${didYouMean([f], projects, tags)}\n`,
369
371
  )
372
+ // Each include is a union: what `--filter other` selected runs its tasks
373
+ // whether or not the `--affected` diff reaches them, and an exclude
374
+ // still removes it (X-10).
375
+ const others = parsed.filter((f) => f.negate || f.raw !== affected)
376
+ const outright =
377
+ changes !== undefined && others.some((f) => !f.negate)
378
+ ? [
379
+ ...applyFilters({
380
+ filters: others,
381
+ projects,
382
+ graph,
383
+ affectedByFilter,
384
+ ...(tags !== undefined ? { tags } : {}),
385
+ }),
386
+ ].filter((n) => selected.has(n))
387
+ : []
370
388
  let staged: Map<string, ProjectEntry> | undefined
371
389
  if (stagedPromise !== undefined) {
372
390
  try {
@@ -382,6 +400,7 @@ export async function resolveFilters(
382
400
  ...(staged !== undefined ? { staged } : {}),
383
401
  discovered: { root, projects },
384
402
  ...(changes !== undefined ? { affected: changes } : {}),
403
+ ...(outright.length > 0 ? { outright: outright.sort() } : {}),
385
404
  }
386
405
  }
387
406
 
@@ -277,6 +277,12 @@ export function assertExecuteResult(
277
277
  for (const key of ['exitCode', 'durationMs']) {
278
278
  if (typeof r[key] !== 'number') fail(`${key} is ${typeof r[key]} (expected a number)`)
279
279
  }
280
+ // NaN passed as a number, printed `failed (exit NaN)` and failed the run
281
+ // history's NOT NULL write (X-11).
282
+ if (!Number.isInteger(r['exitCode']) || (r['exitCode'] as number) < 0)
283
+ fail(`exitCode is ${String(r['exitCode'])} (expected a non-negative integer)`)
284
+ if (!Number.isFinite(r['durationMs']) || (r['durationMs'] as number) < 0)
285
+ fail(`durationMs is ${String(r['durationMs'])} (expected a non-negative number)`)
280
286
  for (const key of ['stdout', 'stderr']) {
281
287
  if (typeof r[key] !== 'string') fail(`${key} is ${typeof r[key]} (expected a string)`)
282
288
  }
@@ -35,6 +35,12 @@ export interface RunOptions {
35
35
  * 2026-10-04). `projects` is the candidate set it narrows.
36
36
  */
37
37
  affected?: AffectedChanges
38
+ /**
39
+ * The projects an include other than `--affected` selected (`--filter
40
+ * other`): every include is a union, so their requested tasks run
41
+ * whether or not `affected` reaches them (X-10).
42
+ */
43
+ selectedOutright?: readonly string[]
38
44
  /**
39
45
  * Configs a selection pass in this same process already loaded and
40
46
  * staged with the same `cacheDir` and `frozen` (the CLI walks every
@@ -521,9 +521,12 @@ export async function prepareRun(options: RunOptions, log: Logger): Promise<Prep
521
521
  // closure; a `pkg#task` the user named runs as it always does.
522
522
  if (options.affected !== undefined) {
523
523
  const named = new Set(tasks.filter((t) => t.includes('#')))
524
+ const outright = new Set(options.selectedOutright)
524
525
  const ids = requested.map((r) => `${r.project}#${r.task}`)
525
526
  const reached = new Set(affectedRoots(nodes, ids, options.affected, projects, packageGraph))
526
- const kept = requested.filter((_r, i) => named.has(ids[i]!) || reached.has(ids[i]!))
527
+ const kept = requested.filter(
528
+ (r, i) => named.has(ids[i]!) || outright.has(r.project) || reached.has(ids[i]!),
529
+ )
527
530
  if (kept.length === 0) return emptyRun('none-affected')
528
531
  if (kept.length < requested.length) {
529
532
  unproven.length = 0