Commit 962694f
committed
refactor(migration): move pnpm config into pnpm-workspace.yaml (#1237)
## 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)1 parent d81a033 commit 962694f
116 files changed
Lines changed: 1599 additions & 1140 deletions
File tree
- packages/cli
- snap-tests-global
- migration-add-git-hooks
- migration-auto-create-vite-config
- migration-baseurl-tsconfig
- migration-chained-lint-staged-pre-commit
- migration-composed-husky-custom-dir
- migration-composed-husky-prepare
- migration-env-prefix-lint-staged
- migration-eslint-lint-staged
- migration-eslint-lintstagedrc
- migration-eslint-npx-wrapper
- migration-eslint
- migration-existing-husky-lint-staged
- migration-existing-husky-v8-hooks
- migration-existing-husky-v8-multi-hooks
- migration-existing-husky
- migration-existing-lint-staged-config
- migration-existing-pnpm-exec-lint-staged
- migration-existing-prepare-script
- migration-from-tsdown-json-config
- migration-from-tsdown
- migration-from-vitest-config
- migration-from-vitest-files
- migration-hooks-skip-on-existing-hookspath
- migration-husky-latest-dist-tag-v9-installed
- migration-husky-latest-dist-tag
- migration-husky-or-prepare
- migration-husky-semicolon-prepare
- migration-husky-v8-preserves-lint-staged
- migration-lint-staged-in-scripts
- migration-lint-staged-merge-fail
- migration-lint-staged-ts-config
- migration-lintstagedrc-json
- migration-lintstagedrc-merge-fail
- migration-lintstagedrc-not-support
- migration-lintstagedrc-staged-exists
- migration-merge-vite-config-js
- migration-merge-vite-config-ts
- migration-monorepo-pnpm-overrides-dependency-selector
- migration-no-git-repo
- migration-no-hooks-with-husky
- migration-no-hooks
- migration-other-hook-tool
- migration-oxlintrc-json-with-comments
- migration-oxlintrc-jsonc
- migration-partially-migrated-pre-commit
- migration-prettier-eslint-combo
- migration-prettier-ignore-unknown
- migration-prettier-lint-staged
- migration-prettier-pkg-json
- migration-prettier
- migration-rewrite-declare-module
- migration-skip-vite-dependency
- migration-skip-vite-peer-dependency
- migration-standalone-pnpm
- migration-subpath
- migration-tsconfig-esmoduleinterop
- migration-vite-version
- src/migration
- __tests__
- rfcs
Some content is hidden
Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 18 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
11 | 11 | | |
12 | 12 | | |
13 | 13 | | |
14 | | - | |
15 | | - | |
16 | | - | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 14 | + | |
| 15 | + | |
32 | 16 | | |
33 | 17 | | |
34 | 18 | | |
35 | 19 | | |
36 | 20 | | |
37 | 21 | | |
38 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
48 | | - | |
49 | | - | |
50 | | - | |
51 | | - | |
52 | | - | |
53 | | - | |
54 | | - | |
| 38 | + | |
55 | 39 | | |
56 | 40 | | |
57 | 41 | | |
58 | 42 | | |
59 | 43 | | |
60 | 44 | | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
| 54 | + | |
| 55 | + | |
| 56 | + | |
| 57 | + | |
| 58 | + | |
| 59 | + | |
| 60 | + | |
Lines changed: 2 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
4 | 4 | | |
5 | 5 | | |
6 | 6 | | |
7 | | - | |
| 7 | + | |
| 8 | + | |
8 | 9 | | |
9 | 10 | | |
Lines changed: 17 additions & 17 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
28 | 28 | | |
29 | 29 | | |
30 | 30 | | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
35 | | - | |
36 | | - | |
37 | | - | |
38 | | - | |
39 | | - | |
40 | | - | |
41 | | - | |
42 | | - | |
43 | | - | |
44 | | - | |
45 | | - | |
46 | | - | |
47 | | - | |
| 31 | + | |
48 | 32 | | |
49 | 33 | | |
50 | 34 | | |
51 | 35 | | |
52 | 36 | | |
53 | 37 | | |
| 38 | + | |
| 39 | + | |
| 40 | + | |
| 41 | + | |
| 42 | + | |
| 43 | + | |
| 44 | + | |
| 45 | + | |
| 46 | + | |
| 47 | + | |
| 48 | + | |
| 49 | + | |
| 50 | + | |
| 51 | + | |
| 52 | + | |
| 53 | + | |
Lines changed: 3 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | 3 | | |
4 | | - | |
| 4 | + | |
5 | 5 | | |
6 | | - | |
| 6 | + | |
| 7 | + | |
7 | 8 | | |
8 | 9 | | |
Lines changed: 18 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 17 | + | |
| 18 | + | |
35 | 19 | | |
36 | 20 | | |
37 | 21 | | |
38 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
Lines changed: 18 additions & 18 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
14 | 14 | | |
15 | 15 | | |
16 | 16 | | |
17 | | - | |
18 | | - | |
19 | | - | |
20 | | - | |
21 | | - | |
22 | | - | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
32 | | - | |
33 | | - | |
34 | | - | |
| 17 | + | |
| 18 | + | |
35 | 19 | | |
36 | 20 | | |
37 | 21 | | |
38 | 22 | | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
| 31 | + | |
| 32 | + | |
| 33 | + | |
| 34 | + | |
| 35 | + | |
| 36 | + | |
| 37 | + | |
| 38 | + | |
39 | 39 | | |
40 | 40 | | |
41 | 41 | | |
| |||
Lines changed: 5 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1 | 1 | | |
2 | 2 | | |
3 | | - | |
| 3 | + | |
| 4 | + | |
| 5 | + | |
| 6 | + | |
4 | 7 | | |
5 | 8 | | |
| 9 | + | |
6 | 10 | | |
7 | 11 | | |
8 | 12 | | |
| |||
0 commit comments