Commit ede7c19
authored
chore: migrate toolchain to Vite+ (#664)
Migrates the JavaScript toolchain to [Vite+](https://viteplus.dev)
(`vp`) via `vp migrate`, unifying formatting, linting, testing, and git
hooks under a single CLI. The Rust/napi build (`@napi-rs/cli` +
`rolldown`) and the `lerna` publish flow are untouched.
## Changes
| File | Change |
|------|--------|
| `package.json` | `fmt`→`vp fmt && cargo fmt`, `lint`→`vp lint`,
`prepare`→`vp config`; drop
`oxfmt`/`oxlint`/`oxlint-tsgolint`/`husky`/`lint-staged` deps + the
`lint-staged` block; add `vite`/`vite-plus` (catalog) |
| `pnpm-workspace.yaml` | catalog `vite` (→
`@voidzero-dev/vite-plus-core@0.2.2`) and `vite-plus`, plus
`overrides`/`peerDependencyRules` so all `vite` resolves to Vite+ |
| `vite.config.ts` *(new)* | folds in `.oxlintrc.json` (`lint` block)
and `lint-staged` (`staged` block); adds the `prefer-vite-plus-imports`
rule |
| `.oxlintrc.json`, `.husky/pre-commit` | removed (folded into
`vite.config.ts` / replaced by `.vite-hooks/`) |
| `.vite-hooks/pre-commit` *(new)* | runs `vp staged`; `core.hooksPath`
→ `.vite-hooks/_` |
| `AGENTS.md` *(new)* | Vite+ agent instructions |
| `packages/integrate-vitest/*` | `test`→`vp test run`; `vitest` →
`vite-plus` / `vite-plus/test` imports rewritten (config + 4 specs) |
The tools themselves are still provided by the `vite-plus` package, so
`node_modules/.bin/{vp,oxfmt,oxlint}` remain available and CI (`pnpm
lint`, `node --run fmt`, `prepare: vp config`) resolves them the same
way the old node_modules binaries did.
## Verification
- `vp check` — 95 files formatted, 51 files lint + type-check clean, 0
errors
- `vp run test` — integrate-module (21), integrate-module-bundler (22,
incl. NestJS), integrate-vitest (9, via vitest 4.1.9 through
`vite-plus/test`)
- `node --run fmt` (autofix-CI command) — exit 0, no drift
- pre-commit hook (`vp staged`) exercised by this branch's commit1 parent dbf2a14 commit ede7c19
8 files changed
Lines changed: 448 additions & 256 deletions
File tree
- .husky
- .vite-hooks
This file was deleted.
This file was deleted.
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
| 1 | + | |
| 2 | + | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
| 7 | + | |
| 8 | + | |
| 9 | + | |
| 10 | + | |
| 11 | + | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
| 16 | + | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
8 | | - | |
| 7 | + | |
| 8 | + | |
9 | 9 | | |
10 | | - | |
| 10 | + | |
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
| |||
17 | 17 | | |
18 | 18 | | |
19 | 19 | | |
20 | | - | |
21 | 20 | | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 21 | + | |
| 22 | + | |
35 | 23 | | |
36 | 24 | | |
37 | 25 | | |
0 commit comments