@vzn/vx 0.0.562 → 0.0.564

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.562",
3
+ "version": "0.0.564",
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.562",
25
- "@vzn/vx-linux-arm64": "0.0.562",
26
- "@vzn/vx-darwin-x64": "0.0.562",
27
- "@vzn/vx-darwin-arm64": "0.0.562"
24
+ "@vzn/vx-linux-x64": "0.0.564",
25
+ "@vzn/vx-linux-arm64": "0.0.564",
26
+ "@vzn/vx-darwin-x64": "0.0.564",
27
+ "@vzn/vx-darwin-arm64": "0.0.564"
28
28
  },
29
29
  "dependencies": {
30
30
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
package/src/cli/run.ts CHANGED
@@ -500,19 +500,24 @@ export async function resolveRunOptions(
500
500
  let selectedByDiff = false
501
501
  let affected: RunOptions['affected']
502
502
  let outright: string[] | undefined
503
+ // Resolved even when every task is anchored and the scope goes unused:
504
+ // a filter or ref the user typed is judged, as it is beside a bare task.
505
+ const resolved =
506
+ filterStrings.length > 0
507
+ ? await resolveFilters(
508
+ cwd,
509
+ filterStrings,
510
+ {
511
+ ...(parsed.cacheDir !== undefined ? { cacheDir: parsed.cacheDir } : {}),
512
+ ...(parsed.frozen ? { frozen: true } : {}),
513
+ },
514
+ affectedFilter,
515
+ )
516
+ : undefined
517
+ if (resolved !== undefined && 'error' in resolved) return { error: resolved.error }
503
518
  if (bareTasks.length === 0) {
504
519
  projects = undefined
505
- } else if (filterStrings.length > 0) {
506
- const resolved = await resolveFilters(
507
- cwd,
508
- filterStrings,
509
- {
510
- ...(parsed.cacheDir !== undefined ? { cacheDir: parsed.cacheDir } : {}),
511
- ...(parsed.frozen ? { frozen: true } : {}),
512
- },
513
- affectedFilter,
514
- )
515
- if ('error' in resolved) return { error: resolved.error }
520
+ } else if (resolved !== undefined) {
516
521
  if ('empty' in resolved) {
517
522
  // "Nothing changed" is a clean exit for the BARE tasks the filter
518
523
  // scopes — but it must never cancel an explicitly anchored
@@ -49,8 +49,9 @@ function wholeProjects(
49
49
  /**
50
50
  * The task ids of `ids` whose closure the change reaches, in their order.
51
51
  * A group seeds nothing (it runs nothing) unless it is keyed, as the default
52
- * `build` is; an uncached task seeds whenever its project changed; a cached
53
- * one when a changed path is one of its declared inputs. A `^name` edge the
52
+ * `build` is; an uncached task seeds when a changed path lies in its project
53
+ * (or the whole project is reached); a cached one when a changed path is one
54
+ * of its declared inputs. A `^name` edge the
54
55
  * graph passes through a package it loaded no config for reaches it as the
55
56
  * default `build` would: any change there reaches the task.
56
57
  */
@@ -90,7 +91,11 @@ export function affectedRoots(
90
91
  if (!changes.projects.has(n.projectName)) return false
91
92
  const cache = n.config.cache
92
93
  // A group runs nothing; only the default `build` (projects.ts) is keyed.
93
- if (cache === undefined) return !isGroupTask(n)
94
+ // An uncached task reads its project: a root file another task of it
95
+ // declares (`workspaceFiles`) is no change there.
96
+ if (cache === undefined) {
97
+ return !isGroupTask(n) && (whole.has(n.projectName) || changes.paths.has(n.projectName))
98
+ }
94
99
  if (whole.has(n.projectName)) return true
95
100
  if ((changes.paths.get(n.projectName) ?? []).some((rel) => declaresInput(cache, rel, null))) {
96
101
  return true