refactor(migration): move pnpm config into pnpm-workspace.yaml#1237
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 31, 2026
Merged
refactor(migration): move pnpm config into pnpm-workspace.yaml#1237graphite-app[bot] merged 1 commit intomainfrom
graphite-app[bot] merged 1 commit intomainfrom
Conversation
✅ Deploy Preview for viteplus-preview canceled.
|
Member
Author
How to use the Graphite Merge QueueAdd the label auto-merge to this PR to add it to the merge queue. You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
cpojer
approved these changes
Mar 31, 2026
Member
cpojer
left a comment
There was a problem hiding this comment.
Looks great! I think we might need to print the contents of pnpm-workspace.yaml for all the snapshot tests that changed though, otherwise we are losing quite a bit of info that was previously encoded in the snapshot tests.
Merge activity
|
## Summary - For standalone pnpm projects **without** existing `pnpm` config in `package.json`, write overrides, peerDependencyRules, and catalog to `pnpm-workspace.yaml` instead of `package.json`, and use `catalog:` references in devDependencies - For projects **with** existing `pnpm` config in `package.json` (e.g., dify with `pnpm.overrides`), respect the existing location and keep config in `package.json` - Move any remaining non-Vite `pnpm.overrides` from `package.json` to `pnpm-workspace.yaml` to prevent pnpm from ignoring workspace-level overrides - Surgically remove only Vite-managed entries from `peerDependencyRules` instead of deleting the entire object, preserving custom rules - Update migration RFC to document the pnpm-specific behavior Closes #1233 ## Test plan - [x] `pnpm -F vite-plus snap-test-global` -- all 80+ snap tests pass - [x] Standalone pnpm without existing `pnpm` field: creates `pnpm-workspace.yaml` with catalog/overrides/peerDependencyRules, devDependencies use `catalog:` - [x] Standalone pnpm with existing `pnpm` field (dify): keeps config in `package.json`, no `pnpm-workspace.yaml` created, `vp install` succeeds - [x] Monorepo pnpm tests unchanged - [x] Monorepo with remaining non-Vite overrides: moves them to `pnpm-workspace.yaml`, removes `pnpm.overrides` from `package.json` 🤖 Generated with [Claude Code](https://claude.com/claude-code)
03f7192 to
962694f
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

Summary
pnpmconfig inpackage.json, write overrides, peerDependencyRules, and catalog topnpm-workspace.yamlinstead ofpackage.json, and usecatalog:references in devDependenciespnpmconfig inpackage.json(e.g., dify withpnpm.overrides), respect the existing location and keep config inpackage.jsonpnpm.overridesfrompackage.jsontopnpm-workspace.yamlto prevent pnpm from ignoring workspace-level overridespeerDependencyRulesinstead of deleting the entire object, preserving custom rulesCloses #1233
Test plan
pnpm -F vite-plus snap-test-global-- all 80+ snap tests passpnpmfield: createspnpm-workspace.yamlwith catalog/overrides/peerDependencyRules, devDependencies usecatalog:pnpmfield (dify): keeps config inpackage.json, nopnpm-workspace.yamlcreated,vp installsucceedspnpm-workspace.yaml, removespnpm.overridesfrompackage.json🤖 Generated with Claude Code