Commit 381b6e2
fix(migration): emit bunfig.toml with peer = false to unblock bun installs
vitest@4.1.5 declares a `vite^6/^7/^8` peer dep. When the user's project
overrides `vite` to `@voidzero-dev/vite-plus-core` (version 0.0.0 in dev
and 0.1.21 on npm — neither matches), bun aborts with:
error: vite@^6.0.0 || ^7.0.0 || ^8.0.0 failed to resolve
pnpm/yarn/npm tolerate this redirect; bun does not, and offers no
`peerDependencyRules`-style escape hatch — only `[install] peer = false`
in `bunfig.toml`. vite-plus already provides the vite surface the user
needs, so disabling bun's auto-install of *missing* peers is safe here:
the redirected vite is the only one that ever fails, and other vitest
peers (jsdom, happy-dom, @vitest/*, etc.) are upstream-optional and
either pulled in transitively or user-installed.
`ensureBunfigPeerSuppression` writes/merges `bunfig.toml` whenever the
migrator touches a bun project — both the monorepo path (via
`rewriteBunCatalog`) and the standalone path (in
`rewriteStandaloneProject`'s post-package.json branch). Honors any
pre-existing `peer =` setting so a user who deliberately set `peer = true`
keeps it.
Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>1 parent 343d09a commit 381b6e2
3 files changed
Lines changed: 99 additions & 0 deletions
File tree
- packages/cli
- snap-tests-global/new-vite-monorepo-bun
- src/migration
- __tests__
Lines changed: 1 addition & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
3 | 3 | | |
4 | 4 | | |
5 | 5 | | |
| 6 | + | |
6 | 7 | | |
7 | 8 | | |
8 | 9 | | |
| |||
Lines changed: 58 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
123 | 123 | | |
124 | 124 | | |
125 | 125 | | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
| 129 | + | |
| 130 | + | |
| 131 | + | |
| 132 | + | |
| 133 | + | |
| 134 | + | |
| 135 | + | |
| 136 | + | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
| 144 | + | |
| 145 | + | |
| 146 | + | |
| 147 | + | |
| 148 | + | |
| 149 | + | |
| 150 | + | |
| 151 | + | |
| 152 | + | |
| 153 | + | |
| 154 | + | |
| 155 | + | |
| 156 | + | |
| 157 | + | |
| 158 | + | |
| 159 | + | |
| 160 | + | |
| 161 | + | |
| 162 | + | |
| 163 | + | |
| 164 | + | |
| 165 | + | |
| 166 | + | |
| 167 | + | |
| 168 | + | |
| 169 | + | |
| 170 | + | |
| 171 | + | |
| 172 | + | |
| 173 | + | |
| 174 | + | |
| 175 | + | |
| 176 | + | |
| 177 | + | |
| 178 | + | |
| 179 | + | |
| 180 | + | |
| 181 | + | |
| 182 | + | |
| 183 | + | |
126 | 184 | | |
127 | 185 | | |
128 | 186 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1005 | 1005 | | |
1006 | 1006 | | |
1007 | 1007 | | |
| 1008 | + | |
| 1009 | + | |
1008 | 1010 | | |
1009 | 1011 | | |
1010 | 1012 | | |
| |||
1572 | 1574 | | |
1573 | 1575 | | |
1574 | 1576 | | |
| 1577 | + | |
| 1578 | + | |
| 1579 | + | |
| 1580 | + | |
| 1581 | + | |
| 1582 | + | |
| 1583 | + | |
| 1584 | + | |
| 1585 | + | |
| 1586 | + | |
| 1587 | + | |
| 1588 | + | |
| 1589 | + | |
| 1590 | + | |
| 1591 | + | |
| 1592 | + | |
| 1593 | + | |
| 1594 | + | |
| 1595 | + | |
| 1596 | + | |
| 1597 | + | |
| 1598 | + | |
| 1599 | + | |
| 1600 | + | |
| 1601 | + | |
| 1602 | + | |
| 1603 | + | |
| 1604 | + | |
| 1605 | + | |
| 1606 | + | |
| 1607 | + | |
| 1608 | + | |
| 1609 | + | |
| 1610 | + | |
| 1611 | + | |
| 1612 | + | |
1575 | 1613 | | |
1576 | 1614 | | |
1577 | 1615 | | |
| |||
1639 | 1677 | | |
1640 | 1678 | | |
1641 | 1679 | | |
| 1680 | + | |
| 1681 | + | |
1642 | 1682 | | |
1643 | 1683 | | |
1644 | 1684 | | |
| |||
0 commit comments