vite-plus 0.1.23 → 0.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 (174) hide show
  1. package/LICENSE +30 -0
  2. package/README.md +8 -6
  3. package/bin/oxfmt +5 -2
  4. package/bin/oxlint +12 -2
  5. package/binding/index.cjs +84 -67
  6. package/binding/index.d.cts +155 -4
  7. package/dist/{agent-aSGY0osq.js → agent-BD31CsvU.js} +969 -89
  8. package/dist/bin.js +29 -33
  9. package/dist/{compat-DXZgnEyq.js → compat-Cql3K40m.js} +1 -1
  10. package/dist/config/bin.js +30 -14
  11. package/dist/constants-CrfJQIUX.js +66 -0
  12. package/dist/create/bin.d.ts +7 -1
  13. package/dist/create/bin.js +578 -266
  14. package/dist/define-config-2tfJoXr1.d.ts +305 -0
  15. package/dist/define-config-BGSjF6Xp.cjs +488 -0
  16. package/dist/define-config-DJUehepE.js +445 -0
  17. package/dist/define-config.cjs +8 -1
  18. package/dist/define-config.d.ts +2 -2
  19. package/dist/define-config.js +2 -2
  20. package/dist/dist-DRJUd9bL.js +3 -0
  21. package/dist/{dist-BgQuvbtq.js → dist-Oxo16Y0q.js} +4 -4
  22. package/dist/index.cjs +9 -4
  23. package/dist/index.d.ts +3 -3
  24. package/dist/index.js +3 -3
  25. package/dist/{main-DpJl3LoU.js → json-Dn87fvjk.js} +137 -1
  26. package/dist/migration/bin.js +301 -84
  27. package/dist/{oxlint-plugin-config-B89iKTKN.js → oxlint-plugin-config-q8a5PFch.js} +1 -1
  28. package/dist/oxlint-plugin.js +11 -3
  29. package/dist/pack-bin.js +44 -15
  30. package/dist/{package-PmBUZ-ve.js → package-BHirM1_v.js} +3 -138
  31. package/dist/{report-DgSBQUdz.js → report-BHSkWqRR.js} +2 -0
  32. package/dist/{resolve-vite-config-TTvhycU1.js → resolve-vite-config-CmdsfQzS.js} +13 -4
  33. package/dist/staged/bin.js +150 -417
  34. package/dist/test/_at-vitest-browser/context.d.ts +2 -0
  35. package/dist/test/_at-vitest-browser.d.ts +2 -0
  36. package/dist/test/browser/context.d.ts +2 -2
  37. package/dist/test/browser/context.js +1 -1
  38. package/dist/test/browser/providers/playwright/context.d.ts +1 -0
  39. package/dist/test/browser/providers/playwright/context.js +1 -0
  40. package/dist/test/browser/providers/playwright.d.ts +124 -2
  41. package/dist/test/browser/providers/playwright.js +1 -1
  42. package/dist/test/browser/providers/preview/context.d.ts +1 -0
  43. package/dist/test/browser/providers/preview/context.js +1 -0
  44. package/dist/test/browser/providers/preview.d.ts +32 -2
  45. package/dist/test/browser/providers/preview.js +1 -1
  46. package/dist/test/browser/providers/webdriverio/context.d.ts +1 -0
  47. package/dist/test/browser/providers/webdriverio/context.js +1 -0
  48. package/dist/test/browser/providers/webdriverio.d.ts +77 -2
  49. package/dist/test/browser/providers/webdriverio.js +1 -1
  50. package/dist/test/browser-compat.d.ts +2 -0
  51. package/dist/test/browser-compat.js +1 -1
  52. package/dist/test/browser-playwright/context.d.ts +1 -0
  53. package/dist/test/browser-playwright/context.js +1 -0
  54. package/dist/test/browser-playwright.d.ts +124 -2
  55. package/dist/test/browser-playwright.js +1 -1
  56. package/dist/test/browser-preview/context.d.ts +1 -0
  57. package/dist/test/browser-preview/context.js +1 -0
  58. package/dist/test/browser-preview.d.ts +32 -2
  59. package/dist/test/browser-preview.js +1 -1
  60. package/dist/test/browser-webdriverio/context.d.ts +1 -0
  61. package/dist/test/browser-webdriverio/context.js +1 -0
  62. package/dist/test/browser-webdriverio.d.ts +77 -2
  63. package/dist/test/browser-webdriverio.js +1 -1
  64. package/dist/test/browser.d.ts +2 -2
  65. package/dist/test/browser.js +1 -1
  66. package/dist/test/client.js +1 -1
  67. package/dist/test/config.cjs +1 -1
  68. package/dist/test/config.d.ts +2 -2
  69. package/dist/test/config.js +1 -1
  70. package/dist/test/context.d.ts +942 -2
  71. package/dist/test/context.js +1 -1
  72. package/dist/test/coverage.d.ts +2 -2
  73. package/dist/test/coverage.js +1 -1
  74. package/dist/test/environments.d.ts +2 -2
  75. package/dist/test/environments.js +1 -1
  76. package/dist/test/globals.d.ts +2 -2
  77. package/dist/test/import-meta.d.ts +2 -2
  78. package/dist/test/importMeta.d.ts +2 -2
  79. package/dist/test/index.cjs +1 -1
  80. package/dist/test/index.d.cts +2 -2
  81. package/dist/test/index.d.ts +2 -2
  82. package/dist/test/index.js +1 -1
  83. package/dist/test/internal/browser.d.ts +2 -2
  84. package/dist/test/internal/browser.js +1 -1
  85. package/dist/test/jsdom.d.ts +2 -2
  86. package/dist/test/locators.d.ts +294 -0
  87. package/dist/test/locators.js +1 -1
  88. package/dist/test/matchers.d.ts +29 -0
  89. package/dist/test/matchers.js +1 -1
  90. package/dist/test/node.d.ts +2 -2
  91. package/dist/test/node.js +1 -1
  92. package/dist/test/optional-runtime-types.js.d.ts +2 -2
  93. package/dist/test/optional-types.js.d.ts +2 -2
  94. package/dist/test/plugins/browser-client.js +1 -1
  95. package/dist/test/plugins/browser-context.js +1 -1
  96. package/dist/test/plugins/browser-locators.js +1 -1
  97. package/dist/test/plugins/browser-playwright.js +1 -1
  98. package/dist/test/plugins/browser-preview.js +1 -1
  99. package/dist/test/plugins/browser-webdriverio.js +1 -1
  100. package/dist/test/plugins/browser.js +1 -1
  101. package/dist/test/plugins/expect.js +1 -1
  102. package/dist/test/plugins/mocker-automock.js +1 -1
  103. package/dist/test/plugins/mocker-browser.js +1 -1
  104. package/dist/test/plugins/mocker-node.js +1 -1
  105. package/dist/test/plugins/mocker-redirect.js +1 -1
  106. package/dist/test/plugins/mocker-register.js +1 -1
  107. package/dist/test/plugins/mocker-transforms.js +1 -1
  108. package/dist/test/plugins/mocker.js +1 -1
  109. package/dist/test/plugins/pretty-format.js +1 -1
  110. package/dist/test/plugins/runner-types.js +1 -1
  111. package/dist/test/plugins/runner-utils.js +1 -1
  112. package/dist/test/plugins/runner.js +1 -1
  113. package/dist/test/plugins/snapshot-environment.js +1 -1
  114. package/dist/test/plugins/snapshot-manager.js +1 -1
  115. package/dist/test/plugins/snapshot.js +1 -1
  116. package/dist/test/plugins/spy.js +1 -1
  117. package/dist/test/plugins/utils-constants.js +1 -1
  118. package/dist/test/plugins/utils-diff.js +1 -1
  119. package/dist/test/plugins/utils-display.js +1 -1
  120. package/dist/test/plugins/utils-error.js +1 -1
  121. package/dist/test/plugins/utils-helpers.js +1 -1
  122. package/dist/test/plugins/utils-offset.js +1 -1
  123. package/dist/test/plugins/utils-resolver.js +1 -1
  124. package/dist/test/plugins/utils-serialize.js +1 -1
  125. package/dist/test/plugins/utils-source-map-node.js +1 -1
  126. package/dist/test/plugins/utils-source-map.js +1 -1
  127. package/dist/test/plugins/utils-timers.js +1 -1
  128. package/dist/test/plugins/utils.js +1 -1
  129. package/dist/test/reporters.d.ts +2 -2
  130. package/dist/test/reporters.js +1 -1
  131. package/dist/test/runners.d.ts +2 -2
  132. package/dist/test/runners.js +1 -1
  133. package/dist/test/runtime.d.ts +2 -2
  134. package/dist/test/runtime.js +1 -1
  135. package/dist/test/snapshot.d.ts +2 -2
  136. package/dist/test/snapshot.js +1 -1
  137. package/dist/test/suite.d.ts +2 -2
  138. package/dist/test/suite.js +1 -1
  139. package/dist/test/utils.js +1 -1
  140. package/dist/test/worker.d.ts +2 -2
  141. package/dist/test/worker.js +1 -1
  142. package/dist/{tsconfig-DlUVXT3J.js → tsconfig-CJ_StdFc.js} +605 -263
  143. package/dist/tsgolint-path-B-yOos8p.js +32 -0
  144. package/dist/tsgolint-path.d.ts +8 -0
  145. package/dist/tsgolint-path.js +2 -0
  146. package/dist/version.js +3 -3
  147. package/dist/versions.d.ts +1 -1
  148. package/dist/versions.js +7 -7
  149. package/dist/{workspace-DElv730L.js → workspace-Cjoc1c_A.js} +20 -18
  150. package/docs/_data/team.ts +5 -4
  151. package/docs/config/create.md +36 -1
  152. package/docs/config/index.md +7 -5
  153. package/docs/guide/commit-hooks.md +9 -0
  154. package/docs/guide/create.md +106 -2
  155. package/docs/guide/env.md +33 -5
  156. package/docs/guide/index.md +9 -3
  157. package/docs/guide/install.md +46 -10
  158. package/docs/guide/migrate.md +13 -3
  159. package/docs/guide/troubleshooting.md +3 -29
  160. package/docs/guide/upgrade.md +36 -6
  161. package/docs/package.json +3 -3
  162. package/docs/pnpm-lock.yaml +298 -395
  163. package/package.json +104 -56
  164. package/templates/generator/bin/index.ts +6 -3
  165. package/templates/generator/package.json +2 -3
  166. package/templates/generator/src/template.ts +0 -2
  167. package/templates/monorepo/package.json +1 -1
  168. package/dist/constants-DCBWlNrn.js +0 -33
  169. package/dist/define-config-BR1Y88zz.cjs +0 -84
  170. package/dist/define-config-BRC7qPNE.js +0 -21
  171. package/dist/define-config-COdn-tsn.d.ts +0 -177
  172. package/dist/dist-Bapm49IR.js +0 -3
  173. package/dist/test/plugins/utils-highlight.js +0 -1
  174. /package/dist/{chunk-DnnnRqeS.js → rolldown-runtime-DnnnRqeS.js} +0 -0
@@ -9,18 +9,37 @@ Use Vite+ to manage dependencies across pnpm, npm, Yarn, and Bun. Instead of swi
9
9
  Vite+ detects the package manager from the workspace root in this order:
10
10
 
11
11
  1. `packageManager` in `package.json`
12
- 2. `pnpm-workspace.yaml`
13
- 3. `pnpm-lock.yaml`
14
- 4. `yarn.lock` or `.yarnrc.yml`
15
- 5. `package-lock.json`
16
- 6. `bun.lock` or `bun.lockb`
17
- 7. `.pnpmfile.cjs` or `pnpmfile.cjs`
18
- 8. `bunfig.toml`
19
- 9. `yarn.config.cjs`
12
+ 2. `devEngines.packageManager` in `package.json`
13
+ 3. `pnpm-workspace.yaml`
14
+ 4. `pnpm-lock.yaml`
15
+ 5. `yarn.lock` or `.yarnrc.yml`
16
+ 6. `package-lock.json`
17
+ 7. `bun.lock` or `bun.lockb`
18
+ 8. `.pnpmfile.cjs` or `pnpmfile.cjs`
19
+ 9. `bunfig.toml`
20
+ 10. `yarn.config.cjs`
21
+
22
+ If none of those files are present, `vp` falls back to `pnpm` by default. Vite+ automatically downloads the matching package manager and uses it for the command you ran. When detection comes from lockfiles or config files, the resolved version is written to `devEngines.packageManager` so future runs are deterministic; projects that already declare `packageManager` or `devEngines.packageManager` are left as-is.
23
+
24
+ The [`devEngines.packageManager`](https://docs.npmjs.com/cli/v11/configuring-npm/package-json#devengines) field accepts a single object or an array of objects, and its `version` may be a semver range:
25
+
26
+ ```json
27
+ {
28
+ "devEngines": {
29
+ "packageManager": {
30
+ "name": "pnpm",
31
+ "version": "^11.0.0",
32
+ "onFail": "download"
33
+ }
34
+ }
35
+ }
36
+ ```
37
+
38
+ A range resolves to an already-downloaded satisfying version when possible, otherwise to the latest satisfying version from the npm registry. The range itself stays the source of truth; Vite+ never freezes it into an exact `packageManager` pin. When both `packageManager` and `devEngines.packageManager` are declared, the `packageManager` field drives selection and Vite+ warns when it does not satisfy the devEngines constraint (`vp env doctor` shows details).
20
39
 
21
- If none of those files are present, `vp` falls back to `pnpm` by default. Vite+ automatically downloads the matching package manager and uses it for the command you ran.
40
+ Vite+ currently downloads the declared package manager (the `onFail: "download"` behavior); the other `onFail` values are accepted but not yet differentiated.
22
41
 
23
- The explicit `packageManager` field also affects matching package-manager shims. If a project has `packageManager: "npm@10.9.4"`, `npm` and `npx` use npm 10.9.4. Other generated alias pairs behave the same way: `pnpm`/`pnpx`, `yarn`/`yarnpkg`, and `bun`/`bunx`. Mismatched tools are not translated; `npm` in a `pnpm` project still resolves as npm.
42
+ The explicit `packageManager` field (or the `devEngines.packageManager` declaration) also affects matching package-manager shims. If a project has `packageManager: "npm@10.9.4"`, `npm` and `npx` use npm 10.9.4. Other generated alias pairs behave the same way: `pnpm`/`pnpx`, `yarn`/`yarnpkg`, and `bun`/`bunx`. Mismatched tools are not translated; `npm` in a `pnpm` project still resolves as npm.
24
43
 
25
44
  ## Usage
26
45
 
@@ -151,3 +170,20 @@ vp pm config get registry
151
170
  vp pm cache clean --force
152
171
  vp pm exec tsc --version
153
172
  ```
173
+
174
+ #### Staged publishing
175
+
176
+ `vp pm stage` exposes [npm's staged publishing](https://docs.npmjs.com/staged-publishing) workflow: a build is uploaded to a staging area (no 2FA, CI-friendly), then a maintainer approves or rejects it from a trusted device (2FA). It adapts to the detected package manager.
177
+
178
+ ```bash
179
+ vp pm stage publish # upload the package to staging (no 2FA)
180
+ vp pm stage list # list staged versions
181
+ vp pm stage view <stage-id> # inspect a staged version
182
+ vp pm stage download <stage-id> # download the staged tarball
183
+ vp pm stage approve <stage-id> # promote to the live registry (2FA)
184
+ vp pm stage reject <stage-id> # discard a staged version (2FA)
185
+ ```
186
+
187
+ - pnpm (`pnpm stage`, requires pnpm ≥ 11.3) and npm (`npm stage`, requires npm ≥ 11.15 and Node ≥ 22.14) pass through directly.
188
+ - yarn (Berry) uses its npm plugin (`yarn npm publish --staged`, `yarn npm stage …`); `view`/`download` fall back to npm.
189
+ - yarn Classic and bun have no staged-publishing support and fall back to `npm stage`.
@@ -75,8 +75,8 @@ Migrate this project to Vite+. Vite+ replaces the current split tooling around r
75
75
  After the migration:
76
76
 
77
77
  - Confirm `vite` imports were rewritten to `vite-plus` where needed
78
- - Confirm `vitest` imports were rewritten to `vite-plus/test` where needed
79
- - Remove old `vite` and `vitest` dependencies only after those rewrites are confirmed
78
+ - Confirm `vitest` imports were rewritten to `vite-plus/test` (and `@vitest/browser*` to `vite-plus/test/browser*`) where needed
79
+ - Remove old `vite`, `vitest`, and `@vitest/browser*` dependencies only after those rewrites are confirmed — `vite-plus` ships them as direct deps
80
80
  - Move remaining tool-specific config into the appropriate blocks in `vite.config.ts`
81
81
 
82
82
  Command mapping to keep in mind:
@@ -96,20 +96,30 @@ Summarize the migration at the end and report any manual follow-up still require
96
96
 
97
97
  ### Vitest
98
98
 
99
- Vitest is automatically migrated through `vp migrate`. If you are migrating manually, you have to update all the imports to `vite-plus/test` instead:
99
+ Vitest is automatically migrated through `vp migrate`. `vite-plus` re-exports upstream `vitest@4.x` under `vite-plus/test*`, so for node-mode tests a single `vite-plus` install is enough — you no longer need to install `vitest` directly.
100
+
101
+ Browser mode is more nuanced. `vite-plus` bundles the base browser runtime (`@vitest/browser`) and the preview provider (`@vitest/browser-preview`), but the **Playwright** and **WebdriverIO** providers stay opt-in: `@vitest/browser-playwright` (with its `playwright` peer) and `@vitest/browser-webdriverio` (with its `webdriverio` peer) are **not** shipped with `vite-plus`, so non-browser projects never pull them in. `vp migrate` detects the provider you actually use and adds it — pinned to the bundled vitest version — together with its framework. If you migrate manually and use one of these providers, install the provider package and its framework yourself so `vite-plus/test/browser-playwright` / `vite-plus/test/browser-webdriverio` can resolve.
102
+
103
+ If you are migrating manually, update all the imports to `vite-plus/test*` instead:
100
104
 
101
105
  ```ts
102
106
  // before
107
+ import { defineConfig } from 'vitest/config';
103
108
  import { describe, expect, it, vi } from 'vitest';
109
+ import { playwright } from '@vitest/browser-playwright';
104
110
 
105
111
  const { page } = await import('@vitest/browser/context');
106
112
 
107
113
  // after
114
+ import { defineConfig } from 'vite-plus';
108
115
  import { describe, expect, it, vi } from 'vite-plus/test';
116
+ import { playwright } from 'vite-plus/test/browser-playwright';
109
117
 
110
118
  const { page } = await import('vite-plus/test/browser/context');
111
119
  ```
112
120
 
121
+ `declare module 'vitest'` / `declare module '@vitest/browser*'` augmentations are intentionally **not** rewritten — `vite-plus/test*` is a thin re-export of upstream `vitest*`, so type augmentations have to target the upstream module identity to merge correctly. Leave those `declare module` statements pointing at `'vitest'` / `'@vitest/browser*'`.
122
+
113
123
  ### tsdown
114
124
 
115
125
  If your project uses a `tsdown.config.ts`, move its options into the `pack` block in `vite.config.ts`:
@@ -25,37 +25,11 @@ The Oxlint type checker path powered by `tsgolint` does not support `baseUrl`.
25
25
  fix before enabling type-aware linting. If that fix fails or is declined, Vite+
26
26
  skips `typeAware` and `typeCheck`.
27
27
 
28
- ## `vp lint` / `vp fmt` may fail to read `vite.config.ts`
29
-
30
- `vp lint`, `vp fmt`, and the Oxc VS Code extension all read the `lint` / `fmt` blocks from `vite.config.ts`. Today that support has important limitations.
31
-
32
- ### What is currently supported
33
-
34
- - Static object export:
35
- - `export default { ... }`
36
- - `export default defineConfig({ ... })`
37
-
38
- ### What can fail in current integrations
39
-
40
- - Functional or async config:
41
- - `defineConfig((env) => ({ ... }))`
42
- - `defineConfig(async (env) => ({ ... }))`
43
- - Config files that rely on Vite transform/bundling behavior to execute.
44
-
45
- In scenarios reported in issue #930, Oxc-side integrations that read `vite.config.ts` can behave closer to native ESM loading (similar to Vite `--configLoader native`) than Vite's bundled default loader. That means configs depending on bundling/transforms can fail to load for lint/fmt/editor paths. See: https://github.com/voidzero-dev/vite-plus/issues/930
46
-
47
- ### Workarounds
48
-
49
- - Prefer a static `defineConfig({ ... })` export when you need `lint` / `fmt` in `vite.config.ts`.
50
- - Avoid Node-specific globals (`__dirname` in ESM), unresolved TS-only imports, or JSON imports without import attributes in config code used by lint/fmt.
51
- - If needed, keep `.oxlintrc.*` / `.oxfmtrc.*` as temporary fallback, [although we do not recommend doing this normally](/guide/lint##configuration), while this integration behavior is being improved.
52
-
53
- ### VS Code multi-root workspace note
28
+ ## VS Code extension does not read `vite.config.ts`
54
29
 
55
30
  If VS Code has multiple folders open, the shared Oxc language server may pick a different workspace than expected. That can make it look like `vite.config.ts` support is missing.
56
31
 
57
32
  - Confirm the extension is using the intended workspace.
58
- - Confirm the workspace resolves to a recent Oxc/Oxlint/Oxfmt toolchain.
59
33
 
60
34
  ## `vp build` does not run my build script
61
35
 
@@ -93,9 +67,9 @@ export default defineConfig({
93
67
 
94
68
  ## Slow config loading caused by heavy plugins
95
69
 
96
- When `vite.config.ts` imports heavy plugins at the top level, every `import` is evaluated eagerly, even for commands like `vp lint` or `vp fmt` that don't need those plugins. This can make config loading noticeably slow.
70
+ When `vite.config.ts` imports plugins at the top level, they are evaluated for every command, including `vp lint`, `vp fmt`, editor integrations, and long-lived background processes. This can make config loading slow and may trigger plugin setup side effects, such as reading files, starting watchers, or connecting to services.
97
71
 
98
- Use `lazyPlugins` to wrap plugin loading. Plugins are only loaded for commands that need them (`dev`, `build`, `test`, `preview`), and skipped for everything else:
72
+ Use `lazyPlugins` to load plugins only when the Vite pipeline actually runs (`dev`, `build`, `test`, `preview`):
99
73
 
100
74
  ```ts [vite.config.ts]
101
75
  import { defineConfig, lazyPlugins } from 'vite-plus';
@@ -14,9 +14,22 @@ You can upgrade both of them independently.
14
14
  ## Global `vp`
15
15
 
16
16
  ```bash
17
- vp upgrade
17
+ vp upgrade # upgrade to the latest version
18
+ vp upgrade --check # check for updates without installing
19
+ vp upgrade <version> # install a specific version
20
+ vp upgrade --registry <registry> # use a custom npm registry
18
21
  ```
19
22
 
23
+ ### Rollback
24
+
25
+ Vite+ keeps the **3 most recent** versions installed so you can revert quickly:
26
+
27
+ ```bash
28
+ vp upgrade --rollback
29
+ ```
30
+
31
+ Older versions are pruned automatically after each upgrade. The active version and the previous version are always kept, so a rollback target is never removed.
32
+
20
33
  ## Local `vite-plus`
21
34
 
22
35
  Update the project dependency with the package manager commands in Vite+:
@@ -29,21 +42,38 @@ You can also use `vp add vite-plus@latest` if you want to move the dependency ex
29
42
 
30
43
  ### Updating Aliased Packages
31
44
 
32
- Vite+ sets up npm aliases for its core packages during installation:
45
+ Vite+ sets up an npm alias for its core package during installation:
33
46
 
34
47
  - `vite` is aliased to `npm:@voidzero-dev/vite-plus-core@latest`
35
- - `vitest` is aliased to `npm:@voidzero-dev/vite-plus-test@latest`
36
48
 
37
- `vp update vite-plus` does not re-resolve these aliases in the lockfile. To fully upgrade, update them separately:
49
+ `vp update vite-plus` does not re-resolve this alias in the lockfile. To fully upgrade, update it separately:
38
50
 
39
51
  ```bash
40
- vp update @voidzero-dev/vite-plus-core @voidzero-dev/vite-plus-test
52
+ vp update @voidzero-dev/vite-plus-core
41
53
  ```
42
54
 
43
55
  Or update everything at once:
44
56
 
45
57
  ```bash
46
- vp update vite-plus @voidzero-dev/vite-plus-core @voidzero-dev/vite-plus-test
58
+ vp update vite-plus @voidzero-dev/vite-plus-core
47
59
  ```
48
60
 
49
61
  You can verify with `vp outdated` that no Vite+ packages remain outdated.
62
+
63
+ ### Updating the Vitest Pin
64
+
65
+ If you migrated with `vp migrate`, your project pins `vitest` to an exact version so the whole project shares a single Vitest copy with the bundled `vp test` runner. The pin lives in your package manager's override block:
66
+
67
+ - **npm / Bun:** a `vitest` entry under `overrides` in `package.json`
68
+ - **Yarn:** a `vitest` entry under `resolutions` in `package.json`
69
+ - **pnpm:** a `vitest` entry under `overrides` in `pnpm-workspace.yaml` — unless your `package.json` already had a `pnpm` field, in which case it lives under `pnpm.overrides` in `package.json` instead (pnpm ignores `pnpm-workspace.yaml` overrides when `package.json` defines `pnpm.overrides`)
70
+
71
+ A Vite+ release can bump the bundled Vitest. Because that pin also applies to `vite-plus`'s own `vitest` dependency, an out-of-date pin keeps installing the previous runner even after you upgrade `vite-plus` — splitting Vitest's internals (mocks, `expect`, runner state) between the pinned copy and the one `vp test` loads.
72
+
73
+ After upgrading `vite-plus`, re-pin `vitest` to the version Vite+ now bundles. Check that version with:
74
+
75
+ ```bash
76
+ vp --version
77
+ ```
78
+
79
+ Then set the `vitest` override to that exact version, or rerun `vp migrate` to update the pin for you.
package/docs/package.json CHANGED
@@ -17,13 +17,13 @@
17
17
  "vitepress-plugin-llms": "^1.12.2",
18
18
  "vitepress-plugin-mermaid": "^2.0.17",
19
19
  "vue": "^3.5.27",
20
- "vue3-carousel": "^0.16.0"
20
+ "vue3-carousel": "^0.17.0"
21
21
  },
22
22
  "devDependencies": {
23
- "@voidzero-dev/vitepress-theme": "4.8.3",
23
+ "@voidzero-dev/vitepress-theme": "4.8.4",
24
24
  "oxc-minify": "^0.120.0",
25
25
  "tailwindcss": "^4.1.18",
26
- "vitepress": "2.0.0-alpha.15"
26
+ "vitepress": "2.0.0-alpha.17"
27
27
  },
28
28
  "packageManager": "pnpm@10.33.2"
29
29
  }