vite-plus 1.1.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.
Files changed (81) hide show
  1. package/LICENSE +29 -1
  2. package/binding/index.cjs +54 -54
  3. package/binding/index.d.cts +3 -0
  4. package/dist/{agent-eISuMXJb.js → agent-KeDc6vmg.js} +2 -2
  5. package/dist/bin.js +10 -10
  6. package/dist/command-DaRqSNpP.js +1 -0
  7. package/dist/comparison-CmVirWIW-DUGaiYqF.js +121 -0
  8. package/dist/config/bin.js +4 -4
  9. package/dist/{constants-CCQkpaxK.js → constants-BW3g7VnD.js} +3 -3
  10. package/dist/create/bin.d.ts +2 -1
  11. package/dist/create/bin.js +91 -23
  12. package/dist/{define-config-CeW9DETl.d.ts → define-config-Bexdd6RZ.d.ts} +1 -1
  13. package/dist/{define-config-Ro6PS4dP.js → define-config-CIlk9scU.js} +111 -6
  14. package/dist/{define-config-CREUiMmM.cjs → define-config-Dq_23Eyr.cjs} +89 -3
  15. package/dist/define-config.cjs +1 -1
  16. package/dist/define-config.d.ts +1 -1
  17. package/dist/define-config.js +1 -2
  18. package/dist/{dist-BsAzy8OW.js → dist-Bi7ZEK3c.js} +1 -2
  19. package/dist/dist-CBWGibx8.js +3 -0
  20. package/dist/{dist-DfmT__Aw.js → dist-Cqz8OtiO.js} +24 -21
  21. package/dist/{editor-B8tkz7nL.js → editor-b1XUwt9v.js} +30 -23
  22. package/dist/fmt.js +1 -2
  23. package/dist/hooks/bin.js +1 -1
  24. package/dist/{hooks-C-4gykWR.js → hooks-DhwsWb46.js} +34 -22
  25. package/dist/index.cjs +1 -1
  26. package/dist/index.d.ts +1 -1
  27. package/dist/index.js +1 -1
  28. package/dist/lint-plugins-dev.js +1 -2
  29. package/dist/lint-plugins.cjs +1 -1
  30. package/dist/lint-plugins.js +1 -2
  31. package/dist/migration/bin.js +17 -15
  32. package/dist/{oxlint-plugin-config-CbG58Kzr.js → oxlint-plugin-config-Dx-ZY2MN.js} +1 -1
  33. package/dist/oxlint-plugin.js +2 -2
  34. package/dist/pack-bin.js +2 -2
  35. package/dist/{package-BS84eWrW.js → package-BP16iQby.js} +1 -1
  36. package/dist/{package-overrides-CpoQngt3.js → package-overrides-D1RcXSFl.js} +1 -1
  37. package/dist/{prompts-ByOzbMBG.js → prompts-BGpQtC5z.js} +15 -14
  38. package/dist/resolve-vite-config-CGzlyhGr.js +1 -0
  39. package/dist/{resolve-vite-config-Be237LWp.js → resolve-vite-config-x47JetlI.js} +2 -2
  40. package/dist/staged/bin.js +2 -2
  41. package/dist/sync-versions/bin.js +4759 -3369
  42. package/dist/sync-versions/bin.mjs +4893 -3500
  43. package/dist/test/browser/providers/playwright.d.ts +7 -2
  44. package/dist/test/browser-playwright.d.ts +7 -2
  45. package/dist/toolchain.js +12 -12
  46. package/dist/toolchain.json +12 -12
  47. package/dist/tsconfig-C5PnJfW4.js +1 -0
  48. package/dist/{tsconfig-DzZ-nrx2.js → tsconfig-D2DzAQ_D.js} +2 -2
  49. package/dist/version.js +2 -2
  50. package/dist/versions.js +7 -7
  51. package/docs/config/run.md +9 -5
  52. package/docs/config/staged.md +1 -1
  53. package/docs/guide/automatic-data-tracking.md +7 -6
  54. package/docs/guide/cache.md +3 -3
  55. package/docs/guide/check.md +7 -7
  56. package/docs/guide/commit-hooks.md +3 -1
  57. package/docs/guide/create.md +14 -4
  58. package/docs/guide/env.md +9 -2
  59. package/docs/guide/github-actions-cache.md +1 -1
  60. package/docs/guide/global-cli.md +36 -10
  61. package/docs/guide/ide-integration.md +1 -1
  62. package/docs/guide/index.md +8 -8
  63. package/docs/guide/local-cli.md +20 -4
  64. package/docs/guide/migrate-rules.md +3 -3
  65. package/docs/guide/migrate.md +9 -9
  66. package/docs/guide/{install.md → package-management.md} +25 -4
  67. package/docs/guide/run.md +10 -8
  68. package/docs/guide/test.md +3 -1
  69. package/docs/guide/troubleshooting.md +7 -5
  70. package/docs/guide/upgrade-project.md +1 -5
  71. package/docs/guide/upgrade.md +6 -0
  72. package/docs/guide/vitest-v5.md +2 -2
  73. package/docs/guide/vpx.md +3 -3
  74. package/package.json +30 -29
  75. package/templates/generator/bin/index.ts +0 -0
  76. package/templates/generator/package.json +2 -2
  77. package/templates/generator/src/template.ts +1 -0
  78. package/dist/command-CLJK5jGW.js +0 -2
  79. package/dist/dist-DUsqQuw8.js +0 -6774
  80. package/dist/resolve-vite-config-CofpYgnY.js +0 -2
  81. package/dist/tsconfig-3ONY2k2K.js +0 -2
@@ -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
- const top = window.scrollY + target.getBoundingClientRect().top - getScrollOffset()
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. On Unix, it uses `~/.local/share/vite-plus` and its Vite+-owned `bin` subdirectory. On Windows, it uses `%LOCALAPPDATA%\vite-plus\data` and `%LOCALAPPDATA%\vite-plus\bin`.
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. They use `VP_DUMP_DIRS=1` to get the layout mode and all five `EnvConfig` category roots from the selected binary. They do not resolve the directory variables. The installers set `VP_INSTALL_STOP`; do not set it manually.
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 bypass
255
- - **Default**: None
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/install) covers pnpm, npm, Yarn, and Bun workflows.
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 Zed through editor-specific settings that `vp create` and `vp migrate` can automatically write into your project.
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
 
@@ -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 # Create a new project
85
+ vp create # Create a new project
86
86
  vp install # Install dependencies
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
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/install) installs dependencies with the right package manager.
104
- - [`vp add`](/guide/install), [`vp remove`](/guide/install), [`vp update`](/guide/install), [`vp dedupe`](/guide/install), [`vp outdated`](/guide/install), [`vp list`](/guide/install), [`vp why`](/guide/install), and [`vp info`](/guide/install) cover the rest of the package-management workflow.
105
- - [`vp link`](/guide/install), [`vp unlink`](/guide/install), [`vp rebuild`](/guide/install), and [`vp pm <command>`](/guide/install) provide lower-level package-manager operations.
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
 
@@ -39,12 +39,28 @@ 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 these dev dependencies first:
42
+ If you are manually migrating a project to Vite+, install `vite-plus` as a development dependency:
43
43
 
44
- ```bash
45
- vp install -D vite-plus
44
+ ::: code-group
45
+
46
+ ```bash [npm]
47
+ npm install -D vite-plus
46
48
  ```
47
49
 
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
+
48
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
@@ -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/install) using the Node.js runtime already active in your shell
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 8+ and Vitest 4.1+ when necessary.
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 Prettier migration, framework shims, the tsconfig `baseUrl` fix, and the `.nvmrc`/Volta to `.node-version` conversion.
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
 
@@ -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 8+ and Vitest 4.1+ first
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.1.0` release:
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.1.0 vp migrate --no-interactive
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.1.0 vp migrate --no-interactive
107
+ npx --package=vite-plus@1.2.0 vp migrate --no-interactive
108
108
  ```
109
109
 
110
110
  :::
111
111
 
112
- Replace `1.1.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.
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.3` under `vite-plus/test*`, so for node-mode tests a single `vite-plus` install is enough — you no longer need to install `vitest` directly.
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
 
@@ -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
- The transform preserves earlier defaults by inserting `deps.resolveDepSubpath: true` and, when ATTW checks are enabled, `attw.profile: 'strict'` if these settings are absent. Each inserted setting includes a `tsdown <0.23 compatibility` comment with a documentation link and removal guidance. Explicit settings remain unchanged.
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`. Only the `staged` config format is supported. Standalone `.lintstagedrc` in non-JSON format and `lint-staged.config.*` are not migrated automatically.
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
- '*.{js,ts,tsx,vue,svelte}': 'vp check --fix',
232
+ '*': 'vp check --fix',
233
233
  },
234
234
  });
235
235
  ```
@@ -61,6 +61,10 @@ 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
@@ -98,7 +102,11 @@ Vite+ provides all the familiar package management commands:
98
102
  - `vp rebuild` rebuilds native modules (e.g. after switching Node.js versions)
99
103
  - `vp link` and `vp unlink` manage local package links
100
104
  - `vp dlx <pkg>` runs a package binary without adding it to the project
101
- - `vp pm <command>` forwards a raw package-manager-specific command when you need behavior outside the normalized `vp` command set
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
+ :::
102
110
 
103
111
  ### Command Guide
104
112
 
@@ -115,6 +123,10 @@ Use `vp install` when you want to install exactly what the current `package.json
115
123
  - `vp install --filter <pattern>` scopes install work in monorepos
116
124
  - `vp install -w` installs in the workspace root
117
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
+
118
130
  ##### Git and remote tarball dependencies (npm v12+)
119
131
 
120
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.
@@ -194,7 +206,16 @@ Use these when you need lower-level package-manager behavior.
194
206
 
195
207
  - `vp link` and `vp unlink` manage local development links
196
208
  - `vp dlx create-vite` runs a package binary without saving it as a dependency
197
- - `vp pm <command>` forwards directly to the resolved package manager
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.
198
219
 
199
220
  Examples:
200
221
 
@@ -218,8 +239,8 @@ vp pm stage reject <stage-id> # discard a staged version (2FA)
218
239
  ```
219
240
 
220
241
  - pnpm (`pnpm stage`, requires pnpm ≥ 11.3) and npm (`npm stage`, requires npm ≥ 11.15 and Node ≥ 22.14) pass through directly.
221
- - yarn (Berry) uses its npm plugin (`yarn npm publish --staged`, `yarn npm stage …`); `view`/`download` fall back to npm.
222
- - yarn Classic and bun have no staged-publishing support and fall back to `npm stage`.
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`.
223
244
 
224
245
  ## Package-Manager Integrity Verification
225
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, Esc to clear):
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 ✓ cache hit, replaying
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 ✗ cache miss: 'legacy/index.js' modified, executing
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. If only `.ts` files changed but lint still passes, only `vp build` runs again the next time `vp run --cache check` is called:
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 ✓ cache hit, replaying
260
- $ vp build ✗ cache miss: 'src/index.ts' modified, executing
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`
@@ -2,7 +2,9 @@
2
2
 
3
3
  `vp test` runs tests with [Vitest](https://vitest.dev).
4
4
 
5
- The bundled runner uses Vitest `5.0.3` and 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.
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
 
@@ -8,10 +8,10 @@ Vite+ 1.0 is available. We continue to improve it and welcome community feedback
8
8
 
9
9
  ## Supported Tool Versions
10
10
 
11
- Vite+ expects modern upstream tool versions.
11
+ Automatic migration requires these minimum versions for existing Vite and Vitest dependencies:
12
12
 
13
- - Vite 8 or newer
14
- - Vitest 4.1 or newer
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 .` fix before enabling type-aware linting. If that fix fails or is declined, Vite+ skips `typeAware` and `typeCheck`.
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
- For IDE integration, `disableNestedConfig` and `fmt.disableNestedConfig` disable per-file nested lint and format configs. See [IDE Integration](/guide/ide-integration) for setup instructions for your editor.
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
 
@@ -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
- After updating the project's `vite-plus` dependency, run the local CLI to align the toolchain versions:
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
 
@@ -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.
@@ -1,6 +1,6 @@
1
1
  # Upgrade to Vitest 5
2
2
 
3
- Vite+ bundles Vitest `5.0.3`. Use Node `^22.18.0 || ^24.11.0 || >=26.0.0` for the CLI and tests.
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.3`. Keep `@vitest/web-worker` aligned when your project uses it.
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
  | ---------------------------------------- | --------------------------------------------------------------------------- |
package/docs/guide/vpx.md CHANGED
@@ -8,8 +8,8 @@ Use `vpx`, `vp exec`, and `vp dlx` to run binaries without switching between loc
8
8
 
9
9
  Use the other binary commands when you need stricter control:
10
10
 
11
- - `vpx` resolves a package binary locally first by default and downloads it if not found; with `pkg@version`, `--package/-p`, or `--shell-mode`, it runs via `vp dlx`
12
- - `vp exec` runs a binary from the current project's `node_modules/.bin`
11
+ - `vpx` looks for a binary in local `node_modules/.bin` directories, Vite+-managed global packages, and system `PATH`, in that order, then falls back to `vp dlx`. With `pkg@version`, `--package/-p`, or `--shell-mode`, it runs via `vp dlx` directly.
12
+ - `vp exec` runs a command from local `node_modules/.bin` directories, falling back to `PATH` if not found
13
13
  - `vp dlx` runs a package binary without adding it as a dependency
14
14
 
15
15
  ## `vpx`
@@ -37,7 +37,7 @@ vpx -p cowsay -c 'echo "hi" | cowsay'
37
37
 
38
38
  ## `vp exec`
39
39
 
40
- Use `vp exec` when the binary must come from the current project, for example a binary from a dependency installed in `node_modules/.bin`.
40
+ Use `vp exec` to run tools already installed in your project or available in your environment.
41
41
 
42
42
  ```bash
43
43
  vp exec <command> [args...]