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
Copy file name to clipboardExpand all lines: .claude/skills/add-ecosystem-ci/SKILL.md
+40-4Lines changed: 40 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -25,7 +25,11 @@ gh api repos/OWNER/REPO/commits/BRANCH --jq '.sha'
25
25
26
26
Fetch the repository's root to check if the main package.json is in a subdirectory (like `web/`, `app/`, `frontend/`).
27
27
28
-
### 2.2 Auto-detect Commands from GitHub Workflows
28
+
### 2.2 Check if Project Already Uses Vite-Plus
29
+
30
+
Check the project's root `package.json` for `vite-plus` in `dependencies` or `devDependencies`. If the project already uses vite-plus, set `forceFreshMigration: true` in `repo.json`. This tells `patch-project.ts` to set `VITE_PLUS_FORCE_MIGRATE=1` so `vp migrate` forces full dependency rewriting instead of skipping with "already using Vite+".
31
+
32
+
### 2.3 Auto-detect Commands from GitHub Workflows
29
33
30
34
Fetch the project's GitHub workflow files to detect available commands:
31
35
@@ -43,7 +47,7 @@ Look for common patterns in workflow files:
- The `directory` field is optional - only add it if the package.json is not in the project root
111
146
- If `directory` is specified in repo.json, it must also be specified in the workflow matrix
112
147
- `patch-project.ts`automatically handles running `vp migrate` in the correct directory
148
+
- `forceFreshMigration`is required for projects that already have `vite-plus` in their package.json — it sets `VITE_PLUS_FORCE_MIGRATE=1` so `vp migrate` forces full dependency rewriting instead of skipping
113
149
- OS exclusions are added to the existing `exclude` section in the workflow matrix
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.
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:
- 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
- Review each changelog entry and determine if it affects user-facing behavior: new CLI options, changed defaults, new config fields, removed features, etc.
69
+
- The changelog contains links to the corresponding vite-task PRs. For complex changes, check the PR description and code diff (especially any docs changes in the PR) to understand the full scope of the change.
70
+
- If user-facing changes are found, update the relevant docs in `docs/` (e.g., `docs/guide/`, `docs/config/`).
Wait for CI and ensure the `done` check passes. Key checks to monitor:
90
+
91
+
-**Lint**: Clippy and format checks
92
+
-**Test** (Linux, Mac, Windows): Rust unit tests
93
+
-**CLI E2E test** (Linux, Mac, Windows): Snap tests - most likely to fail on a vite-task bump
94
+
-**Run task**: Task runner integration tests
95
+
-**Cargo Deny**: License/advisory checks (may have pre-existing failures unrelated to bump)
96
+
97
+
The only **required** status check for merging is `done`, which aggregates the other checks (excluding Cargo Deny).
98
+
99
+
## Notes
100
+
101
+
- 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.
102
+
-`Cargo.lock` is automatically updated by cargo when you change the revision in `Cargo.toml`.
0 commit comments