Repository navigation
[vitest-plugin] Vitest 5 support - #16132
Merged
Merged
Conversation
# Conflicts: # pnpm-lock.yaml
🦋 Changeset detectedLatest commit: 30bf090 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
Not sure what this means? Click here to learn what changesets are. Click here if you're a maintainer who wants to add another changeset to this PR |
Contributor
|
LGTM |
@cloudflare/autoconfig
@cloudflare/build-output-utils
@cloudflare/codemods
@cloudflare/config
@cloudflare/containers-shared
create-cloudflare
@cloudflare/deploy-helpers
@cloudflare/kv-asset-handler
miniflare
@cloudflare/pages-functions
@cloudflare/pages-shared
@cloudflare/runtime-types
@cloudflare/unenv-preset
@cloudflare/vite-plugin
@cloudflare/vitest-plugin
@cloudflare/workers-auth
@cloudflare/workers-editor-shared
@cloudflare/workers-utils
wrangler
commit: |
edmundhung
force-pushed
the
edmundhung/vitest-module-fallback-compat
branch
from
October 7, 2026 18:42
f31e4ef to
fdc74c2
Compare
Keep the existing legacy module registry default, V1 fallback protocol, and Vitest 4 behavior while supporting Vitest 5. Cover both registry modes and Vitest versions, including the examples fixture running Vitest 5.
…ule-fallback-compat
edmundhung
force-pushed
the
edmundhung/vitest-module-fallback-compat
branch
3 times, most recently
from
October 7, 2026 20:16
ff57d15 to
6eb9e54
Compare
edmundhung
force-pushed
the
edmundhung/vitest-module-fallback-compat
branch
from
October 7, 2026 20:30
6eb9e54 to
f91708c
Compare
NuroDev
approved these changes
Oct 8, 2026
workers-devprod
approved these changes
Oct 8, 2026
workers-devprod
left a comment
Contributor
There was a problem hiding this comment.
Codeowners reviews satisfied
2 of 5 tasks
Merged
Contributor
|
This is great! But it looks like it doesn't yet work with |
Member
Author
|
@mattjohnsonpint Looking into it. I will put up a patch once I figure out the issue. |
2 of 5 tasks
brandhaug
added a commit
to brandhaug/b2b-saas-starter
that referenced
this pull request
Oct 9, 2026
## Outcome Upgrade the workspace and pinned CI installer from Vite+ 0.3.0 to 1.0.0, including Vite 8.3.1, Vitest/coverage 5.0.1, Oxlint 1.85.0 and Oxfmt 0.70.0. The official migrator aligns catalogs, overrides and dependencies, removes redundant direct runner/linter dependencies, and moves task inputs under `cache`. Follow-up fixes preserve external coverage matching, run lint-rule fixtures through the bundled linter, restore Fallow test discovery, and address new lint diagnostics without changing application behavior. The Node engine range matches the supported runtime majors; pinned Node 24.21.0 is unchanged. CI uses the release's immutable installer commit and verified SHA-256, and its managed pnpm shim replaces the removed Corepack shim. Resolve the Cloudflare worker-test blocker by replacing `@cloudflare/vitest-pool-workers@0.22.0` with `@cloudflare/vitest-plugin@1.4.0`. The released plugin supports Vitest 5 through [workers-sdk#16132](cloudflare/workers-sdk#16132), addressing [workers-sdk#15618](cloudflare/workers-sdk#15618). Update imports and type references, use the plugin's exported queue message/result types, and remove the old runtime overrides and unnecessary `clearMocks: false` settings. Both real-worker suites now execute successfully. Merge current master while preserving its dependency and security updates. Reviewed the [Vite+ release](https://github.com/voidzero-dev/vite-plus/releases/tag/v1.0.0), [migration rules](https://viteplus.dev/guide/migrate-rules), [Vitest compatibility guide](https://viteplus.dev/guide/vitest-v5), [Vitest 5 migration](https://vitest.dev/guide/migration/), and [tsdown 0.23 release](https://github.com/rolldown/tsdown/releases/tag/v0.23.0). This repo has no `vp pack` configuration to migrate. ## Validation Local validation on the tree committed as `95f56622`: - `vp install --frozen-lockfile` passes. - `pnpm -C apps/background test` passes: 18 files, 134 tests, including both previously blocked real-worker suites. - `E2E_PORT=3197 pnpm run validate` passes: type checking, lint, formatting, Fallow, unused-message checks, workspace/script tests, production builds, generated Wrangler drift detection, local D1 migration/seed, and browser E2E. - Browser artifact: `apps/web/playwright-report/results.json` reports 62 expected passes, zero failures, retries or skips. Reproduce with `E2E_PORT=3197 pnpm run validate`. - Independent targeted reviews found no actionable issues in the migration, merge integration, or final queue type changes. All required checks passed on `db576b21`, including the previously blocked package tests. CI on `95f56622` is pending. This follow-up pins the global `sharp` override to patched 0.35.5 so the new plugin's runtime cannot resolve vulnerable 0.35.4. Full local validation and frozen-lockfile installation pass again; independent review found no issues. ## Risks and remaining work Await CI on the new head. The upstream Vitest compatibility blocker is resolved locally and in CI. Background projects retain separate Vite servers and explicit configuration isolation. Audit still has an external blocker: `braces@3.0.3` is affected by [CVE-2026-93687](GHSA-vfj7-8cjw-p6xm), with no published patched release. The same version is already in master's lockfile. No exception or suppression was added. The other finding, `sharp@0.35.4`, is removed in `95f56622`.
This was referenced Oct 11, 2026
kixelated
added a commit
to kixel-ai/quest
that referenced
this pull request
Oct 14, 2026
@cloudflare/vitest-plugin 1.3.6 supports only vitest ^4.1.0 and relies on internal Vitest APIs, so under vitest 5 every Workers pool failed to start with "SyntaxError: Unexpected identifier 'file'". Vitest 5 support landed in 1.4.0 (cloudflare/workers-sdk#16132). Bump the plugin to 1.4.2 and wrangler to 4.151.0, the version the plugin pins, so one wrangler/miniflare/workerd is installed. Regenerate the Worker runtime types for the newer workerd. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
kixelated
added a commit
to kixel-ai/quest
that referenced
this pull request
Oct 14, 2026
…#96) * chore(deps-dev): bump the npm group across 1 directory with 4 updates Bumps the npm group with 4 updates in the / directory: [esbuild](https://github.com/evanw/esbuild), [vitest](https://github.com/vitest-dev/vitest/tree/HEAD/packages/vitest), [@cloudflare/vitest-plugin](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/vitest-plugin) and [wrangler](https://github.com/cloudflare/workers-sdk/tree/HEAD/packages/wrangler). Updates `esbuild` from 0.28.1 to 0.28.2 - [Release notes](https://github.com/evanw/esbuild/releases) - [Changelog](https://github.com/evanw/esbuild/blob/main/CHANGELOG.md) - [Commits](evanw/esbuild@v0.28.1...v0.28.2) Updates `vitest` from 4.1.11 to 5.0.3 - [Release notes](https://github.com/vitest-dev/vitest/releases) - [Changelog](https://github.com/vitest-dev/vitest/blob/main/docs/releases.md) - [Commits](https://github.com/vitest-dev/vitest/commits/v5.0.3/packages/vitest) Updates `@cloudflare/vitest-plugin` from 1.3.5 to 1.3.6 - [Release notes](https://github.com/cloudflare/workers-sdk/releases) - [Changelog](https://github.com/cloudflare/workers-sdk/blob/main/packages/vitest-plugin/CHANGELOG.md) - [Commits](https://github.com/cloudflare/workers-sdk/commits/@cloudflare/vitest-plugin@1.3.6/packages/vitest-plugin) Updates `wrangler` from 4.146.0 to 4.147.0 - [Release notes](https://github.com/cloudflare/workers-sdk/releases) - [Commits](https://github.com/cloudflare/workers-sdk/commits/wrangler@4.147.0/packages/wrangler) --- updated-dependencies: - dependency-name: esbuild dependency-version: 0.28.2 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: vitest dependency-version: 5.0.3 dependency-type: direct:development update-type: version-update:semver-major dependency-group: npm - dependency-name: "@cloudflare/vitest-plugin" dependency-version: 1.3.6 dependency-type: direct:development update-type: version-update:semver-patch dependency-group: npm - dependency-name: wrangler dependency-version: 4.147.0 dependency-type: direct:development update-type: version-update:semver-minor dependency-group: npm ... Signed-off-by: dependabot[bot] <support@github.com> * fix(deps): bump @cloudflare/vitest-plugin for Vitest 5 @cloudflare/vitest-plugin 1.3.6 supports only vitest ^4.1.0 and relies on internal Vitest APIs, so under vitest 5 every Workers pool failed to start with "SyntaxError: Unexpected identifier 'file'". Vitest 5 support landed in 1.4.0 (cloudflare/workers-sdk#16132). Bump the plugin to 1.4.2 and wrangler to 4.151.0, the version the plugin pins, so one wrangler/miniflare/workerd is installed. Regenerate the Worker runtime types for the newer workerd. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> --------- Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Luke Curley <kixelated@gmail.com> Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
jsanchez542-hub
added a commit
to jsanchez542-hub/maitre
that referenced
this pull request
Oct 16, 2026
… to the plugin that reads Vitest 5.0.4's module cache Dependabot's group paired Vitest 5.0.4 with test plugin 1.4.1, which fails every test file on the module cache Vitest 5.0.4 turns on (cloudflare/workers-sdk#16132, fixed in 1.4.3). Wrangler 4.151.1, plugin 1.4.4, Vitest 5.0.4 and today's Workers types pass the 69 tests.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Superseded #15500.
This adds Vitest 5 support to
@cloudflare/vitest-pluginwithout the need to drop legacy module registry support.