Commit 61289fb
committed
fix(migration): mirror vite override as devDep on bun
Bun walks transitive peer-deps before resolving overrides. vitest@4.1.5
declares peer \`vite ^6 || ^7 || ^8\` and aborts with "vite@... failed
to resolve" if \`vite\` isn't a direct dep somewhere in the tree, even
when the user's overrides would redirect it to vite-plus-core. pnpm,
npm, and yarn don't enforce this; bun is uniquely strict. See
oven-sh/bun#8406.
For both standalone and monorepo-root bun migrations, mirror the
\`vite\` override as a top-level devDependency so bun's resolver sees a
direct \`vite\` dep at install time. The override configured alongside
still redirects the resolved package at vite-plus-core, so the user's
actual import behavior is unchanged — they still get vite-plus-core for
\`import 'vite'\`.
The only snap.txt that needed updating is new-vite-monorepo-bun, which
scaffolds a fresh bun monorepo without an existing \`vite\` dep at the
root. migration-monorepo-bun and create-from-bun-monorepo-subdir
already start with \`vite\` in devDeps and are unaffected.1 parent 5e5ae3f commit 61289fb
2 files changed
Lines changed: 27 additions & 0 deletions
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| 29 | + | |
29 | 30 | | |
30 | 31 | | |
31 | 32 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
916 | 916 | | |
917 | 917 | | |
918 | 918 | | |
| 919 | + | |
| 920 | + | |
| 921 | + | |
| 922 | + | |
| 923 | + | |
| 924 | + | |
| 925 | + | |
| 926 | + | |
| 927 | + | |
| 928 | + | |
| 929 | + | |
| 930 | + | |
| 931 | + | |
919 | 932 | | |
920 | 933 | | |
921 | 934 | | |
| |||
1731 | 1744 | | |
1732 | 1745 | | |
1733 | 1746 | | |
| 1747 | + | |
| 1748 | + | |
| 1749 | + | |
| 1750 | + | |
| 1751 | + | |
| 1752 | + | |
| 1753 | + | |
| 1754 | + | |
| 1755 | + | |
| 1756 | + | |
| 1757 | + | |
| 1758 | + | |
| 1759 | + | |
1734 | 1760 | | |
1735 | 1761 | | |
1736 | 1762 | | |
| |||
0 commit comments