Skip to content

chore(deps): Update to Vitest 4 and Vite 8 - #24746

Merged
Lms24 merged 5 commits into
developfrom
chore/upgrade-vitest-4
Sep 29, 2026
Merged

Lms24 merged 5 commits into
developfrom
chore/upgrade-vitest-4

Conversation

@Lms24

@Lms24 Lms24 commented Sep 25, 2026 •

Copy link
Copy Markdown
Member

This PR updates Vitest to v4, and Vite to v8. In a previous attempt that kept Vite on v7, we encountered several problems with yarn, hence I made the jump to vite 8 directly. Shouldn't affect anything else, since we only use vite for vitest.

Changes:

  • Bump vitest and @vitest/coverage-v8 from 3.2 to 4.1 across the monorepo.
  • Bump vite to 8 in packages that previously pinned Vite 6 or 7.
  • Replace the removed poolOptions.threads.singleThread with maxWorkers: 1 in the bun and cloudflare integration tests.
  • Give the bun integration test project its own sequence.groupOrder, which Vitest 4 requires for projects with different maxWorkers.
  • Run the shared vitest-esm-only plugin with enforce: 'pre' so TS transpilation can't move its marker comments.
  • Use function implementations for mocks called with new, which Vitest 4 no longer allows as arrow functions.
  • Clear or reset mocks explicitly, since vi.restoreAllMocks() no longer resets vi.fn() mocks.
  • Fix type errors from Vite 8 plugin hook types and the DOM lib types Vitest 3 used to pull in.
  • Move test options to the second argument in the deno and debug-id-sourcemaps tests.

@github-actions

github-actions Bot commented Sep 25, 2026 •

Copy link
Copy Markdown
Contributor

size-limit report 📦

Path Size % Change Change
@sentry/browser 29.24 kB - -
@sentry/browser - with treeshaking flags 27.5 kB - -
@sentry/browser - with treeshaking flags tracing without tracing 27.4 kB - -
@sentry/browser (incl. Tracing) 51.15 kB - -
@sentry/browser (incl. Tracing + Span Streaming) 51.18 kB - -
@sentry/browser (incl. Tracing, Profiling) 54.18 kB - -
@sentry/browser (incl. Tracing, Replay) 90.76 kB - -
@sentry/browser (incl. Tracing, Replay) - with treeshaking flags 79.86 kB - -
@sentry/browser (incl. Tracing, Replay with Canvas) 95.46 kB - -
@sentry/browser (incl. Tracing, Replay, Feedback) 108.41 kB - -
@sentry/browser (incl. Feedback) 46.76 kB - -
@sentry/browser (incl. sendFeedback) 34.3 kB - -
@sentry/browser (incl. FeedbackAsync) 39.41 kB - -
@sentry/browser (incl. Metrics) 30.25 kB - -
@sentry/browser (incl. Logs) 30.53 kB - -
@sentry/browser (incl. Metrics & Logs) 31.2 kB - -
@sentry/react 31.08 kB - -
@sentry/react (incl. Tracing) 53.54 kB - -
@sentry/vue 36.74 kB - -
@sentry/vue (incl. Tracing) 53.7 kB - -
@sentry/svelte 29.26 kB - -
CDN Bundle 31.05 kB - -
CDN Bundle (incl. Tracing) 51.8 kB - -
CDN Bundle (incl. Logs, Metrics) 33.31 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) 53.77 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) 74.02 kB - -
CDN Bundle (incl. Tracing, Replay) 89.39 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) 91.36 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) 95.55 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) 97.53 kB - -
CDN Bundle - uncompressed 91.7 kB - -
CDN Bundle (incl. Tracing) - uncompressed 154.08 kB - -
CDN Bundle (incl. Logs, Metrics) - uncompressed 98.27 kB - -
CDN Bundle (incl. Tracing, Logs, Metrics) - uncompressed 160.04 kB - -
CDN Bundle (incl. Replay, Logs, Metrics) - uncompressed 227.84 kB - -
CDN Bundle (incl. Tracing, Replay) - uncompressed 273.81 kB - -
CDN Bundle (incl. Tracing, Replay, Logs, Metrics) - uncompressed 279.75 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback) - uncompressed 287.51 kB - -
CDN Bundle (incl. Tracing, Replay, Feedback, Logs, Metrics) - uncompressed 293.44 kB - -
@sentry/nextjs (client) 55.78 kB - -
@sentry/sveltekit (client) 51.6 kB - -
@sentry/core/server 39.99 kB - -
@sentry/core/browser 13.63 kB - -
@sentry/node 142.24 kB +0.01% +7 B 🔺
@sentry/node/import (ESM hook with diagnostics-channel injection) 82.88 kB - -
@sentry/node - without tracing 91.25 kB +0.02% +14 B 🔺
@sentry/node - without channel injection 120.64 kB +0.01% +7 B 🔺
@sentry/aws-serverless 99.52 kB +0.01% +7 B 🔺
@sentry/cloudflare (withSentry) - minified 206.64 kB - -
@sentry/cloudflare (withSentry) 514.04 kB - -

View base workflow run

@Lms24
Lms24 force-pushed the chore/upgrade-vitest-4 branch 2 times, most recently from 1598459 to 4be15ae Compare September 28, 2026 08:49
@Lms24

Lms24 commented Sep 28, 2026

Copy link
Copy Markdown
Member Author

bugbot review

@cursor cursor Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

✅ Bugbot reviewed your changes and found no new issues!

Comment @cursor review or bugbot run to trigger another review on this PR

Reviewed by Cursor Bugbot for commit 4be15ae. Configure here.

@Lms24
Lms24 force-pushed the chore/upgrade-vitest-4 branch 2 times, most recently from f84706f to 68c0334 Compare September 28, 2026 09:56
@Lms24
Lms24 added this pull request to stack #24790 September 28, 2026 09:56
@Lms24 Lms24 changed the title chore(deps): Update to Vitest 4 chore(deps): Update to Vitest 4 and Vite 8 Sep 28, 2026
@Lms24
Lms24 marked this pull request as ready for review September 28, 2026 12:31
@Lms24
Lms24 requested review from a team as code owners September 28, 2026 12:31
@Lms24
Lms24 requested review from JPeer264, isaacs, logaretm, msonnb, nicohrubec and s1gr1d and removed request for a team September 28, 2026 12:31
@Lms24 Lms24 self-assigned this Sep 28, 2026
Comment thread packages/solidstart/src/vite/buildInstrumentationFile.ts
Lms24 and others added 4 commits September 29, 2026 17:57
Vitest 3 transitively pulled in DOM lib types, which the bun and
cloudflare integration tests relied on. Add DOM to the bun tsconfig
lib, matching node-integration-tests whose runner the bun suites now
compile, and reference the DOM lib in the browser-only cloudflare
client file.

Vite 8 types the plugin `config` hook with a `ConfigPluginContext`
`this`, which broke nuxt's typechecked unit tests. Cast the hook before
calling it, as the remix tests already do.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Bump deno-integration-tests and the debug-id-sourcemaps e2e app to
Vitest 4. Vitest 4 no longer accepts test options as the third
argument, so pass them second.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Vitest 4 rejects projects that share a `sequence.groupOrder` but set
different `maxWorkers`. The `bun` project pins `maxWorkers: 1`, so it
now runs in a separate group after the node suites.

Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
@Lms24
Lms24 force-pushed the chore/upgrade-vitest-4 branch from 68c0334 to 73eee27 Compare September 29, 2026 15:58
@Lms24
Lms24 merged commit aedd977 into develop Sep 29, 2026
676 of 679 checks passed
@Lms24
Lms24 deleted the chore/upgrade-vitest-4 branch September 29, 2026 16:38
Lms24 added a commit that referenced this pull request Sep 29, 2026
The SolidStart e2e apps only run Playwright, so `vitest`, `@vitest/ui`
and `vitest.config.ts` are unused leftovers from the Solid CLI template.
Noticed while working on #24746. Didn't cause a direct dependency
duplication but thought it would be good to get this cleaned up.

Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com>
Lms24 added a commit that referenced this pull request Sep 30, 2026
…ugin (#24863)

In Vite 8, `rollupOptions` is a deprecated alias of `rolldownOptions`,
and Vite ignores `rollupOptions` when a plugin returns both. The plugin
now reads either key and writes the input back only under the one the
config already uses, so older Vite keeps working.

Follow-up to
#24746 (comment)
(i.e. our Vite 8 bump surfaced this. It's not a breaking change. Only
future proofing the solid start injection for Vite 8)
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.

3 participants