Skip to content

refactor(migration): move pnpm config into pnpm-workspace.yaml#1237

Merged
graphite-app[bot] merged 1 commit intomainfrom
refactor-pnpm
Mar 31, 2026
Merged

refactor(migration): move pnpm config into pnpm-workspace.yaml#1237
graphite-app[bot] merged 1 commit intomainfrom
refactor-pnpm

Conversation

@fengmk2
Copy link
Copy Markdown
Member

@fengmk2 fengmk2 commented Mar 31, 2026

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

  • pnpm -F vite-plus snap-test-global -- all 80+ snap tests pass
  • Standalone pnpm without existing pnpm field: creates pnpm-workspace.yaml with catalog/overrides/peerDependencyRules, devDependencies use catalog:
  • Standalone pnpm with existing pnpm field (dify): keeps config in package.json, no pnpm-workspace.yaml created, vp install succeeds
  • Monorepo pnpm tests unchanged
  • Monorepo with remaining non-Vite overrides: moves them to pnpm-workspace.yaml, removes pnpm.overrides from package.json

🤖 Generated with Claude Code

@netlify
Copy link
Copy Markdown

netlify bot commented Mar 31, 2026

Deploy Preview for viteplus-preview canceled.

Name Link
🔨 Latest commit 962694f
🔍 Latest deploy log https://app.netlify.com/projects/viteplus-preview/deploys/69cbaeb630da440008f9b6da

Copy link
Copy Markdown
Member Author

fengmk2 commented Mar 31, 2026


How to use the Graphite Merge Queue

Add 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.

@fengmk2 fengmk2 self-assigned this Mar 31, 2026
@fengmk2 fengmk2 added the test: e2e Auto run e2e tests label Mar 31, 2026 — with Graphite App
@fengmk2 fengmk2 marked this pull request as ready for review March 31, 2026 09:10
@fengmk2 fengmk2 requested review from branchseer and cpojer March 31, 2026 09:10
@fengmk2 fengmk2 changed the title refactor(migration): write pnpm config to pnpm-workspace.yaml for standalone projects refactor(migration): move pnpm config into pnpm-workspace.yaml Mar 31, 2026
Copy link
Copy Markdown
Member

@cpojer cpojer left a comment

Choose a reason for hiding this comment

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

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.

@graphite-app
Copy link
Copy Markdown

graphite-app bot commented Mar 31, 2026

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)
@graphite-app graphite-app bot merged commit 962694f into main Mar 31, 2026
65 checks passed
@graphite-app graphite-app bot deleted the refactor-pnpm branch March 31, 2026 11:30
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

test: e2e Auto run e2e tests

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Move pnpm config into pnpm-workspace.yaml

2 participants