Skip to content

Commit f467510

Browse files
branchseerclaude
andauthored
chore: bump vite-task to 69cc6eba (#1091)
voidzero-dev/vite-task@398a147...69cc6eb#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed --------- Co-authored-by: Claude <noreply@anthropic.com>
1 parent 80dfb48 commit f467510

File tree

18 files changed

+156
-74
lines changed

18 files changed

+156
-74
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
---
2+
name: bump-vite-task
3+
description: Bump vite-task git dependency to the latest main commit. Use when you need to update the vite-task crates (fspy, vite_glob, vite_path, vite_str, vite_task, vite_workspace) in vite-plus.
4+
allowed-tools: Read, Grep, Glob, Edit, Bash, Agent, WebFetch
5+
---
6+
7+
# Bump vite-task to Latest Main
8+
9+
Update the vite-task git dependency in `Cargo.toml` to the latest commit on the vite-task main branch, fix any breaking changes, and create a PR.
10+
11+
## Steps
12+
13+
### 1. Get current and target commits
14+
15+
- Read `Cargo.toml` and find the current `rev = "..."` for any vite-task git dependency (e.g., `vite_task`, `vite_path`, `fspy`, `vite_glob`, `vite_str`, `vite_workspace`). They all share the same revision.
16+
- Get the latest commit hash on vite-task's main branch:
17+
```bash
18+
git ls-remote https://github.com/voidzero-dev/vite-task.git refs/heads/main
19+
```
20+
21+
### 2. Update Cargo.toml
22+
23+
- Replace **all** occurrences of the old commit hash with the new one in `Cargo.toml`. There are 6 crate entries that reference the same vite-task revision: `fspy`, `vite_glob`, `vite_path`, `vite_str`, `vite_task`, `vite_workspace`.
24+
25+
### 3. Ensure upstream dependencies are cloned
26+
27+
- `cargo check` requires the `./rolldown` and `./vite` directories to exist (many workspace path dependencies point to `./rolldown/crates/...`).
28+
- Locally, clone them using the commit hashes from `packages/tools/.upstream-versions.json`.
29+
- CI handles this automatically via the `.github/actions/clone` action.
30+
31+
### 4. Verify compilation
32+
33+
- Run `cargo check` to ensure the new vite-task compiles without errors.
34+
- If there are compilation errors, these are **breaking changes** from vite-task. Fix them in the vite-plus codebase (the consuming side), not in vite-task.
35+
- Common breaking changes include: renamed functions/methods, changed function signatures, new required fields in structs, removed public APIs.
36+
37+
### 5. Run tests
38+
39+
- Run `cargo test -p vite_command -p vite_error -p vite_install -p vite_js_runtime -p vite_migration -p vite_shared -p vite_static_config -p vite-plus-cli -p vite_global_cli` to run the vite-plus crate tests.
40+
- Note: Some tests require network access (e.g., `vite_install::package_manager` tests, `vite_global_cli::commands::env` tests). These may fail in sandboxed environments. Verify they also fail on the main branch before dismissing them.
41+
- Note: `cargo test -p vite_task` will NOT work because vite_task is a git dependency, not a workspace member.
42+
43+
### 6. Update snap tests
44+
45+
vite-task changes often affect CLI output, which means snap tests need updating. Common output changes:
46+
47+
- **Status icons**: e.g., cache hit/miss indicators may change
48+
- **New CLI options**: e.g., new flags added to `vp run` that show up in help output
49+
- **Cache behavior messages**: e.g., new summary lines about cache status
50+
- **Task output formatting**: e.g., step numbering, separator lines
51+
52+
To update snap tests:
53+
54+
1. Push your changes and let CI run the snap tests.
55+
2. CI will show the diff in the E2E test logs if snap tests fail.
56+
3. Extract the diff from CI logs and apply it locally.
57+
4. Check all three platforms (Linux, Mac, Windows) since they may have slightly different snap test coverage.
58+
5. Watch for trailing newline issues - ensure snap files end consistently.
59+
60+
Snap test files are at `packages/cli/snap-tests/*/snap.txt` and `packages/cli/snap-tests-global/*/snap.txt`.
61+
62+
### 7. Create the PR
63+
64+
- Commit message: `chore: bump vite-task to <short-hash>`
65+
- PR title: `chore: bump vite-task to <short-hash>`
66+
- PR body: Link to vite-task CHANGELOG.md diff between old and new commits:
67+
```
68+
https://github.com/voidzero-dev/vite-task/compare/<old-hash>...<new-hash>#diff-06572a96a58dc510037d5efa622f9bec8519bc1beab13c9f251e97e657a9d4ed
69+
```
70+
71+
### 8. Verify CI
72+
73+
Wait for CI and ensure the `done` check passes. Key checks to monitor:
74+
75+
- **Lint**: Clippy and format checks
76+
- **Test** (Linux, Mac, Windows): Rust unit tests
77+
- **CLI E2E test** (Linux, Mac, Windows): Snap tests - most likely to fail on a vite-task bump
78+
- **Run task**: Task runner integration tests
79+
- **Cargo Deny**: License/advisory checks (may have pre-existing failures unrelated to bump)
80+
81+
The only **required** status check for merging is `done`, which aggregates the other checks (excluding Cargo Deny).
82+
83+
## Notes
84+
85+
- Building the full CLI locally (`pnpm bootstrap-cli`) requires the rolldown Node.js package to be built first, which is complex. Prefer relying on CI for snap test generation.
86+
- `Cargo.lock` is automatically updated by cargo when you change the revision in `Cargo.toml`.

Cargo.lock

Lines changed: 18 additions & 18 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
@@ -84,7 +84,7 @@ dunce = "1.0.5"
8484
fast-glob = "1.0.0"
8585
flate2 = { version = "=1.1.9", features = ["zlib-rs"] }
8686
form_urlencoded = "1.2.1"
87-
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" }
87+
fspy = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" }
8888
futures = "0.3.31"
8989
futures-util = "0.3.31"
9090
glob = "0.3.2"
@@ -183,15 +183,15 @@ vfs = "0.12.1"
183183
vite_command = { path = "crates/vite_command" }
184184
vite_error = { path = "crates/vite_error" }
185185
vite_js_runtime = { path = "crates/vite_js_runtime" }
186-
vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" }
186+
vite_glob = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" }
187187
vite_install = { path = "crates/vite_install" }
188188
vite_migration = { path = "crates/vite_migration" }
189189
vite_shared = { path = "crates/vite_shared" }
190190
vite_static_config = { path = "crates/vite_static_config" }
191-
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" }
192-
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" }
193-
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" }
194-
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "398a147fd1ed42a88585d3a9481f200c3e56a2f4" }
191+
vite_path = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" }
192+
vite_str = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" }
193+
vite_task = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" }
194+
vite_workspace = { git = "https://github.com/voidzero-dev/vite-task.git", rev = "69cc6eba95a3b7f25f7d4d32c3f29b1386995907" }
195195
walkdir = "2.5.0"
196196
wax = "0.6.0"
197197
which = "8.0.0"

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

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ dist/assets/index-BnIqjoTZ.js <variable> kB │ gzip: <variable> kB
1111

1212

1313
> VITE_MY_VAR=1 vp run build # should hit cache
14-
$ vp build cache hit, replaying
14+
$ vp build cache hit, replaying
1515
vite v<semver> building client environment for production...
1616
transforming...✓ <variable> modules transformed.
1717
rendering chunks...
@@ -25,7 +25,7 @@ dist/assets/index-BnIqjoTZ.js <variable> kB │ gzip: <variable> kB
2525
vp run: cache hit, <variable>ms saved.
2626

2727
> VITE_MY_VAR=2 vp run build # env changed, should miss cache
28-
$ vp build cache miss: envs changed, executing
28+
$ vp build cache miss: envs changed, executing
2929
vite v<semver> building client environment for production...
3030
transforming...✓ <variable> modules transformed.
3131
rendering chunks...
@@ -35,3 +35,5 @@ dist/assets/index-BnIqjoTZ.js <variable> kB │ gzip: <variable> kB
3535

3636
✓ built in <variable>ms
3737

38+
---
39+
vp run: build-vite-env-test#build not cached because it modified its input. (Run `vp run --last-details` for full details)

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

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@
22
$ vp fmt
33
Finished in <variable>ms on 4 files using <variable> threads.
44

5+
---
6+
vp run: hello not cached because it modified its input. (Run `vp run --last-details` for full details)
57

68
> vp run hello # hit the cache
7-
$ vp fmt ✓ cache hit, replaying
9+
$ vp fmt
810
Finished in <variable>ms on 4 files using <variable> threads.
911

10-
---
11-
vp run: cache hit, <variable>ms saved.
1212

1313
> vp cache clean # clean the cache
1414
> vp run hello # cache miss after clean

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

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ hello from script
44

55

66
> vp run hello # second run should be cache hit
7-
$ node hello.mjs cache hit, replaying
7+
$ node hello.mjs cache hit, replaying
88
hello from script
99

1010
---

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,14 @@ $ node -p process.env.MY_ENV
44

55

66
> MY_ENV=2 vp run hello # MY_ENV is pass-through. should hit the cache created in step 1
7-
$ node -p process.env.MY_ENV cache hit, replaying
7+
$ node -p process.env.MY_ENV cache hit, replaying
88
1
99

1010
---
1111
vp run: cache hit, <variable>ms saved.
1212

1313
> # add a new pass through env via VITE_TASK_PASS_THROUGH_ENVS
1414
> VITE_TASK_PASS_THROUGH_ENVS=MY_ENV,MY_ENV2 MY_ENV=2 vp run hello # cache should be invalidated because untrackedEnv config changed
15-
$ node -p process.env.MY_ENV cache miss: untracked env config changed, executing
15+
$ node -p process.env.MY_ENV cache miss: untracked env config changed, executing
1616
2
1717

packages/cli/snap-tests/command-install-shortcut/snap.txt

Lines changed: 6 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,15 @@ dependencies:
99

1010
Done in <variable>ms using pnpm v<semver>
1111

12+
---
13+
vp run: command-install-shortcut#install not cached because it modified its input. (Run `vp run --last-details` for full details)
1214

1315
> vp run install # install shortcut hit cache
14-
$ vp install ✓ cache hit, replaying
15-
Packages: +<variable>
16-
+<repeat>
17-
Progress: resolved <variable>, reused <variable>, downloaded <variable>, added <variable>, done
18-
19-
dependencies:
20-
+ tslib <semver>
16+
$ vp install
17+
Lockfile is up to date, resolution step is skipped
18+
Already up to date
2119

2220
Done in <variable>ms using pnpm v<semver>
2321

2422
---
25-
vp run: cache hit, <variable>ms saved.
23+
vp run: command-install-shortcut#install not cached because it modified its input. (Run `vp run --last-details` for full details)

packages/cli/snap-tests/command-pack-monorepo/snap.txt

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,17 @@
22
> ls packages/hello/dist # should have the library
33
index.cjs
44

5-
> vp run hello#build 2>&1 | grep 'cache hit' # should hit cache
6-
~/packages/hello$ vp pack ✓ cache hit, replaying
7-
vp run: cache hit, <variable>ms saved.
8-
5+
[1]> vp run hello#build 2>&1 | grep 'cache hit' # should hit cache
96
> vp run array-config#build # should build the library supports array config
107
> ls packages/array-config/dist # should have the library
118
index.d.mts
129
index.mjs
1310

14-
> vp run array-config#build 2>&1 | grep 'cache hit' # should hit cache
15-
~/packages/array-config$ vp pack ✓ cache hit, replaying
16-
vp run: cache hit, <variable>ms saved.
17-
11+
[1]> vp run array-config#build 2>&1 | grep 'cache hit' # should hit cache
1812
> vp run default-config#build # should build the library supports default config
1913
> ls packages/default-config/dist # should have the library
2014
index.mjs
2115

2216
> vp run default-config#build 2>&1 | grep 'cache hit' # should hit cache
23-
~/packages/default-config$ vp pack cache hit, replaying
17+
~/packages/default-config$ vp pack cache hit, replaying
2418
vp run: cache hit, <variable>ms saved.

0 commit comments

Comments
 (0)