You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
|`vite-plus`| Add it where the package is migrated. Re-pin plain ranges to the current concrete target, directly or through a catalog. Preserve deliberate protocol pins. |
42
-
|`vite`| Keep or add a real dependency edge where peer resolution requires one, and rewrite that edge plus the shared override/resolution to the matching `@voidzero-dev/vite-plus-core` target. An override rewrites an edge; it does not create one. |
43
-
|`vitest`| Remove it in the common node-mode case because `vite-plus` provides it transitively. Keep or add an exact bundled version only in packages with direct Vitest requirements. |
44
-
|`@vitest/*`| Align lockstep packages that the project directly lists to the bundled Vitest version. Prefer the package's existing catalog reference when its catalog owns that package; otherwise write the concrete version. |
45
-
|`@voidzero-dev/vite-plus-test`| Remove all dependency, override, resolution, and catalog aliases. Rewrite imports to the current `vite-plus/test*` surface. |
|`vite-plus`| Add it where the package is migrated. Re-pin plain ranges to the current concrete target, directly or through a catalog. Preserve deliberate protocol pins. |
42
+
|`vite`| Keep existing declarations. With pnpm, add a direct dev dependency to every package that depends on `vite-plus`and does not already declare `vite`. Point managed edges and the shared override to the matching `@voidzero-dev/vite-plus-core` target. |
43
+
|`vitest`| Remove it in the common node-mode case because `vite-plus` provides it transitively. Keep or add an exact bundled version only in packages with direct Vitest requirements. |
44
+
|`@vitest/*`| Align lockstep packages that the project directly lists to the bundled Vitest version. Prefer the package's existing catalog reference when its catalog owns that package; otherwise write the concrete version. |
45
+
|`@voidzero-dev/vite-plus-test`| Remove all dependency, override, resolution, and catalog aliases. Rewrite imports to the current `vite-plus/test*` surface. |
46
46
47
47
### Vite and Overrides
48
48
49
-
Package-manager overrides do not synthesize dependency edges. This matters most
50
-
with pnpm: Vitest has a required `vite` peer, and pnpm can auto-install upstream
51
-
Vite when a package that depends on `vite-plus` has no direct `vite` edge. That
52
-
creates separate Vite+, Vite, and Vitest peer contexts. Each affected pnpm
53
-
workspace package must therefore declare `vite`; the workspace override then
54
-
redirects that edge to Vite+ core.
49
+
Package-manager overrides do not synthesize dependency edges. Under pnpm, every
50
+
package that lists `vite-plus` in `dependencies` or `devDependencies` must also
51
+
declare `vite`, unless it already has a `vite` entry in `dependencies`,
52
+
`devDependencies`, `optionalDependencies`, or `peerDependencies`. Otherwise,
53
+
pnpm can auto-install upstream Vite to satisfy Vitest's required `vite` peer,
54
+
creating separate Vite+, Vite, and Vitest instances. `vp migrate` adds a missing
55
+
`vite` entry to `devDependencies`; the workspace override redirects it to Vite+
56
+
core.
55
57
56
58
Do not remove a direct `vite` declaration merely because a root override exists.
57
59
Normalize existing plain or stale aliases while retaining named catalog
58
-
references. A real edge is also required for Bun's peer resolver, and npm
59
-
browser-provider layouts may need a top-level edge so nested Vitest packages can
60
-
resolve `vite`. After migration, pnpm users should verify that each affected
61
-
workspace package has the required direct edge.
60
+
references. The general rule above is specific to pnpm. Bun mirrors its core
61
+
alias as a direct dependency for its peer resolver, while npm browser-provider
62
+
layouts may need a top-level edge so nested Vitest packages can resolve `vite`.
62
63
63
64
### When Vitest Is Directly Required
64
65
@@ -154,8 +155,9 @@ lint autofix preserves these imports.
154
155
11 no longer reads the legacy package.json settings.
155
156
- Migration keeps dependency references, default and named catalogs, overrides,
156
157
and `peerDependencyRules` consistent.
157
-
- Each package whose `vite-plus`/Vitest peer context would otherwise install
158
-
upstream Vite needs a direct `vite` edge.
158
+
- Each package that lists `vite-plus` in `dependencies` or `devDependencies`
159
+
gets a direct `vite` dev dependency unless it already declares `vite` in a
160
+
dependency field.
159
161
- Unrelated selector-shaped and object-valued overrides are preserved.
0 commit comments