Commit f663046
feat(migration): support monorepo peerDependencies detection
Find the nearest package.json for each source file instead of only
checking the root. This allows monorepos to have different packages
with different peerDependencies - a vite plugin package can have vite
in peerDependencies (imports preserved) while an app package without
peerDependencies will have imports rewritten.
- Add find_nearest_package_json() to walk up directories
- Cache package.json lookups for performance
- Add monorepo unit tests and snap-test
🤖 Generated with [Claude Code](https://claude.com/claude-code)
Co-Authored-By: Claude Opus 4.5 <[email protected]>1 parent 350a616 commit f663046
19 files changed
Lines changed: 495 additions & 47 deletions
File tree
- .github/workflows
- crates/vite_migration/src
- ecosystem-ci
- packages/global
- snap-tests
- migration-monorepo-pnpm
- migration-monorepo-skip-vite-peer-dependency
- packages/vite-plugin
- src
- migration-monorepo-yarn4
- migration-skip-vite-dependency
- src
- src/utils
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
9 | 9 | | |
10 | 10 | | |
11 | 11 | | |
| 12 | + | |
| 13 | + | |
| 14 | + | |
| 15 | + | |
12 | 16 | | |
13 | 17 | | |
14 | 18 | | |
| |||
88 | 92 | | |
89 | 93 | | |
90 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
91 | 103 | | |
92 | 104 | | |
93 | 105 | | |
| |||
0 commit comments