Skip to content

chore(ui): coordinated toolchain majors — vitest 4 + @vitest/coverage-v8 4 + @vitejs/plugin-react 6 + vite 8#49

Merged
rennerdo30 merged 1 commit into
mainfrom
chore/ui-toolchain-majors
Jun 27, 2026
Merged

chore(ui): coordinated toolchain majors — vitest 4 + @vitest/coverage-v8 4 + @vitejs/plugin-react 6 + vite 8#49
rennerdo30 merged 1 commit into
mainfrom
chore/ui-toolchain-majors

Conversation

@rennerdo30

Copy link
Copy Markdown
Owner

Summary

Lands the coupled UI devDependency major upgrades together. The individual dependabot branches conflict with each other and share peer constraints (plugin-react 6 needs vite 8; vitest 4 changed its mock API), so they are done as one coordinated change.

Bumps (in ui/package.json):

Mock migration (vitest 4)

vitest 4 changed the mock API: vi.fn().mockImplementation(() => ({...})) and vi.fn(() => obj) are no longer constructable with new. Migrated the affected mocks to classes:

  • ui/vitest.setup.ts — global ResizeObserver mock → class MockResizeObserver
  • ui/src/components/hls-player.test.tsxHls constructor mock → class MockHls with static isSupported/Events/ErrorTypes (fixes the mockHlsInstance is not a constructor failures, ~66 tests)

Verification (local)

  • npm run build — passes
  • npx vitest run712 passed / 1 failed (713 total). The single failure is the pre-existing, unrelated ui/src/components/ui/popover.test.tsx > should close when clicking outside, which is the documented known-good baseline. All previously-broken mock tests now pass.

eslint 9 → 10 (#40): NOT included — upstream-blocked

eslint stays at 9. eslint-config-next@16.1.6 depends on eslint-plugin-react ^7.37.0; its latest release (7.37.5) declares peer eslint: ^3 || ... || ^9.7 and still uses the rule-context API removed in eslint 10. No published eslint-plugin-react / eslint-config-next supports eslint 10 yet, so forcing it would require a risky override and breaks lint. #40 should remain open as upstream-blocked.

Note: npm run lint reports 2 pre-existing errors in untouched app source (src/app/[locale]/errors/page.tsx, src/components/file-upload.tsx) from eslint-plugin-react-hooks rules — these are unrelated to this change (eslint/config versions unchanged).

Supersedes

🤖 Generated with Claude Code

…6, vite 8)

Land the coupled UI devDependency major upgrades together, since merging the
individual dependabot branches conflicts and the bumps share peer constraints:

- vitest 3 -> 4 (^4.1.0)            supersedes #45
- @vitest/coverage-v8 3 -> 4 (^4.1.0)  supersedes #46
- @vitejs/plugin-react 5 -> 6 (^6.0.1)  supersedes #43
- add vite ^8.1.0 (required peer of @vitejs/plugin-react 6)

Mock migration for the vitest 4 mock API change (vi.fn().mockImplementation /
vi.fn(() => obj) is no longer constructable with `new`):

- ui/vitest.setup.ts: global ResizeObserver mock -> class MockResizeObserver
- ui/src/components/hls-player.test.tsx: Hls constructor mock -> class MockHls
  with static isSupported/Events/ErrorTypes

Verification: `npm run build` passes; `npx vitest run` -> 712 passed / 1 failed,
where the single failure is the pre-existing unrelated popover.test.tsx case
(known-good baseline).

eslint 9 -> 10 (#40) intentionally NOT included: eslint-config-next still depends
on eslint-plugin-react ^7.37.0, whose latest release (7.37.5) declares
`peer eslint: ^...^9.7` and uses the old rule-context API that eslint 10 removed.
No published eslint-plugin-react / eslint-config-next yet supports eslint 10, so
#40 remains upstream-blocked.

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
@rennerdo30 rennerdo30 merged commit 9c8f48c into main Jun 27, 2026
3 of 6 checks passed
@rennerdo30 rennerdo30 deleted the chore/ui-toolchain-majors branch June 27, 2026 10:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant