Skip to content

Commit 0771039

Browse files
branchseerclaude
andauthored
feat(deps): upgrade vite-task for compact task runner summary (#623)
## Summary - Upgrades vite-task dependency to [voidzero-dev/vite-task#171](voidzero-dev/vite-task#171) which implements compact task runner summaries (GitHub issue #591) - Updates `cli.rs` to use `ParsedCommand` (now exposed by vite-task) with `.into_command()` at dispatch points - Regenerates 25 snap test outputs: full verbose execution summaries (~800 lines) replaced by compact one-liners ### New behavior | Scenario | Output | |---|---| | Single task, no cache hit | No summary | | Single task, cache hit | `---` + `[vp run] cache hit, {duration} saved.` | | Multi-task | `---` + `[vp run] {hits}/{total} cache hit ({rate}%), {duration} saved. (Run 'vp run --verbose' for full details)` | ### New CLI flags - `-v` / `--verbose`: Show full execution summary (previous default behavior) - `--last-details`: Display saved summary from last run Depends on: voidzero-dev/vite-task#171 --------- Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
1 parent 9115175 commit 0771039

File tree

32 files changed

+814
-1353
lines changed

32 files changed

+814
-1353
lines changed

Cargo.lock

Lines changed: 731 additions & 548 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Cargo.toml

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,7 @@ dunce = "1.0.5"
8282
fast-glob = "1.0.0"
8383
flate2 = { version = "=1.1.5", features = ["zlib-rs"] }
8484
form_urlencoded = "1.2.1"
85-
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "846885e5d3cd97e6a517b353a1b54b9da7bb2554" }
85+
fspy = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" }
8686
futures = "0.3.31"
8787
futures-util = "0.3.31"
8888
glob = "0.3.2"
@@ -181,14 +181,14 @@ vfs = "0.12.1"
181181
vite_command = { path = "crates/vite_command" }
182182
vite_error = { path = "crates/vite_error" }
183183
vite_js_runtime = { path = "crates/vite_js_runtime" }
184-
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "846885e5d3cd97e6a517b353a1b54b9da7bb2554" }
184+
vite_glob = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" }
185185
vite_install = { path = "crates/vite_install" }
186186
vite_migration = { path = "crates/vite_migration" }
187187
vite_shared = { path = "crates/vite_shared" }
188-
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "846885e5d3cd97e6a517b353a1b54b9da7bb2554" }
189-
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "846885e5d3cd97e6a517b353a1b54b9da7bb2554" }
190-
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "846885e5d3cd97e6a517b353a1b54b9da7bb2554" }
191-
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "846885e5d3cd97e6a517b353a1b54b9da7bb2554" }
188+
vite_path = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" }
189+
vite_str = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" }
190+
vite_task = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" }
191+
vite_workspace = { git = "ssh://git@github.com/voidzero-dev/vite-task.git", rev = "261c5676b2085a31d5edf4c5f76c281992ca96f3" }
192192
walkdir = "2.5.0"
193193
wax = "0.6.0"
194194
which = "8.0.0"

packages/cli/snap-tests/auto-install-before-task/snap.txt

Lines changed: 2 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -2,38 +2,11 @@
22
Already up to date
33

44
Done in <variable>ms using pnpm v<semver>
5-
6-
$ echo hello ⊘ cache disabled: built-in command
5+
$ echo hello ⊘ cache disabled
76
hello
87

98

10-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
11-
Vite+ Task Runner • Execution Summary
12-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
13-
14-
Statistics: 1 tasks • 0 cache hits • 0 cache misses • 1 cache disabled
15-
Performance: 0% cache hit rate
16-
17-
Task Details:
18-
────────────────────────────────────────────────
19-
[1] auto-install-before-task#hello: $ echo hello ✓
20-
→ Cache disabled for built-in command
21-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
22-
239
> vp run hello # second run - no pnpm install output (cache hit, silent)
24-
$ echo hello ⊘ cache disabled: built-in command
10+
$ echo hello ⊘ cache disabled
2511
hello
2612

27-
28-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
29-
Vite+ Task Runner • Execution Summary
30-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
31-
32-
Statistics: 1 tasks • 0 cache hits • 0 cache misses • 1 cache disabled
33-
Performance: 0% cache hit rate
34-
35-
Task Details:
36-
────────────────────────────────────────────────
37-
[1] auto-install-before-task#hello: $ echo hello ✓
38-
→ Cache disabled for built-in command
39-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

packages/cli/snap-tests/build-vite-env/snap.txt

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -10,19 +10,6 @@ dist/assets/index-BnIqjoTZ.js <variable> kB │ gzip: <variable> kB
1010
✓ built in <variable>ms
1111

1212

13-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
14-
Vite+ Task Runner • Execution Summary
15-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
16-
17-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
18-
Performance: 0% cache hit rate
19-
20-
Task Details:
21-
────────────────────────────────────────────────
22-
[1] build-vite-env-test#build: $ vp build ✓
23-
→ Cache miss: no previous cache entry found
24-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25-
2613
> VITE_MY_VAR=1 vp run build # should hit cache
2714
$ vp build ✓ cache hit, replaying
2815
vite+ v<semver> building client environment for production...
@@ -34,19 +21,8 @@ dist/assets/index-BnIqjoTZ.js <variable> kB │ gzip: <variable> kB
3421

3522
✓ built in <variable>ms
3623

37-
38-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
39-
Vite+ Task Runner • Execution Summary
40-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
41-
42-
Statistics: 1 tasks • 1 cache hits • 0 cache misses
43-
Performance: 100% cache hit rate, <variable>ms saved in total
44-
45-
Task Details:
46-
────────────────────────────────────────────────
47-
[1] build-vite-env-test#build: $ vp build ✓
48-
→ Cache hit - output replayed - <variable>ms saved
49-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
24+
---
25+
[vp run] cache hit, <variable>ms saved.
5026

5127
> VITE_MY_VAR=2 vp run build # env changed, should miss cache
5228
$ vp build ✗ cache miss: envs changed, executing
@@ -59,16 +35,3 @@ dist/assets/index-BnIqjoTZ.js <variable> kB │ gzip: <variable> kB
5935

6036
✓ built in <variable>ms
6137

62-
63-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
64-
Vite+ Task Runner • Execution Summary
65-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
66-
67-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
68-
Performance: 0% cache hit rate
69-
70-
Task Details:
71-
────────────────────────────────────────────────
72-
[1] build-vite-env-test#build: $ vp build ✓
73-
→ Cache miss: env VITE_MY_VAR value changed from '1' to '2'
74-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

packages/cli/snap-tests/cache-clean/snap.txt

Lines changed: 2 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -2,68 +2,18 @@
22
$ vp fmt
33

44

5-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
6-
Vite+ Task Runner • Execution Summary
7-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8-
9-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
10-
Performance: 0% cache hit rate
11-
12-
Task Details:
13-
────────────────────────────────────────────────
14-
[1] hello: $ vp fmt ✓
15-
→ Cache miss: no previous cache entry found
16-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
17-
185
> vp run hello # hit the cache
196
$ vp fmt ✓ cache hit, replaying
207

21-
22-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
23-
Vite+ Task Runner • Execution Summary
24-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25-
26-
Statistics: 1 tasks • 1 cache hits • 0 cache misses
27-
Performance: 100% cache hit rate, <variable>ms saved in total
28-
29-
Task Details:
30-
────────────────────────────────────────────────
31-
[1] hello: $ vp fmt ✓
32-
→ Cache hit - output replayed - <variable>ms saved
33-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
8+
---
9+
[vp run] cache hit, <variable>ms saved.
3410

3511
> vp cache clean # clean the cache
3612
> vp run hello # cache miss after clean
3713
$ vp fmt
3814

3915

40-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
41-
Vite+ Task Runner • Execution Summary
42-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
43-
44-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
45-
Performance: 0% cache hit rate
46-
47-
Task Details:
48-
────────────────────────────────────────────────
49-
[1] hello: $ vp fmt ✓
50-
→ Cache miss: no previous cache entry found
51-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
52-
5316
> cd subfolder && vp cache clean # cache can be located and cleaned from subfolder
5417
> vp run hello # cache miss after clean
5518
$ vp fmt
5619

57-
58-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
59-
Vite+ Task Runner • Execution Summary
60-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
61-
62-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
63-
Performance: 0% cache hit rate
64-
65-
Task Details:
66-
────────────────────────────────────────────────
67-
[1] hello: $ vp fmt ✓
68-
→ Cache miss: no previous cache entry found
69-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
Lines changed: 4 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,35 +1,5 @@
1-
> vp run hello # cache should be disabled by default for package.json scripts
2-
$ node hello.mjs ⊘ cache disabled: no cache config
3-
hello from script
1+
> vp run hello 2>&1 | grep 'cache disabled' # cache should be disabled by default for package.json scripts
2+
$ node hello.mjs ⊘ cache disabled
43

5-
6-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7-
Vite+ Task Runner • Execution Summary
8-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9-
10-
Statistics: 1 tasks • 0 cache hits • 0 cache misses • 1 cache disabled
11-
Performance: 0% cache hit rate
12-
13-
Task Details:
14-
────────────────────────────────────────────────
15-
[1] cache-scripts-default-test#hello: $ node hello.mjs ✓
16-
→ Cache disabled in task configuration
17-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
18-
19-
> vp run hello # second run should also show cache disabled
20-
$ node hello.mjs ⊘ cache disabled: no cache config
21-
hello from script
22-
23-
24-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25-
Vite+ Task Runner • Execution Summary
26-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27-
28-
Statistics: 1 tasks • 0 cache hits • 0 cache misses • 1 cache disabled
29-
Performance: 0% cache hit rate
30-
31-
Task Details:
32-
────────────────────────────────────────────────
33-
[1] cache-scripts-default-test#hello: $ node hello.mjs ✓
34-
→ Cache disabled in task configuration
35-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
4+
> vp run hello 2>&1 | grep 'cache disabled' # second run should also show cache disabled
5+
$ node hello.mjs ⊘ cache disabled

packages/cli/snap-tests/cache-scripts-default/steps.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"VITE_DISABLE_AUTO_INSTALL": "1"
44
},
55
"commands": [
6-
"vp run hello # cache should be disabled by default for package.json scripts",
7-
"vp run hello # second run should also show cache disabled"
6+
"vp run hello 2>&1 | grep 'cache disabled' # cache should be disabled by default for package.json scripts",
7+
"vp run hello 2>&1 | grep 'cache disabled' # second run should also show cache disabled"
88
]
99
}

packages/cli/snap-tests/cache-scripts-enabled/snap.txt

Lines changed: 2 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -3,33 +3,9 @@ $ node hello.mjs
33
hello from script
44

55

6-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7-
Vite+ Task Runner • Execution Summary
8-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9-
10-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
11-
Performance: 0% cache hit rate
12-
13-
Task Details:
14-
────────────────────────────────────────────────
15-
[1] cache-scripts-enabled-test#hello: $ node hello.mjs ✓
16-
→ Cache miss: no previous cache entry found
17-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
18-
196
> vp run hello # second run should be cache hit
207
$ node hello.mjs ✓ cache hit, replaying
218
hello from script
229

23-
24-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25-
Vite+ Task Runner • Execution Summary
26-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27-
28-
Statistics: 1 tasks • 1 cache hits • 0 cache misses
29-
Performance: 100% cache hit rate, <variable>ms saved in total
30-
31-
Task Details:
32-
────────────────────────────────────────────────
33-
[1] cache-scripts-enabled-test#hello: $ node hello.mjs ✓
34-
→ Cache hit - output replayed - <variable>ms saved
35-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10+
---
11+
[vp run] cache hit, <variable>ms saved.

packages/cli/snap-tests/change-passthrough-env-config/snap.txt

Lines changed: 2 additions & 39 deletions
Original file line numberDiff line numberDiff line change
@@ -3,52 +3,15 @@ $ node -p process.env.MY_ENV
33
1
44

55

6-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
7-
Vite+ Task Runner • Execution Summary
8-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
9-
10-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
11-
Performance: 0% cache hit rate
12-
13-
Task Details:
14-
────────────────────────────────────────────────
15-
[1] hello: $ node -p process.env.MY_ENV ✓
16-
→ Cache miss: no previous cache entry found
17-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
18-
196
> MY_ENV=2 vp run hello # MY_ENV is pass-through. should hit the cache created in step 1
207
$ node -p process.env.MY_ENV ✓ cache hit, replaying
218
1
229

23-
24-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
25-
Vite+ Task Runner • Execution Summary
26-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
27-
28-
Statistics: 1 tasks • 1 cache hits • 0 cache misses
29-
Performance: 100% cache hit rate, <variable>ms saved in total
30-
31-
Task Details:
32-
────────────────────────────────────────────────
33-
[1] hello: $ node -p process.env.MY_ENV ✓
34-
→ Cache hit - output replayed - <variable>ms saved
35-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
10+
---
11+
[vp run] cache hit, <variable>ms saved.
3612

3713
> # add a new pass through env via VITE_TASK_PASS_THROUGH_ENVS
3814
> VITE_TASK_PASS_THROUGH_ENVS=MY_ENV,MY_ENV2 MY_ENV=2 vp run hello # cache should be invalidated because passThroughEnvs config changed
3915
$ node -p process.env.MY_ENV ✗ cache miss: pass-through env config changed, executing
4016
2
4117

42-
43-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
44-
Vite+ Task Runner • Execution Summary
45-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
46-
47-
Statistics: 1 tasks • 0 cache hits • 1 cache misses
48-
Performance: 0% cache hit rate
49-
50-
Task Details:
51-
────────────────────────────────────────────────
52-
[1] hello: $ node -p process.env.MY_ENV ✓
53-
→ Cache miss: pass-through env 'MY_ENV2' added
54-
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

0 commit comments

Comments
 (0)