Skip to content

fix(migrate): support pnpm 10 peer overrides#2183

Closed
wan9chi wants to merge 1 commit into
mainfrom
fix/pnpm-10-peer-overrides
Closed

fix(migrate): support pnpm 10 peer overrides#2183
wan9chi wants to merge 1 commit into
mainfrom
fix/pnpm-10-peer-overrides

Conversation

@wan9chi

@wan9chi wan9chi commented Jul 16, 2026

Copy link
Copy Markdown
Member

Summary

  • preserve the global Vite+ managed alias override on pnpm workspaces
  • add package-scoped public peer ranges for pnpm 10.0 and 10.1, which otherwise apply the alias to workspace peerDependencies and reject it as an invalid peer spec
  • make the existing Vite+ bootstrap path detect and reconcile the same compatibility entries
  • stop emitting the workaround at pnpm 10.2.0, where fix(overrides): move invalid peers to prod deps pnpm/pnpm#9000 fixed the regression

This was found as a release blocker while smoke-testing the v0.2.5 preview against Vize, which pins pnpm 10.0.0.

Validation

  • vp check
  • pnpm -F vite-plus exec vitest run src/migration (366 passed)
  • pnpm -F vite-plus exec vitest run src/migration/__tests__/migrator.spec.ts (320 passed)
  • just snapshot-test migration (143 passed; six registry-contention timeouts all passed when rerun in isolation)
  • clean Vize migration and install with pnpm 10.0.0 using the exact v0.2.5 preview overrides; vp why -r vite-plus vite vitest reported exactly one version of Vite+, Vite, and Vitest

@netlify

netlify Bot commented Jul 16, 2026

Copy link
Copy Markdown

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit c474fed
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/6a582c827aff9e0007240eb7

@chatgpt-codex-connector chatgpt-codex-connector Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

💡 Codex Review

Here are some automated review suggestions for this pull request.

Reviewed commit: c474fed3c1

ℹ️ About Codex in GitHub

Your team has set up Codex to review pull requests in this repo. Reviews are triggered when you

  • Open a pull request for review
  • Mark a draft as ready
  • Comment "@codex review".

If Codex has suggestions, it will comment; otherwise it will react with 👍.

Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".

Comment on lines +156 to +157
if (!pnpmNeedsPeerOverrideCompatibility(pnpmVersion)) {
return false;

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P2 Badge Remove obsolete pnpm peer-compat selectors

After this helper has written pkg>vite selectors for pnpm 10.0/10.1, rerunning the bootstrap on pnpm 10.2.0–10.6.1 exits here and never removes them; the workspace-settings path only cleans selector overrides at 10.6.2+. Those selectors are more specific than the global vite override (pnpm documents qar@1>zoo as overriding that package's zoo dependency), so the stale public range continues to bypass the Vite+ core alias for that workspace even though the pnpm peer-validation bug is fixed.

Useful? React with 👍 / 👎.

@wan9chi wan9chi closed this Jul 16, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant