Commit 995f80c
authored
feat: add cwd and args info to snapshot headers (#175)
## Why
Snapshot files currently only show `source`, `expression`, and `input_file` in the YAML header. To understand what a snapshot is testing, you have to cross-reference `snapshots.toml`. Adding `cwd` and `args` to the header makes each snapshot self-describing, making human review easier.
## Summary
- Add `info` field to plan snapshot headers with `args` (array) and optional `cwd`
- Add `info` field to E2E snapshot headers with `cwd` when non-default
- Makes snapshots self-describing without cross-referencing `snapshots.toml`
## Test plan
- [x] `cargo test -p vite_task_plan --test plan_snapshots` passes
- [x] `cargo test -p vite_task_bin --test e2e_snapshots` passes
- [x] Verified headers in generated `.snap` files contain correct info
🤖 Generated with [Claude Code](https://claude.com/claude-code)1 parent 2c07f2a commit 995f80c
File tree
54 files changed
+164
-15
lines changed- crates
- vite_task_bin/tests/e2e_snapshots
- fixtures
- exec-api/snapshots
- summary-output/snapshots
- task-list/snapshots
- task-select-truncate/snapshots
- task-select/snapshots
- topological-execution-order/snapshots
- vite_task_plan/tests/plan_snapshots
- fixtures
- additional-envs/snapshots
- cache-keys/snapshots
- cache-scripts-error-non-root/snapshots
- cache-subcommand/snapshots
- cd-in-scripts/snapshots
- conflict-test/snapshots
- cycle-dependency/snapshots
- dependency-both-topo-and-explicit/snapshots
- empty-package-test/snapshots
- explicit-deps-workspace/snapshots
- fingerprint-ignore-test/snapshots
- nested-tasks/snapshots
- pnpm-workspace-packages-optional/snapshots
- recursive-topological-workspace/snapshots
- shell-fallback/snapshots
- synthetic-cache-disabled/snapshots
- synthetic-in-subpackage/snapshots
- vpr-shorthand/snapshots
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
54 files changed
+164
-15
lines changedLines changed: 0 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
5 | 4 | | |
6 | 5 | | |
7 | 6 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
Lines changed: 2 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
| 4 | + | |
| 5 | + | |
4 | 6 | | |
5 | 7 | | |
6 | 8 | | |
| |||
0 commit comments