@vzn/vx 0.0.147 → 0.0.149

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.147",
3
+ "version": "0.0.149",
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.147",
21
- "@vzn/vx-linux-arm64": "0.0.147",
22
- "@vzn/vx-darwin-x64": "0.0.147",
23
- "@vzn/vx-darwin-arm64": "0.0.147"
20
+ "@vzn/vx-linux-x64": "0.0.149",
21
+ "@vzn/vx-linux-arm64": "0.0.149",
22
+ "@vzn/vx-darwin-x64": "0.0.149",
23
+ "@vzn/vx-darwin-arm64": "0.0.149"
24
24
  },
25
25
  "dependencies": {
26
26
  "@anthropic-ai/sandbox-runtime": "^0.0.76"
@@ -227,10 +227,11 @@ function predictPlan(tasks: PlannedTask[]): PlanPrediction {
227
227
  const byId = new Map(tasks.map((t) => [t.node.id, t]))
228
228
  const dependents = new Map<string, string[]>()
229
229
  const indeg = new Map<string, number>()
230
+ // Every dep is a planned task: the task graph refuses a dep it does not
231
+ // hold, and every task of it runs in plan().
230
232
  for (const t of tasks) {
231
- const deps = t.deps.filter((d) => byId.has(d))
232
- indeg.set(t.node.id, deps.length)
233
- for (const d of deps) {
233
+ indeg.set(t.node.id, t.deps.length)
234
+ for (const d of t.deps) {
234
235
  const list = dependents.get(d)
235
236
  if (list) list.push(t.node.id)
236
237
  else dependents.set(d, [t.node.id])