Commit fdfd022
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 <noreply@anthropic.com>1 parent 871d8d3 commit fdfd022
19 files changed
Lines changed: 491 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 | |
|---|---|---|---|
| |||
95 | 95 | | |
96 | 96 | | |
97 | 97 | | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
98 | 106 | | |
99 | 107 | | |
100 | 108 | | |
| |||
0 commit comments