vite-plus 1.0.0 → 1.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +59 -6
- package/README.md +7 -7
- package/binding/index.cjs +54 -55
- package/binding/index.d.cts +53 -12
- package/dist/{agent-CKMI1a8W.js → agent-KeDc6vmg.js} +2 -2
- package/dist/bin.js +14 -11
- package/dist/command-DaRqSNpP.js +1 -0
- package/dist/comparison-CmVirWIW-DUGaiYqF.js +121 -0
- package/dist/config/bin.js +4 -4
- package/dist/{constants-BqJiMVVU.js → constants-BW3g7VnD.js} +3 -3
- package/dist/create/bin.d.ts +2 -1
- package/dist/create/bin.js +126 -26
- package/dist/{define-config-Cf_5GHmY.d.ts → define-config-Bexdd6RZ.d.ts} +25 -9
- package/dist/{define-config-DhEJaYRc.js → define-config-CIlk9scU.js} +111 -6
- package/dist/{define-config-C_KGDLUZ.cjs → define-config-Dq_23Eyr.cjs} +89 -3
- package/dist/define-config.cjs +1 -1
- package/dist/define-config.d.ts +1 -1
- package/dist/define-config.js +1 -2
- package/dist/{dist-BsAzy8OW.js → dist-Bi7ZEK3c.js} +1 -2
- package/dist/dist-CBWGibx8.js +3 -0
- package/dist/{dist-DfmT__Aw.js → dist-Cqz8OtiO.js} +24 -21
- package/dist/{editor-CHfGUhxP.js → editor-b1XUwt9v.js} +114 -65
- package/dist/fmt.js +1 -2
- package/dist/hooks/bin.js +1 -1
- package/dist/{hooks-C-4gykWR.js → hooks-DhwsWb46.js} +34 -22
- package/dist/index.cjs +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/lint-plugins-dev.js +1 -2
- package/dist/lint-plugins.cjs +1 -1
- package/dist/lint-plugins.js +1 -2
- package/dist/migration/bin.js +63 -57
- package/dist/{oxlint-plugin-config-lMMD5fAC.js → oxlint-plugin-config-Dx-ZY2MN.js} +1 -1
- package/dist/oxlint-plugin.js +2 -2
- package/dist/pack-bin.js +4 -3
- package/dist/{package-Cgdlhamw.js → package-BP16iQby.js} +7 -2
- package/dist/package-overrides-D1RcXSFl.js +411 -0
- package/dist/{prompts-jMH8S4Wp.js → prompts-BGpQtC5z.js} +548 -262
- package/dist/resolve-vite-config-CGzlyhGr.js +1 -0
- package/dist/{resolve-vite-config-BJYYtfY3.js → resolve-vite-config-x47JetlI.js} +2 -2
- package/dist/staged/bin.js +792 -743
- package/dist/sync-versions/bin.js +4761 -3373
- package/dist/sync-versions/bin.mjs +5304 -5083
- package/dist/test/browser/providers/playwright.d.ts +7 -2
- package/dist/test/browser-playwright.d.ts +7 -2
- package/dist/toolchain.js +12 -12
- package/dist/toolchain.json +12 -12
- package/dist/tsconfig-C5PnJfW4.js +1 -0
- package/dist/{tsconfig-BoYTBNX_.js → tsconfig-D2DzAQ_D.js} +2 -2
- package/dist/version.js +2 -2
- package/dist/versions.js +7 -7
- package/docs/config/run.md +9 -5
- package/docs/config/staged.md +1 -1
- package/docs/guide/automatic-data-tracking.md +7 -6
- package/docs/guide/cache.md +3 -3
- package/docs/guide/check.md +7 -7
- package/docs/guide/ci.md +3 -4
- package/docs/guide/commit-hooks.md +3 -1
- package/docs/guide/create.md +14 -4
- package/docs/guide/env.md +19 -7
- package/docs/guide/github-actions-cache.md +2 -4
- package/docs/guide/global-cli.md +36 -10
- package/docs/guide/ide-integration.md +4 -2
- package/docs/guide/implode.md +2 -0
- package/docs/guide/index.md +8 -8
- package/docs/guide/local-cli.md +27 -11
- package/docs/guide/migrate-rules.md +11 -3
- package/docs/guide/migrate.md +11 -11
- package/docs/guide/{install.md → package-management.md} +28 -4
- package/docs/guide/run.md +10 -8
- package/docs/guide/test.md +3 -1
- package/docs/guide/troubleshooting.md +9 -7
- package/docs/guide/upgrade-project.md +2 -6
- package/docs/guide/upgrade.md +6 -0
- package/docs/guide/vitest-v5.md +2 -2
- package/docs/guide/vpx.md +5 -5
- package/package.json +37 -33
- package/templates/generator/bin/index.ts +0 -0
- package/templates/generator/package.json +2 -2
- package/templates/generator/src/template.ts +1 -0
- package/dist/command-CLJK5jGW.js +0 -2
- package/dist/dist-BWiANxFS.js +0 -8052
- package/dist/package-overrides-Dpn4scvN.js +0 -17
- package/dist/resolve-vite-config-BPgpYMYp.js +0 -2
- package/dist/tsconfig-CmKidmRD.js +0 -2
package/docs/guide/global-cli.md
CHANGED
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
<script setup lang="ts">
|
|
2
|
-
import { getScrollOffset } from 'vitepress';
|
|
3
2
|
import { nextTick, onMounted, onUnmounted } from 'vue';
|
|
4
3
|
|
|
5
4
|
function openTarget() {
|
|
@@ -18,9 +17,7 @@ function openTarget() {
|
|
|
18
17
|
// VitePress cannot measure a heading inside closed details. Correct the scroll after revealing it.
|
|
19
18
|
requestAnimationFrame(() => {
|
|
20
19
|
if (!target.isConnected) return;
|
|
21
|
-
|
|
22
|
-
+ Number.parseInt(window.getComputedStyle(target).paddingTop, 10);
|
|
23
|
-
window.scrollTo(0, top);
|
|
20
|
+
target.scrollIntoView({ block: 'start' });
|
|
24
21
|
});
|
|
25
22
|
}
|
|
26
23
|
|
|
@@ -111,7 +108,7 @@ These variables control the installer scripts and the standalone Windows install
|
|
|
111
108
|
#### `VP_HOME`
|
|
112
109
|
|
|
113
110
|
- **Purpose**: Optional pin for the single-root layout. Set it to an absolute path. Vite+ then puts bin, data, cache, config, and state under that directory. The installed CLI reads the same variable. See [Environment](/guide/env).
|
|
114
|
-
- **Default**: unset. Vite+ reuses an existing install in `~/.vite-plus` on Unix or `%USERPROFILE%\.vite-plus` on Windows. The directory must contain a `current` link. Otherwise, a fresh install uses the split platform layout
|
|
111
|
+
- **Default**: unset. Vite+ reuses an existing install in `~/.vite-plus` on Unix or `%USERPROFILE%\.vite-plus` on Windows. The directory must contain a `current` link. Otherwise, a fresh install uses the split platform layout shown below.
|
|
115
112
|
- **Example**:
|
|
116
113
|
|
|
117
114
|
```bash
|
|
@@ -124,6 +121,20 @@ These variables control the installer scripts and the standalone Windows install
|
|
|
124
121
|
$env:VP_HOME = "D:\vite-plus"; irm https://vite.plus/ps1 | iex
|
|
125
122
|
```
|
|
126
123
|
|
|
124
|
+
Fresh split-layout installations use these defaults:
|
|
125
|
+
|
|
126
|
+
| Directory | macOS and Linux | Windows |
|
|
127
|
+
| --------- | -------------------------- | -------------------------------- |
|
|
128
|
+
| Data | `~/.local/share/vite-plus` | `%LOCALAPPDATA%\vite-plus\data` |
|
|
129
|
+
| Bin | `<DATA>/bin` | `%LOCALAPPDATA%\vite-plus\bin` |
|
|
130
|
+
| Cache | `~/.cache/vite-plus` | `%LOCALAPPDATA%\vite-plus\cache` |
|
|
131
|
+
| Config | `~/.config/vite-plus` | `%APPDATA%\vite-plus` |
|
|
132
|
+
| State | `~/.local/state/vite-plus` | `%LOCALAPPDATA%\vite-plus\state` |
|
|
133
|
+
|
|
134
|
+
On macOS and Linux, absolute `XDG_DATA_HOME`, `XDG_CACHE_HOME`, `XDG_CONFIG_HOME`, and `XDG_STATE_HOME` values override the corresponding base directories. The bin directory follows the data directory.
|
|
135
|
+
|
|
136
|
+
Low-priority managed shims live in `<DATA>/fallback-bin`, where `<DATA>` is the resolved data directory.
|
|
137
|
+
|
|
127
138
|
#### `VP_BIN_DIR` / `VP_DATA_DIR` / `VP_CACHE_DIR`
|
|
128
139
|
|
|
129
140
|
- **Purpose**: Internal absolute directory overrides for integrations that must pin a split install. Set all three variables together. The installer rejects an incomplete group. Vite+ ignores the group when `VP_HOME` is set or when it reuses an existing `~/.vite-plus` install.
|
|
@@ -143,6 +154,17 @@ These variables control the installer scripts and the standalone Windows install
|
|
|
143
154
|
- **Purpose**: Custom npm registry URL
|
|
144
155
|
- **Default**: `https://registry.npmjs.org`
|
|
145
156
|
- **CLI equivalent**: `--registry`
|
|
157
|
+
- **Managed package managers**: When Vite+ downloads a pinned npm, pnpm,
|
|
158
|
+
Yarn, or Bun version, it also reads the workspace-root and user `.npmrc`.
|
|
159
|
+
Package-scoped registries and registry-scoped `_authToken`, `_auth`, or
|
|
160
|
+
`username`/`_password` credentials are honored. Keep secrets in environment
|
|
161
|
+
variables and reference them from `.npmrc`, for example:
|
|
162
|
+
|
|
163
|
+
```ini
|
|
164
|
+
registry=https://npm.corp.example/repository/npm/
|
|
165
|
+
//npm.corp.example/repository/npm/:_authToken=${NPM_TOKEN}
|
|
166
|
+
```
|
|
167
|
+
|
|
146
168
|
- **Example**:
|
|
147
169
|
```bash
|
|
148
170
|
curl -fsSL https://vite.plus | NPM_CONFIG_REGISTRY=https://registry.npmmirror.com bash
|
|
@@ -189,7 +211,7 @@ These management variables are installation choices, saved in Vite+'s config. Th
|
|
|
189
211
|
|
|
190
212
|
#### Development variables
|
|
191
213
|
|
|
192
|
-
Use `VP_LOCAL_TGZ` and `VP_LOCAL_BINARY` when you develop Vite+ itself. `VP_LOCAL_TGZ` specifies a local `vite-plus.tgz` file. `VP_LOCAL_BINARY` specifies a local `vp` binary. The installers use these files for the local build.
|
|
214
|
+
Use `VP_LOCAL_TGZ` and `VP_LOCAL_BINARY` when you develop Vite+ itself. `VP_LOCAL_TGZ` specifies a local `vite-plus.tgz` file. `VP_LOCAL_BINARY` specifies a local `vp` binary. The installers use these files for the local build.
|
|
193
215
|
|
|
194
216
|
### Runtime Variables
|
|
195
217
|
|
|
@@ -251,10 +273,11 @@ These variables configure the installed Vite+ CLI. `VP_HOME` (above) also applie
|
|
|
251
273
|
#### `VP_BYPASS`
|
|
252
274
|
|
|
253
275
|
- **Purpose**: Bypass the Vite+ shim and use the system tool
|
|
254
|
-
- **Values**: `PATH`-style list of directories to
|
|
255
|
-
- **Default**:
|
|
276
|
+
- **Values**: Setting this variable, including to an empty string, enables bypass mode. Its value is a `PATH`-style list of additional directories to exclude from the search. The Vite+ bin directory and Vite+ shims are skipped automatically.
|
|
277
|
+
- **Default**: Unset
|
|
256
278
|
- **Example**:
|
|
257
279
|
```bash
|
|
280
|
+
# Find a system Node.js on PATH, excluding /usr/local/bin.
|
|
258
281
|
VP_BYPASS=/usr/local/bin node -v
|
|
259
282
|
```
|
|
260
283
|
|
|
@@ -289,7 +312,6 @@ Vite+ sets additional `VP_*` variables during shim dispatch and shell integratio
|
|
|
289
312
|
#### `VP_LOG`
|
|
290
313
|
|
|
291
314
|
- **Purpose**: Log filter string for `tracing_subscriber`
|
|
292
|
-
- **Installer behavior**: When `CI=true`, `install.sh` hides shell file errors. Set `VP_LOG=trace` to show these errors.
|
|
293
315
|
- **Default**: None
|
|
294
316
|
- **Example**:
|
|
295
317
|
```bash
|
|
@@ -381,6 +403,10 @@ vp dlx create-vite # Download and run a package binary
|
|
|
381
403
|
|
|
382
404
|
You do not need a local `vite-plus` dependency to run existing `package.json` scripts. Add the [project-local CLI](/guide/local-cli) when you want the frontend toolchain version recorded in the project's manifest and lockfile.
|
|
383
405
|
|
|
406
|
+
## Run a Command in Another Directory
|
|
407
|
+
|
|
408
|
+
Use `vp -C <dir> <command>` to run any `vp` command from another working directory. See [Targeting a package with `-C`](/guide/monorepo#targeting-a-package-with-c) for examples and details.
|
|
409
|
+
|
|
384
410
|
## Use Both CLIs Together
|
|
385
411
|
|
|
386
412
|
The global CLI and the project-local `vite-plus` package work together. You keep using the same `vp` command, while each project can choose its own toolchain version.
|
|
@@ -403,7 +429,7 @@ To see which toolchain is selected for your current project, run `vp toolchain`.
|
|
|
403
429
|
## Next Steps
|
|
404
430
|
|
|
405
431
|
- [Environment](/guide/env) covers Node.js and package-manager selection, pinning, shims, and managed installations.
|
|
406
|
-
- [Package Management](/guide/
|
|
432
|
+
- [Package Management](/guide/package-management) covers pnpm, npm, Yarn, and Bun workflows.
|
|
407
433
|
- [Run](/guide/run) covers package scripts and cached workspace tasks.
|
|
408
434
|
- [Upgrading Vite+](/guide/upgrade) explains global CLI upgrades. See [Update Vite+](/guide/upgrade-project) for project-local upgrades.
|
|
409
435
|
- [Removing Vite+](/guide/implode) removes the global binary and its managed data.
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# IDE Integration
|
|
2
2
|
|
|
3
|
-
Vite+ supports VS Code and
|
|
3
|
+
Vite+ supports VS Code, Zed, and JetBrains IDEs through editor-specific settings that `vp create` and `vp migrate` can automatically write into your project.
|
|
4
4
|
|
|
5
5
|
## VS Code
|
|
6
6
|
|
|
@@ -145,7 +145,7 @@ You can also manually set up the IDE configuration to match your Vite+ setup:
|
|
|
145
145
|
"javascript.nodejs.core.library.configured.version": "24.18.0", // Replace with your selected Node.js version
|
|
146
146
|
"javascript.nodejs.core.library.typings.version": "24.13.3", // Replace with the version of @types/node that corresponds to your runtime (or omit if you don't want it)
|
|
147
147
|
"javascript.preferred.runtime.type.id": "node",
|
|
148
|
-
"nodejs_interpreter_path": "$USER_HOME$/.vite-plus/bin/node",
|
|
148
|
+
"nodejs_interpreter_path": "$USER_HOME$/.local/share/vite-plus/bin/node",
|
|
149
149
|
"nodejs_package_manager_path": "pnpm" // Replace with your package manager of choice
|
|
150
150
|
}
|
|
151
151
|
}]]>
|
|
@@ -153,6 +153,8 @@ You can also manually set up the IDE configuration to match your Vite+ setup:
|
|
|
153
153
|
</project>
|
|
154
154
|
```
|
|
155
155
|
|
|
156
|
+
This path assumes a new Unix installation using the default XDG directories. On Windows, use `%LOCALAPPDATA%\vite-plus\bin\node.exe`. Run `vp env current node` to check the resolved Node.js version and binary path. If you use a custom `VP_HOME` or XDG directories, or an older Vite+ installation, update `nodejs_interpreter_path` to the path of your Node.js shim.
|
|
157
|
+
|
|
156
158
|
```xml [.idea/OxfmtSettings.xml]
|
|
157
159
|
<?xml version="1.0" encoding="UTF-8"?>
|
|
158
160
|
<project version="4">
|
package/docs/guide/implode.md
CHANGED
|
@@ -16,6 +16,8 @@ If you decide Vite+ is not for you, please [share your feedback with us](https:/
|
|
|
16
16
|
vp implode
|
|
17
17
|
```
|
|
18
18
|
|
|
19
|
+
Review the directories and shell profiles listed by the command, then type `boom` to confirm removal. Any other input cancels the operation.
|
|
20
|
+
|
|
19
21
|
Skip the confirmation prompt with:
|
|
20
22
|
|
|
21
23
|
```bash
|
package/docs/guide/index.md
CHANGED
|
@@ -82,12 +82,12 @@ This is required because the managed [unofficial-builds](https://unofficial-buil
|
|
|
82
82
|
With the global CLI installed, create a project, install dependencies, and use the default commands:
|
|
83
83
|
|
|
84
84
|
```bash
|
|
85
|
-
vp create
|
|
85
|
+
vp create # Create a new project
|
|
86
86
|
vp install # Install dependencies
|
|
87
|
-
vp dev
|
|
88
|
-
vp check
|
|
89
|
-
vp test
|
|
90
|
-
vp build
|
|
87
|
+
vp dev # Start the dev server
|
|
88
|
+
vp check # Format, lint, type-check
|
|
89
|
+
vp test # Run JavaScript tests
|
|
90
|
+
vp build # Build for production
|
|
91
91
|
```
|
|
92
92
|
|
|
93
93
|
You can also run `vp` on its own to open the interactive command line. In a local-only setup, run the same commands through your package manager, such as `pnpm exec vp check`.
|
|
@@ -100,9 +100,9 @@ Vite+ covers the full frontend development cycle, from starting a project throug
|
|
|
100
100
|
|
|
101
101
|
- [`vp create`](/guide/create) creates new apps, packages, and monorepos.
|
|
102
102
|
- [`vp migrate`](/guide/migrate) moves existing projects onto Vite+.
|
|
103
|
-
- [`vp install`](/guide/
|
|
104
|
-
- [`vp add`](/guide/
|
|
105
|
-
- [`vp link`](/guide/
|
|
103
|
+
- [`vp install`](/guide/package-management) installs dependencies with the right package manager.
|
|
104
|
+
- [`vp add`](/guide/package-management), [`vp remove`](/guide/package-management), [`vp update`](/guide/package-management), [`vp dedupe`](/guide/package-management), [`vp outdated`](/guide/package-management), [`vp list`](/guide/package-management), [`vp why`](/guide/package-management), and [`vp info`](/guide/package-management) cover the rest of the package-management workflow.
|
|
105
|
+
- [`vp link`](/guide/package-management), [`vp unlink`](/guide/package-management), [`vp rebuild`](/guide/package-management), and [`vp pm <command>`](/guide/package-management) provide lower-level package-manager operations.
|
|
106
106
|
|
|
107
107
|
### Project Toolchain
|
|
108
108
|
|
package/docs/guide/local-cli.md
CHANGED
|
@@ -39,33 +39,49 @@ The documentation uses bare `vp` commands for readability. Without the global CL
|
|
|
39
39
|
|
|
40
40
|
### Manual Installation
|
|
41
41
|
|
|
42
|
-
If you are manually migrating a project to Vite+, install
|
|
42
|
+
If you are manually migrating a project to Vite+, install `vite-plus` as a development dependency:
|
|
43
43
|
|
|
44
|
-
|
|
45
|
-
|
|
44
|
+
::: code-group
|
|
45
|
+
|
|
46
|
+
```bash [npm]
|
|
47
|
+
npm install -D vite-plus
|
|
46
48
|
```
|
|
47
49
|
|
|
48
|
-
|
|
50
|
+
```bash [Yarn]
|
|
51
|
+
yarn add -D vite-plus
|
|
52
|
+
```
|
|
53
|
+
|
|
54
|
+
```bash [pnpm]
|
|
55
|
+
pnpm add -D vite-plus
|
|
56
|
+
```
|
|
57
|
+
|
|
58
|
+
```bash [Bun]
|
|
59
|
+
bun add -D vite-plus
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
:::
|
|
63
|
+
|
|
64
|
+
Add overrides to your package manager so that other packages resolve the Vite+ versions. Alias `vite` to `@voidzero-dev/vite-plus-core`, setting `<vite-plus-version>` to the installed `vite-plus` version. Pin `vitest` to `<vitest-version>`, using the bundled version shown by `vp toolchain vitest` 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):
|
|
49
65
|
|
|
50
66
|
::: code-group
|
|
51
67
|
|
|
52
68
|
```yaml [pnpm-workspace.yaml]
|
|
53
69
|
overrides:
|
|
54
|
-
vite
|
|
55
|
-
vitest
|
|
70
|
+
vite@*: npm:@voidzero-dev/vite-plus-core@<vite-plus-version> # Match the installed vite-plus version
|
|
71
|
+
vitest@*: <vitest-version> # Match the version from vp toolchain vitest
|
|
56
72
|
```
|
|
57
73
|
|
|
58
74
|
```json [npm / Bun package.json]
|
|
59
75
|
"overrides": {
|
|
60
|
-
"vite": "npm:@voidzero-dev/vite-plus-core
|
|
61
|
-
"vitest": "
|
|
76
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@<vite-plus-version>",
|
|
77
|
+
"vitest": "<vitest-version>"
|
|
62
78
|
}
|
|
63
79
|
```
|
|
64
80
|
|
|
65
81
|
```json [Yarn package.json]
|
|
66
82
|
"resolutions": {
|
|
67
|
-
"vite": "npm:@voidzero-dev/vite-plus-core
|
|
68
|
-
"vitest": "
|
|
83
|
+
"vite": "npm:@voidzero-dev/vite-plus-core@<vite-plus-version>",
|
|
84
|
+
"vitest": "<vitest-version>"
|
|
69
85
|
}
|
|
70
86
|
```
|
|
71
87
|
|
|
@@ -111,7 +127,7 @@ The project-local CLI can be used independently for:
|
|
|
111
127
|
- [`vp pack`](/guide/pack) with tsdown
|
|
112
128
|
- [`vp toolchain`](/guide/upgrade#show-the-toolchain) for inspecting the versions bundled with the project-local package
|
|
113
129
|
- [`vp run`](/guide/run) and task caching across workspaces
|
|
114
|
-
- [package-manager commands](/guide/
|
|
130
|
+
- [package-manager commands](/guide/package-management) using the Node.js runtime already active in your shell
|
|
115
131
|
- [`vp create`](/guide/create), [`vp migrate`](/guide/migrate), and project configuration commands
|
|
116
132
|
|
|
117
133
|
The local package cannot manage the machine-level Vite+ installation. The `vp env`, `vp upgrade`, and `vp implode` commands require the [global CLI](/guide/global-cli). Upgrade or remove a local-only installation through your package manager.
|
|
@@ -7,7 +7,7 @@ Except for [Before You Migrate](#before-you-migrate), which lists steps you take
|
|
|
7
7
|
## Before You Migrate
|
|
8
8
|
|
|
9
9
|
1. Run `vp upgrade` so the global CLI has the latest migration rules. A stale local `vite-plus` is not a blocker: when the project's local copy is older, migration delegates to the global CLI.
|
|
10
|
-
2. Upgrade the project to Vite
|
|
10
|
+
2. Upgrade the project to Vite 7+ and Vitest 4+ when necessary.
|
|
11
11
|
3. Run `vp migrate` from the workspace root. Use `--no-interactive` in automated environments.
|
|
12
12
|
4. Review every changed manifest, package-manager config, source rewrite, and generated lockfile.
|
|
13
13
|
5. Validate with `vp install`, `vp check`, `vp test`, and `vp build`.
|
|
@@ -18,7 +18,7 @@ Migration is idempotent: running it again after a successful migration should no
|
|
|
18
18
|
|
|
19
19
|
On a project that already depends on `vite-plus`, `vp migrate` performs an upgrade only: it updates dependencies and package-manager configuration and finalizes imports. It does not touch project setup.
|
|
20
20
|
|
|
21
|
-
- `--full` also runs the setup actions: git hooks, editor config, agent files, ESLint and
|
|
21
|
+
- `--full` also runs the setup actions: git hooks, editor config, agent files, ESLint, Prettier, and tsup migration, framework shims, the tsconfig `baseUrl` fix, and the `.nvmrc`/Volta to `.node-version` conversion.
|
|
22
22
|
- `--hooks`, `--agent`, and `--editor` opt into a single setup action without `--full`.
|
|
23
23
|
|
|
24
24
|
When a default upgrade skips setup actions that would apply, it prints a hint to run `vp migrate --full`. Fresh (non Vite+) projects always run the full migration.
|
|
@@ -42,7 +42,7 @@ When a default upgrade skips setup actions that would apply, it prints a hint to
|
|
|
42
42
|
| `dts.cjsReexport` | Removed; tsdown generates CJS declarations separately |
|
|
43
43
|
| `--public-dir` in `tsdown` or `vp pack` scripts | `--copy` |
|
|
44
44
|
|
|
45
|
-
Migration preserves the previous defaults by setting `deps.resolveDepSubpath` to `true` when absent. Enabled ATTW checks receive `profile: 'strict'` when no profile is set. Explicit values, including `false`, remain unchanged.
|
|
45
|
+
Migration checks the project's installed tsdown version before the final dependency install. For Vite+ pack configs, it reads the installed `vite-plus/dist/toolchain.json`. This includes `tsdown.config.*` files that already import `vite-plus/pack` before migration rewrites imports. Standalone tsdown configs use their installed tsdown version. Older Vite+ installations without this manifest retain the legacy defaults. For tsdown 0.23 or later, it does not insert compatibility defaults. For older or unknown versions, it preserves the previous defaults by setting `deps.resolveDepSubpath` to `true` when absent. Enabled ATTW checks receive `profile: 'strict'` when no profile is set. Explicit values, including `false`, remain unchanged.
|
|
46
46
|
|
|
47
47
|
The inserted settings include comments with documentation links and instructions for adopting the new defaults. Remove `deps.resolveDepSubpath: true` to [preserve external subpath imports as written](https://tsdown.dev/options/dependencies#deps-resolvedepsubpath). Remove the inserted `attw.profile: 'strict'` to use the new `esm-only` [resolution profile](https://tsdown.dev/options/lint#profiles). This skips `node10` and CommonJS resolution checks. Keep either setting if your package requires the previous behavior. Migration does not add these comments to explicit settings.
|
|
48
48
|
|
|
@@ -96,6 +96,14 @@ With `cache: false`, the moved settings would have no effect, so decide whether
|
|
|
96
96
|
|
|
97
97
|
## Dependency Rules
|
|
98
98
|
|
|
99
|
+
Migration preserves the project's package-manager declaration policy. An
|
|
100
|
+
existing `packageManager` or `devEngines.packageManager` field remains the
|
|
101
|
+
source of truth, while a project that relies only on its lockfile remains
|
|
102
|
+
unpinned. In particular, migration does not turn the package-manager version
|
|
103
|
+
used for its own install into a new exact requirement for contributors or CI.
|
|
104
|
+
When migration infers an undeclared package manager, it prints a warning and
|
|
105
|
+
points to `vp env pin` for projects that want to opt into an explicit pin.
|
|
106
|
+
|
|
99
107
|
What happens to each toolchain dependency, at a glance:
|
|
100
108
|
|
|
101
109
|
| Dependency | What happens |
|
package/docs/guide/migrate.md
CHANGED
|
@@ -65,7 +65,7 @@ For the Vitest v5 upgrade, read the [compatibility settings and review checklist
|
|
|
65
65
|
|
|
66
66
|
Before running the migration:
|
|
67
67
|
|
|
68
|
-
- For projects that do not use Vite+ yet, upgrade to Vite
|
|
68
|
+
- For projects that do not use Vite+ yet, upgrade to Vite 7+ and Vitest 4+ first
|
|
69
69
|
- Make sure you understand any existing lint, format, or test setup that should be preserved
|
|
70
70
|
|
|
71
71
|
After running the migration:
|
|
@@ -95,21 +95,21 @@ Upgrade the [global CLI](./upgrade.md#global-vp) to your target 1.0 release, the
|
|
|
95
95
|
|
|
96
96
|
### Without the Global CLI
|
|
97
97
|
|
|
98
|
-
Use an existing Node.js runtime that satisfies `^22.18.0 || ^24.11.0 || >=26.0.0`. Run the target migrator through your package manager without adding it to the project first. For the `1.
|
|
98
|
+
Use an existing Node.js runtime that satisfies `^22.18.0 || ^24.11.0 || >=26.0.0`. Run the target migrator through your package manager without adding it to the project first. For the `1.2.0` release:
|
|
99
99
|
|
|
100
100
|
::: code-group
|
|
101
101
|
|
|
102
102
|
```bash [pnpm]
|
|
103
|
-
pnpm dlx --package=vite-plus@1.
|
|
103
|
+
pnpm dlx --package=vite-plus@1.2.0 vp migrate --no-interactive
|
|
104
104
|
```
|
|
105
105
|
|
|
106
106
|
```bash [npm]
|
|
107
|
-
npx --package=vite-plus@1.
|
|
107
|
+
npx --package=vite-plus@1.2.0 vp migrate --no-interactive
|
|
108
108
|
```
|
|
109
109
|
|
|
110
110
|
:::
|
|
111
111
|
|
|
112
|
-
Replace `1.
|
|
112
|
+
Replace `1.2.0` with your target release. For a preview, use the version from the PR and pass `--registry=https://registry-bridge.viteplus.dev` to `pnpm` or `npx` before the `vp` command. Keep the version in `--package` explicit so you run the target migrator rather than the old local CLI.
|
|
113
113
|
|
|
114
114
|
After migration, finish dependency installation and validate with the updated local CLI:
|
|
115
115
|
|
|
@@ -151,7 +151,7 @@ View and copy this prompt into your coding agent to upgrade an existing Vite+ 0.
|
|
|
151
151
|
|
|
152
152
|
### Vitest
|
|
153
153
|
|
|
154
|
-
Vitest is automatically migrated through `vp migrate`. `vite-plus` re-exports upstream `vitest@5.0.
|
|
154
|
+
Vitest is automatically migrated through `vp migrate`. `vite-plus` re-exports upstream `vitest@5.0.4` under `vite-plus/test*`, so for node-mode tests a single `vite-plus` install is enough — you no longer need to install `vitest` directly.
|
|
155
155
|
|
|
156
156
|
For browser mode, you can use the base browser runtime (`@vitest/browser`) and Preview provider (`@vitest/browser-preview`) included in `vite-plus`. To use Playwright or WebDriverIO, you also need the opt-in provider (`@vitest/browser-playwright` or `@vitest/browser-webdriverio`) and its framework peer (`playwright` or `webdriverio`).
|
|
157
157
|
|
|
@@ -163,9 +163,9 @@ If you are migrating manually, update all the imports to `vite-plus/test*` inste
|
|
|
163
163
|
|
|
164
164
|
```ts
|
|
165
165
|
// before
|
|
166
|
-
import { defineConfig } from 'vitest/config';
|
|
167
|
-
import { describe, expect, it, vi } from 'vitest';
|
|
168
166
|
import { playwright } from '@vitest/browser-playwright';
|
|
167
|
+
import { describe, expect, it, vi } from 'vitest';
|
|
168
|
+
import { defineConfig } from 'vitest/config';
|
|
169
169
|
|
|
170
170
|
const { page } = await import('@vitest/browser/context');
|
|
171
171
|
|
|
@@ -183,7 +183,7 @@ const { page } = await import('vite-plus/test/browser/context');
|
|
|
183
183
|
|
|
184
184
|
`vp migrate` updates supported static options in `pack` blocks and `tsdown.config.*` for tsdown 0.23. This also runs for existing Vite+ projects and workspace packages without `--full`. See [Pack Configuration](./migrate-rules.md#pack-configuration) for the option mappings and cases that require manual review.
|
|
185
185
|
|
|
186
|
-
|
|
186
|
+
When the project's installed tsdown version is older than 0.23 or cannot be determined, the transform preserves earlier defaults by inserting `deps.resolveDepSubpath: true` and, when ATTW checks are enabled, `attw.profile: 'strict'` if these settings are absent. For Vite+ pack configs, it reads the installed `vite-plus/dist/toolchain.json`. This includes `tsdown.config.*` files that already import `vite-plus/pack` before migration rewrites imports. Standalone tsdown configs use their installed tsdown version. Older Vite+ installations without this manifest retain the legacy defaults. Projects already using tsdown 0.23 or later do not receive these defaults. Each inserted setting includes a `tsdown <0.23 compatibility` comment with a documentation link and removal guidance. Explicit settings remain unchanged.
|
|
187
187
|
|
|
188
188
|
Keep these settings for the first `vp pack` run. After validation, review whether your package can adopt the new defaults:
|
|
189
189
|
|
|
@@ -220,7 +220,7 @@ After merging, delete `tsdown.config.ts`. See the [Pack guide](/guide/pack) for
|
|
|
220
220
|
|
|
221
221
|
### lint-staged
|
|
222
222
|
|
|
223
|
-
Vite+ replaces lint-staged with its own `staged` block in `vite.config.ts`.
|
|
223
|
+
Vite+ replaces lint-staged with its own `staged` block in `vite.config.ts`. `vp staged` reads its configuration from the `staged` block in `vite.config.ts`, not from standalone lint-staged configuration files. Standalone `.lintstagedrc` in non-JSON format and `lint-staged.config.*` are not migrated automatically.
|
|
224
224
|
|
|
225
225
|
Move your lint-staged rules into the `staged` block:
|
|
226
226
|
|
|
@@ -229,7 +229,7 @@ import { defineConfig } from 'vite-plus';
|
|
|
229
229
|
|
|
230
230
|
export default defineConfig({
|
|
231
231
|
staged: {
|
|
232
|
-
'
|
|
232
|
+
'*': 'vp check --fix',
|
|
233
233
|
},
|
|
234
234
|
});
|
|
235
235
|
```
|
|
@@ -61,14 +61,21 @@ vp install -w
|
|
|
61
61
|
|
|
62
62
|
## Global Packages
|
|
63
63
|
|
|
64
|
+
::: info
|
|
65
|
+
Global package operations with `-g` require the [global CLI](/guide/global-cli).
|
|
66
|
+
:::
|
|
67
|
+
|
|
64
68
|
Use the `-g` flag for installing, updating or removing globally installed packages:
|
|
65
69
|
|
|
66
70
|
- `vp install -g <pkg>` installs a package globally
|
|
71
|
+
- `vp install -g --node <version> <pkg>` installs a package globally with a specific Node.js version
|
|
67
72
|
- `vp uninstall -g <pkg>` removes a global package
|
|
68
73
|
- `vp update -g [pkg]` updates one global package or all of them
|
|
69
74
|
- `vp list -g [pkg]` lists global packages
|
|
70
75
|
- `vp outdated -g [pkg]` prints outdated packages
|
|
71
76
|
|
|
77
|
+
Without `--node`, `vp install -g` uses the Node.js version resolved for the current directory, so a project's pin takes precedence over `vp env default`. See [Node.js Selection](/guide/env#node-js-selection).
|
|
78
|
+
|
|
72
79
|
Updates keep the version spec a package was installed with: a package installed from a dist-tag (e.g. `vp install -g some-pkg@nightly`) updates to the newest version of that tag, and a version range stays within the range. Reinstall with a different spec (e.g. `vp update -g some-pkg@latest`) to switch, or pass `--latest` to `vp update -g` to move packages to the `latest` tag and clear their recorded specs. `vp outdated -g` reports both the newest version matching the recorded spec (`Wanted`) and the newest version on the `latest` tag.
|
|
73
80
|
|
|
74
81
|
::: warning
|
|
@@ -95,7 +102,11 @@ Vite+ provides all the familiar package management commands:
|
|
|
95
102
|
- `vp rebuild` rebuilds native modules (e.g. after switching Node.js versions)
|
|
96
103
|
- `vp link` and `vp unlink` manage local package links
|
|
97
104
|
- `vp dlx <pkg>` runs a package binary without adding it to the project
|
|
98
|
-
- `vp pm <command>`
|
|
105
|
+
- `vp pm <command>` provides additional package-management commands adapted to the detected package manager
|
|
106
|
+
|
|
107
|
+
::: info
|
|
108
|
+
The `vp list` and `vp rebuild` shortcuts are available only in the global CLI. With the [project-local CLI](/guide/local-cli), use `vp pm list` and `vp pm rebuild`.
|
|
109
|
+
:::
|
|
99
110
|
|
|
100
111
|
### Command Guide
|
|
101
112
|
|
|
@@ -112,6 +123,10 @@ Use `vp install` when you want to install exactly what the current `package.json
|
|
|
112
123
|
- `vp install --filter <pattern>` scopes install work in monorepos
|
|
113
124
|
- `vp install -w` installs in the workspace root
|
|
114
125
|
|
|
126
|
+
::: info
|
|
127
|
+
Option support depends on the detected package manager and its version. Unsupported options cause `vp` to exit with an error before running the package-manager command.
|
|
128
|
+
:::
|
|
129
|
+
|
|
115
130
|
##### Git and remote tarball dependencies (npm v12+)
|
|
116
131
|
|
|
117
132
|
npm v12 stops resolving git dependencies (`github:`, `git+https:`) and remote tarball URLs by default; such installs fail with `EALLOWGIT` / `EALLOWREMOTE`. Opt back in per project with npm's `allow-git` / `allow-remote` config.
|
|
@@ -191,7 +206,16 @@ Use these when you need lower-level package-manager behavior.
|
|
|
191
206
|
|
|
192
207
|
- `vp link` and `vp unlink` manage local development links
|
|
193
208
|
- `vp dlx create-vite` runs a package binary without saving it as a dependency
|
|
194
|
-
- `vp pm <command>`
|
|
209
|
+
- `vp pm <command>` provides additional package-management commands adapted to the detected package manager.
|
|
210
|
+
|
|
211
|
+
- **Dependencies**: `ci`, `prune`, `list`, `rebuild`, `approve-builds`
|
|
212
|
+
- **Patching**: `patch`, `patch-commit`
|
|
213
|
+
- **Packaging and publishing**: `pack`, `version`, `publish`, `stage`, `dist-tag`, `deprecate`
|
|
214
|
+
- **Inspection**: `view`, `search`, `audit`, `fund`, `ping`
|
|
215
|
+
- **Authentication and access**: `login`, `logout`, `whoami`, `token`, `owner`
|
|
216
|
+
- **Configuration**: `config`, `cache`
|
|
217
|
+
|
|
218
|
+
Command support depends on the package manager and its version. Run `vp pm --help` to list commands or `vp pm <command> --help` for available options.
|
|
195
219
|
|
|
196
220
|
Examples:
|
|
197
221
|
|
|
@@ -215,8 +239,8 @@ vp pm stage reject <stage-id> # discard a staged version (2FA)
|
|
|
215
239
|
```
|
|
216
240
|
|
|
217
241
|
- pnpm (`pnpm stage`, requires pnpm ≥ 11.3) and npm (`npm stage`, requires npm ≥ 11.15 and Node ≥ 22.14) pass through directly.
|
|
218
|
-
-
|
|
219
|
-
-
|
|
242
|
+
- Yarn 4.16.0 and later uses its npm plugin (`yarn npm publish --staged`, `yarn npm stage …`). The `view` and `download` subcommands, and `publish` with an explicit tarball or folder target, fall back to `npm stage`.
|
|
243
|
+
- Yarn versions earlier than 4.16.0 and Bun fall back to `npm stage`.
|
|
220
244
|
|
|
221
245
|
## Package-Manager Integrity Verification
|
|
222
246
|
|
package/docs/guide/run.md
CHANGED
|
@@ -32,12 +32,14 @@ building legacy app for production...
|
|
|
32
32
|
Use `vp run` without a task name to use the interactive task runner:
|
|
33
33
|
|
|
34
34
|
```
|
|
35
|
-
Select a task (↑/↓, Enter to run,
|
|
35
|
+
Select a task (↑/↓, Enter to run, type to search):
|
|
36
36
|
|
|
37
37
|
› build: node compile-legacy-app.js
|
|
38
38
|
test: jest
|
|
39
39
|
```
|
|
40
40
|
|
|
41
|
+
With [shell completion](/guide/env#shell-completion) enabled, press Tab after `vp run ` or `vpr ` to complete task names from your project.
|
|
42
|
+
|
|
41
43
|
## Built-in Commands vs Scripts
|
|
42
44
|
|
|
43
45
|
`vp dev` is a built-in command. `vp run dev` is your `dev` script. Built-in commands cannot be overwritten, so adding a `dev` script does not change what `vp dev` does:
|
|
@@ -69,7 +71,7 @@ $ node compile-legacy-app.js
|
|
|
69
71
|
If nothing changes, the output is replayed from the cache on the next run:
|
|
70
72
|
|
|
71
73
|
```
|
|
72
|
-
$ node compile-legacy-app.js
|
|
74
|
+
$ node compile-legacy-app.js ◉ cache hit, replaying
|
|
73
75
|
✓ built in 69s
|
|
74
76
|
|
|
75
77
|
---
|
|
@@ -79,7 +81,7 @@ vp run: cache hit, 69s saved.
|
|
|
79
81
|
If an input changes, the task runs again:
|
|
80
82
|
|
|
81
83
|
```
|
|
82
|
-
$ node compile-legacy-app.js
|
|
84
|
+
$ node compile-legacy-app.js ○ cache miss: 'legacy/index.js' modified, executing
|
|
83
85
|
```
|
|
84
86
|
|
|
85
87
|
## Task Definitions
|
|
@@ -250,18 +252,18 @@ $ vp build
|
|
|
250
252
|
✓ built in 28ms
|
|
251
253
|
|
|
252
254
|
---
|
|
253
|
-
vp run: 0/2 cache hit (0%).
|
|
255
|
+
vp run: 0/2 cache hit (0%), 2/2 successful.
|
|
254
256
|
```
|
|
255
257
|
|
|
256
|
-
Each sub-task has its own cache entry.
|
|
258
|
+
Each sub-task has its own cache entry. For example, if a file used only by the build changes, such as `index.html`, only the build runs again the next time `vp run --cache check` is called:
|
|
257
259
|
|
|
258
260
|
```
|
|
259
|
-
$ vp lint
|
|
260
|
-
$ vp build
|
|
261
|
+
$ vp lint ◉ cache hit, replaying
|
|
262
|
+
$ vp build ○ cache miss: 'index.html' modified, executing
|
|
261
263
|
✓ built in 30ms
|
|
262
264
|
|
|
263
265
|
---
|
|
264
|
-
vp run: 1/2 cache hit (50%), 120ms saved.
|
|
266
|
+
vp run: 1/2 cache hit (50%), 2/2 successful, 120ms saved.
|
|
265
267
|
```
|
|
266
268
|
|
|
267
269
|
### Nested `vp run`
|
package/docs/guide/test.md
CHANGED
|
@@ -2,7 +2,9 @@
|
|
|
2
2
|
|
|
3
3
|
`vp test` runs tests with [Vitest](https://vitest.dev).
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
Vite+ depends on Vitest `5.0.4`, which requires Node `^22.18.0 || ^24.11.0 || >=26.0.0`. For existing projects, follow [Upgrade to Vitest 5](./vitest-v5.md) before updating dependencies.
|
|
6
|
+
|
|
7
|
+
`vp test` resolves Vitest from `vite-plus`'s dependencies first, then from your project.
|
|
6
8
|
|
|
7
9
|
## Overview
|
|
8
10
|
|
|
@@ -3,15 +3,15 @@
|
|
|
3
3
|
Use this page when something in Vite+ is not behaving the way you expect.
|
|
4
4
|
|
|
5
5
|
::: info
|
|
6
|
-
Vite+ is
|
|
6
|
+
Vite+ 1.0 is available. We continue to improve it and welcome community feedback, so please [reach out](#asking-for-help) if something does not work as expected.
|
|
7
7
|
:::
|
|
8
8
|
|
|
9
9
|
## Supported Tool Versions
|
|
10
10
|
|
|
11
|
-
|
|
11
|
+
Automatic migration requires these minimum versions for existing Vite and Vitest dependencies:
|
|
12
12
|
|
|
13
|
-
- Vite
|
|
14
|
-
- Vitest 4
|
|
13
|
+
- Vite 7 or newer
|
|
14
|
+
- Vitest 4 or newer
|
|
15
15
|
|
|
16
16
|
If you are migrating an existing project and it still depends on older Vite or Vitest versions, upgrade those first before adopting Vite+.
|
|
17
17
|
|
|
@@ -22,7 +22,7 @@ Run `vp toolchain` to show the versions from the local Vite+ package. Run `vp to
|
|
|
22
22
|
- Confirm that `lint.options.typeAware` and `lint.options.typeCheck` are enabled in `vite.config.ts`
|
|
23
23
|
- Check whether your `tsconfig.json` still uses `compilerOptions.baseUrl`
|
|
24
24
|
|
|
25
|
-
The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`. `vp migrate` and `vp lint --init` try to run the `vp dlx @andrewbranch/ts5to6 --fixBaseUrl
|
|
25
|
+
The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`. `vp migrate` and `vp lint --init` try to run the `vp dlx @andrewbranch/ts5to6 --fixBaseUrl <tsconfig path>` fix before enabling type-aware linting. If that fix fails or is declined, Vite+ skips `typeAware` and `typeCheck`.
|
|
26
26
|
|
|
27
27
|
## Nested lint or format config is not applied
|
|
28
28
|
|
|
@@ -30,7 +30,7 @@ When running `vp lint`, `vp fmt`, or `vp check`, configs in subdirectories do no
|
|
|
30
30
|
|
|
31
31
|
Keep lint and format settings in the root `vite.config.ts`. Use [`lint.overrides`](/guide/monorepo#root-config-with-overrides) and [`fmt.overrides`](/guide/monorepo#format-overrides) for file- or package-specific settings. You can also [import configuration objects](/guide/monorepo#composing-configuration-files) into the root config to keep settings in separate files.
|
|
32
32
|
|
|
33
|
-
|
|
33
|
+
Configure your editor's linting and formatting to use the workspace-root `vite.config.ts`. See [IDE Integration](/guide/ide-integration) for editor-specific setup instructions.
|
|
34
34
|
|
|
35
35
|
We're holding off on applying nested configs to individual files for now. Some of the factors we're considering are how implicit config discovery affects the predictability of linting and formatting, what context AI agents need to understand the settings that apply, and the potential performance cost of finding and loading multiple configs. At the same time, we recognize that keeping package-specific context close to the code may have benefits. The use cases we've heard so far haven't given us a strong enough reason to commit to those semantics. Waiting leaves room to add support later, and we'd like to hear why your project needs nested configs, especially where root-level overrides fall short.
|
|
36
36
|
|
|
@@ -93,8 +93,8 @@ When `vite.config.ts` imports plugins at the top level, they are evaluated for e
|
|
|
93
93
|
Use `lazyPlugins` to skip the plugin factory when vite-plus loads your config only to read a metadata block (`lint`, `fmt`, `check`, `staged`, `pack`, `create`, the `run`/`cache` task lookup, and editor tooling). The plugins still load whenever Vite actually runs, `dev`, `build`, `test`, `preview`, and any build your own scripts spawn (a `vp run` task, `vp exec`):
|
|
94
94
|
|
|
95
95
|
```ts [vite.config.ts]
|
|
96
|
-
import { defineConfig, lazyPlugins } from 'vite-plus';
|
|
97
96
|
import myPlugin from 'vite-plugin-foo';
|
|
97
|
+
import { defineConfig, lazyPlugins } from 'vite-plus';
|
|
98
98
|
|
|
99
99
|
export default defineConfig({
|
|
100
100
|
plugins: lazyPlugins(() => [myPlugin()]),
|
|
@@ -114,6 +114,8 @@ export default defineConfig({
|
|
|
114
114
|
});
|
|
115
115
|
```
|
|
116
116
|
|
|
117
|
+
Import the plugin packages directly inside the callback. A dynamic `import()` of a local module, such as `await import('./vite.plugins.ts')`, does not avoid the cost: Vite bundles the config before loading it and follows dynamic imports of local files, so that module and the packages it imports are still processed on every command, even though the callback never runs.
|
|
118
|
+
|
|
117
119
|
## Asking for Help
|
|
118
120
|
|
|
119
121
|
If you are stuck, please reach out:
|
|
@@ -6,11 +6,7 @@ Updating `vite-plus` and its related project dependencies. To upgrade the global
|
|
|
6
6
|
|
|
7
7
|
The recommended way to update a project is to use `vp migrate`, which keeps the toolchain dependencies aligned.
|
|
8
8
|
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
```bash
|
|
12
|
-
./node_modules/.bin/vp migrate
|
|
13
|
-
```
|
|
9
|
+
Before updating the project's dependencies, [run the target migrator through your package manager](./migrate.md#without-the-global-cli).
|
|
14
10
|
|
|
15
11
|
If your global CLI is newer than the project's version, running `vp migrate` upgrades the project to that global version instead:
|
|
16
12
|
|
|
@@ -58,4 +54,4 @@ vp migrate
|
|
|
58
54
|
|
|
59
55
|
Migrate writes the bridge registry to `.npmrc`. For Yarn Berry, it writes the registry to `.yarnrc.yml`. It pins `vite-plus` and the `vite` alias to the matching `0.0.0-commit.<sha>` version. The `vite` alias points to `@voidzero-dev/vite-plus-core`. Commit the registry line if the project CI must test the preview.
|
|
60
56
|
|
|
61
|
-
After the install, run `vp toolchain` to show the selected versions. After testing, set `vite-plus` to `latest
|
|
57
|
+
After the install, run `vp toolchain` to show the selected versions. After testing, set `vite-plus` to `latest` and the `vite` alias to `npm:@voidzero-dev/vite-plus-core@latest` wherever they are declared. Remove the preview bridge setting from `.npmrc` or `.yarnrc.yml`, restoring any previous registry. Then run `vp install`.
|
package/docs/guide/upgrade.md
CHANGED
|
@@ -41,6 +41,12 @@ vp upgrade <version> # install a specific version
|
|
|
41
41
|
vp upgrade --registry <registry> # use a custom npm registry
|
|
42
42
|
```
|
|
43
43
|
|
|
44
|
+
### Automatic Update Checks
|
|
45
|
+
|
|
46
|
+
The global CLI checks for updates in the background during normal terminal use, caching results for 24 hours. When a newer version is available, it prints a notice to stderr without installing it.
|
|
47
|
+
|
|
48
|
+
Set `VP_NO_UPDATE_CHECK=1` to disable these checks and notices. They are also disabled in CI and for Homebrew installations.
|
|
49
|
+
|
|
44
50
|
### Move an Existing Install to the Split Directory Layout
|
|
45
51
|
|
|
46
52
|
Vite+ 0.3.0 is the first release that supports the split directory layout. Vite+ 0.2.x and earlier use the single-root layout for fresh installs and upgrades.
|
package/docs/guide/vitest-v5.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
# Upgrade to Vitest 5
|
|
2
2
|
|
|
3
|
-
Vite+ bundles Vitest `5.0.
|
|
3
|
+
Vite+ bundles Vitest `5.0.4`. Use Node `^22.18.0 || ^24.11.0 || >=26.0.0` for the CLI and tests.
|
|
4
4
|
|
|
5
5
|
## Before you migrate
|
|
6
6
|
|
|
@@ -126,7 +126,7 @@ Review calls with benchmark options, imported or reassigned callbacks, callback
|
|
|
126
126
|
|
|
127
127
|
## Entry points and packages
|
|
128
128
|
|
|
129
|
-
Use `vite-plus/test` for assertions and supported runner APIs. Keep coverage providers and `@vitest/ui` at the bundled runner's exact version, `5.0.
|
|
129
|
+
Use `vite-plus/test` for assertions and supported runner APIs. Keep coverage providers and `@vitest/ui` at the bundled runner's exact version, `5.0.4`. Keep `@vitest/web-worker` aligned when your project uses it.
|
|
130
130
|
|
|
131
131
|
| v4 import | v5 import or action |
|
|
132
132
|
| ---------------------------------------- | --------------------------------------------------------------------------- |
|