Skip to content

Commit 0ffae2b

Browse files
liangmiQwQfengmk2
andauthored
docs(migrate): document manual installation (#2365)
The manual migration setup is documented in the README, but is missing from the website migration guide. This PR adds the dev dependency installation command and the npm, pnpm, and Yarn override examples, including why Vitest must match the bundled version. 🤖 Generated with Codex --------- Co-authored-by: MK (fengmk2) <fengmk2@gmail.com>
1 parent 13689c1 commit 0ffae2b

5 files changed

Lines changed: 63 additions & 6 deletions

File tree

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: sync-upstream-dependency-docs
3+
description: Sync exact upstream dependency versions embedded in Vite+ documentation after the automated dependency upgrade. Use when bundled Vite, Vitest, Oxlint, Oxfmt, tsdown, Rolldown, or related package versions change.
4+
allowed-tools: Read, Grep, Glob, Edit, Bash
5+
---
6+
7+
# Sync upstream dependency docs
8+
9+
1. Read `$UPGRADE_DEPS_META_DIR/versions.json` and consider only entries whose `old`
10+
and `new` values differ.
11+
2. Search `README.md`, `packages/*/README.md`, and `docs/**/*.md` for each changed
12+
package name and its old exact version. Do not treat changelogs, RFC examples,
13+
snapshots, or broad ranges such as `vitest@4.x` as current-version references.
14+
3. Update references that promise to match Vite+'s currently bundled version. In
15+
particular, keep every exact Vitest pin in the manual-migration examples in sync,
16+
including `docs/guide/migrate.md`, `README.md`, and `packages/cli/README.md` when
17+
those examples are present.
18+
4. Preserve the surrounding wording and formatting. Do not rewrite examples whose
19+
version is intentionally historical or illustrative.
20+
5. Re-run the searches for the changed packages and inspect the focused diff. No
21+
stale exact version may remain in documentation that describes the current bundle.

.github/workflows/upgrade-deps.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -140,13 +140,15 @@ jobs:
140140
help documents. If it is `false`, do not modify help documents.
141141
5. Compare tsdown CLI options with `vp pack` and sync new/removed options per
142142
`.claude/skills/sync-tsdown-cli/SKILL.md`.
143-
6. Install the global CLI:
143+
6. Follow `.claude/skills/sync-upstream-dependency-docs/SKILL.md` to
144+
update version-specific documentation for dependencies changed in this run.
145+
7. Install the global CLI:
144146
- `pnpm bootstrap-cli:ci`
145147
- `echo "$HOME/.vite-plus/bin" >> $GITHUB_PATH`
146-
7. If any Rust code or `Cargo.toml` was modified, run `cargo check
148+
8. If any Rust code or `Cargo.toml` was modified, run `cargo check
147149
--all-targets --all-features` and `cargo shear`; fix anything they report.
148-
8. Run `pnpm run lint` (requires a prior `just build`); fix any errors.
149-
9. Smoke-test the CLI: `vp -h`, `vp run -h`, `vp lint -h`, `vp test -h`,
150+
9. Run `pnpm run lint` (requires a prior `just build`); fix any errors.
151+
10. Smoke-test the CLI: `vp -h`, `vp run -h`, `vp lint -h`, `vp test -h`,
150152
`vp build -h`, `vp fmt -h`, `vp pack -h`.
151153
152154
### Generated artifacts and build diffs

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ See [Automatic Version Updates](https://viteplus.dev/guide/ci#automatic-version-
196196
If you are manually migrating a project to Vite+, install these dev dependencies first:
197197

198198
```bash
199-
npm install -D vite-plus @voidzero-dev/vite-plus-core@latest
199+
vp install -D vite-plus
200200
```
201201

202202
You need to add overrides to your package manager so that other packages resolve the Vite+ versions: alias `vite` to `@voidzero-dev/vite-plus-core`, and pin `vitest` to the version Vite+ bundles (run `vp --version`) so the whole project shares a single Vitest copy with `vp test`. Without the `vitest` pin, a dependency or workspace package can pull a different Vitest than the bundled runner, splitting Vitest's internals (mocks, `expect`, runner state):

docs/guide/migrate.md

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,40 @@ After running the migration:
6969
- Run `vp test`
7070
- Run `vp build`
7171

72+
## Manual Installation & Migration
73+
74+
If you are manually migrating a project to Vite+, install these dev dependencies first:
75+
76+
```bash
77+
vp install -D vite-plus
78+
```
79+
80+
You need to add overrides to your package manager so that other packages resolve the Vite+ versions: alias `vite` to `@voidzero-dev/vite-plus-core`, and pin `vitest` to the version Vite+ bundles (run `vp --version`) so the whole project shares a single Vitest copy with `vp test`. Without the `vitest` pin, a dependency or workspace package can pull a different Vitest than the bundled runner, splitting Vitest's internals (mocks, `expect`, runner state):
81+
82+
```json
83+
"overrides": {
84+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
85+
"vitest": "4.1.10"
86+
}
87+
```
88+
89+
If you are using `pnpm`, add this to your `pnpm-workspace.yaml`:
90+
91+
```yaml
92+
overrides:
93+
vite: npm:@voidzero-dev/vite-plus-core@latest
94+
vitest: 4.1.10
95+
```
96+
97+
Or, if you are using Yarn:
98+
99+
```json
100+
"resolutions": {
101+
"vite": "npm:@voidzero-dev/vite-plus-core@latest",
102+
"vitest": "4.1.10"
103+
}
104+
```
105+
72106
## Migration Prompt
73107

74108
If you want to hand this work to a coding agent (or the reader is a coding agent!), use this migration prompt:

packages/cli/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,7 @@ See [Automatic Version Updates](https://viteplus.dev/guide/ci#automatic-version-
190190
If you are manually migrating a project to Vite+, install these dev dependencies first:
191191

192192
```bash
193-
npm install -D vite-plus @voidzero-dev/vite-plus-core@latest
193+
vp install -D vite-plus
194194
```
195195

196196
You need to add overrides to your package manager so that other packages resolve the Vite+ versions: alias `vite` to `@voidzero-dev/vite-plus-core`, and pin `vitest` to the version Vite+ bundles (run `vp --version`) so the whole project shares a single Vitest copy with `vp test`. Without the `vitest` pin, a dependency or workspace package can pull a different Vitest than the bundled runner, splitting Vitest's internals (mocks, `expect`, runner state):

0 commit comments

Comments
 (0)