You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Object-form `dependsOn` entries — `{ "task": "build", "from": "dependencies" }`
— run a task in the direct workspace packages listed under a package.json
dependency field (`dependencies`, `devDependencies`, and/or `peerDependencies`).
The earlier implementation expanded these selections at query time, so they
never appeared in the global task graph. This reimplements the feature at
graph-load time: each object entry is resolved against the package dependency
graph and the matching `package#task` selections are added as ordinary task
graph edges (`add_package_dependency_edges`). Only direct dependencies are
followed, and an edge is added only when the dependency package defines the
task.
Because the selections are now plain task graph edges, they appear in the
global graph and flow through the existing dependency machinery for free —
including `--ignore-depends-on`, which drops them at query time like any other
`dependsOn` edge.
The fixture asserts edge construction through the rendered global
`task_graph.md` (every `from` variant, recursive cross-package chains, and the
exclusion of peer-only and missing-task dependencies). The only behavior the
static graph cannot express — `--ignore-depends-on` removing the materialized
edges at query time — is kept as the single per-case plan snapshot.
Co-authored-by: GPT-5 Codex <codex@openai.com>
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01QowxsN8vDKKbQdaSMdxL67
Copy file name to clipboardExpand all lines: CHANGELOG.md
+1Lines changed: 1 addition & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,6 +1,7 @@
1
1
# Changelog
2
2
3
3
-**Added** First-party support for caching `vite build` with zero cache config, giving Vite projects correct cache hits out of the box ([vitejs/vite#22453](https://github.com/vitejs/vite/pull/22453)).
4
+
-**Added** Object-form `dependsOn` entries for direct workspace dependencies ([#479](https://github.com/voidzero-dev/vite-task/pull/479)).
4
5
-**Added**[`@voidzero-dev/vite-task-client`](https://npmx.dev/package/@voidzero-dev/vite-task-client), allowing tools to report cache information to Vite Task at runtime so users do not need to configure it manually ([#441](https://github.com/voidzero-dev/vite-task/pull/441), [#454](https://github.com/voidzero-dev/vite-task/pull/454), [#449](https://github.com/voidzero-dev/vite-task/pull/449), [#450](https://github.com/voidzero-dev/vite-task/pull/450), [#458](https://github.com/voidzero-dev/vite-task/pull/458), [#431](https://github.com/voidzero-dev/vite-task/pull/431), [#459](https://github.com/voidzero-dev/vite-task/pull/459), [#472](https://github.com/voidzero-dev/vite-task/pull/472)).
5
6
-**Changed** Cached tasks now restore automatically tracked output files by default; use `output: []` to disable restoration ([#460](https://github.com/voidzero-dev/vite-task/pull/460), [#461](https://github.com/voidzero-dev/vite-task/pull/461)).
6
7
-**Changed** Environment values in task cache fingerprints are now stored only as SHA-256 digests, and env-related cache miss details report names without values ([#455](https://github.com/voidzero-dev/vite-task/pull/455)).
If `app` directly depends on `ui` and `shared`, and both packages have `build`,
58
+
the task graph contains:
59
+
60
+
```
61
+
app#test ──dependsOn──> ui#build
62
+
app#test ──dependsOn──> shared#build
63
+
```
64
+
65
+
Dependency packages without the requested task are skipped. Recursive expansion
66
+
comes from dependency tasks declaring their own `dependsOn` entries.
67
+
41
68
## What happens when you run a query
42
69
43
70
Every `vp run` command goes through two stages:
@@ -188,7 +215,7 @@ If you run `vp run --filter app build`, the package subgraph contains only `app`
188
215
189
216
This is intentional — `dependsOn` is an explicit declaration that a task can't run without its dependency. Ignoring it would break the build. (Users can skip this with `--ignore-depends-on`.)
190
217
191
-
The expansion only follows explicit edges, not topological ones. Topological ordering comes from the package subgraph — it's already baked into the task execution graph by Stage 2.
218
+
The expansion follows explicit `dependsOn`edges, including edges materialized from object-form entries. It does not follow topological package edges. Topological ordering comes from the package subgraph — it's already baked into the task execution graph by Stage 2.
0 commit comments