chore(deps): upgrade build/test majors (Vite 8, Vitest 4, plugin-react 6, jsdom 29)#153
Conversation
…t 6, jsdom 29)
TS Tier B of the major-upgrade effort — the build/test toolchain. Each major
required a real migration fix (tests + a production build don't overlap, so
several only surfaced via `yarn build` / a browser smoke test):
- vite 7.3 -> 8.0: Vite 8 bundles with Rolldown, which rejects the object
form of `output.manualChunks`. Converted to the function form (groups the
React runtime incl. scheduler into react-vendor). terser minify still works.
- @vitejs/plugin-react 4 -> 6 (required by vite 8 peer range)
- vitest 3 -> 4 + @vitest/ui 4:
* removed `minWorkers` from vitest.config.ts (deprecated option removed in v4)
* vitest-setup.ts: ResizeObserver mock must use a `function` impl, not an
arrow fn — v4 enforces constructor mocks be `function`/`class`, so
`new ResizeObserver()` in components stopped working (broke 20 tests)
* useWorkerState test: vi.fn() is strictly typed in v4; gave the shared
fetcher/subscriber mocks explicit Mock<Fn> signatures
- jsdom 26 -> 29: getComputedStyle no longer surfaces the `inherit` keyword,
so AddressLink's toHaveStyle check now reads the inline style object for the
inherit values (display, a concrete value, still uses toHaveStyle)
Verification:
- yarn test:ci: 685 pass / 18 skipped, lint + type-check clean
- yarn build: production build succeeds (Vite 8 + Rolldown), WASM + Comlink
worker + react-vendor chunk all emitted
- browser smoke test (yarn dev): app renders, Comlink worker boots, emulator
initializes, video subscription succeeds, ZERO console errors
Completes the major-upgrade effort (Tailwind v4 + ESLint 10 remain deferred).
Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Pro Plus Run ID: ⛔ Files ignored due to path filters (1)
📒 Files selected for processing (7)
📝 WalkthroughWalkthroughThis PR upgrades the build tooling stack to Vite 8 and Vitest 4, updating dependency versions in ChangesVitest 4 and Vite 8 Upgrade
Estimated code review effort🎯 2 (Simple) | ⏱️ ~12 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. ✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
vite.config.tsParsing error: "parserOptions.project" has been provided for vitest.config.tsParsing error: "parserOptions.project" has been provided for Comment |
What
TS Tier B — the build/test toolchain majors. The final tier of the major-upgrade effort. Each major needed a real migration fix; several only surfaced via
yarn buildor a browser smoke test (not the unit suite).Bumped + migration fixes
output.manualChunks. Converted to the function form (groups React runtime + scheduler intoreact-vendor).terserminify still supported.minWorkers(deprecated option removed in v4)vitest-setup.ts:ResizeObservermock switched from arrow →functionimpl — v4 requires constructor mocks befunction/class, sonew ResizeObserver()in components broke (20 tests)useWorkerStatetest: v4 typesvi.fn()strictly; gave the shared mocks explicitMock<Fn>signaturesgetComputedStyleno longer surfaces theinheritkeyword;AddressLink's style check reads the inline style object for theinheritvaluesVerification
yarn test:ci: 685 pass / 18 skipped, lint + type-check cleanyarn build: production build succeeds (Vite 8 + Rolldown) — WASM + Comlink worker + react-vendor chunk all emittedyarn dev): app renders, Comlink worker boots, emulator initializes, video subscription succeeds, zero console errorsDeferred (unchanged)
eslint-plugin-reactupstream)🤖 Generated with Claude Code
Summary by CodeRabbit
Chores
Tests