Skip to content

chore(vitest): migrate remaining workspace tests to v5 - #16259

Merged
NuroDev merged 6 commits into
mainfrom
NuroDev/migrate-vitest-v5
Oct 20, 2026
Merged

NuroDev merged 6 commits into
mainfrom
NuroDev/migrate-vitest-v5

Conversation

@NuroDev

@NuroDev NuroDev commented Oct 14, 2026 •

Copy link
Copy Markdown
Member
  • Migrate all workspace Vitest dependencies to 5.0.4 and update Workers scaffolding templates to v5.
  • Replace the published v4-only Workers pool with @cloudflare/vitest-plugin@1.4.3 for four shared packages, preserving the dependency-cycle boundary. Templates require plugin 1.4.3 or newer, so all consumers can use filesystem module caching.
  • Update sequential test APIs, custom matcher declarations, and the workflow RPC test for v5; retain compatible public v4/v5 peer ranges.
  • Register credentialed Wrangler dev suites even when skipped, using full names matching their snapshots.
  • Use native filesystem-cache and V8 coverage support from plugin 1.4.3; remove all temporary cache opt-outs.
  • Validation: pnpm check; 772 shared-package tests and 120 plugin tests pass. The focused local Wrangler dev E2E tests pass in CI mode without credentials.

  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: this updates test tooling and generated dependency versions without changing the Workers configuration API.

Note

Created with GPT-6 using the Codex desktop harness, under human supervision.

@changeset-bot

changeset-bot Bot commented Oct 14, 2026 •

Copy link
Copy Markdown

ðŸĶ‹ Changeset detected

Latest commit: a6b074a

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 8 packages
Name Type
@cloudflare/workers-auth Patch
@cloudflare/workers-utils Patch
create-cloudflare Patch
@cloudflare/remote-bindings Patch
@cloudflare/autoconfig Patch
@cloudflare/cli-shared-helpers Patch
@cloudflare/containers-shared Patch
@cloudflare/deploy-helpers Patch

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

@github-project-automation github-project-automation Bot moved this to Untriaged in workers-sdk Oct 14, 2026
@NuroDev NuroDev self-assigned this Oct 14, 2026
@NuroDev NuroDev changed the title chore: [vitest] migrate remaining workspace tests to v5 chore(vitest): migrate remaining workspace tests to v5 Oct 14, 2026
ask-bonk[bot]

This comment was marked as resolved.

@ask-bonk

ask-bonk Bot commented Oct 14, 2026

Copy link
Copy Markdown
Contributor

I'm Bonk, and I've done a quick review of your PR. Confirmed PR #16259.

Migrates workspace tests and templates to Vitest 5.

  1. P1: Posted 6 inline suggestion comments.

github run

@pkg-pr-new

pkg-pr-new Bot commented Oct 14, 2026 •

Copy link
Copy Markdown
@cloudflare/autoconfig

npm i https://pkg.pr.new/@cloudflare/autoconfig@16259

@cloudflare/build-output-utils

npm i https://pkg.pr.new/@cloudflare/build-output-utils@16259

@cloudflare/codemods

npm i https://pkg.pr.new/@cloudflare/codemods@16259

@cloudflare/config

npm i https://pkg.pr.new/@cloudflare/config@16259

@cloudflare/containers-shared

npm i https://pkg.pr.new/@cloudflare/containers-shared@16259

create-cloudflare

npm i https://pkg.pr.new/create-cloudflare@16259

@cloudflare/deploy-helpers

npm i https://pkg.pr.new/@cloudflare/deploy-helpers@16259

@cloudflare/kv-asset-handler

npm i https://pkg.pr.new/@cloudflare/kv-asset-handler@16259

miniflare

npm i https://pkg.pr.new/miniflare@16259

@cloudflare/pages-functions

npm i https://pkg.pr.new/@cloudflare/pages-functions@16259

@cloudflare/pages-shared

npm i https://pkg.pr.new/@cloudflare/pages-shared@16259

@cloudflare/runtime-types

npm i https://pkg.pr.new/@cloudflare/runtime-types@16259

@cloudflare/unenv-preset

npm i https://pkg.pr.new/@cloudflare/unenv-preset@16259

@cloudflare/vite-plugin

npm i https://pkg.pr.new/@cloudflare/vite-plugin@16259

@cloudflare/vitest-plugin

npm i https://pkg.pr.new/@cloudflare/vitest-plugin@16259

@cloudflare/workers-auth

npm i https://pkg.pr.new/@cloudflare/workers-auth@16259

@cloudflare/workers-editor-shared

npm i https://pkg.pr.new/@cloudflare/workers-editor-shared@16259

@cloudflare/workers-utils

npm i https://pkg.pr.new/@cloudflare/workers-utils@16259

wrangler

npm i https://pkg.pr.new/wrangler@16259

commit: a6b074a

Comment thread packages/workflows-shared/tests/binding.test.ts
@NuroDev
NuroDev marked this pull request as ready for review October 16, 2026 12:24
@workers-devprod
workers-devprod requested review from a team and petebacondarwin and removed request for a team October 16, 2026 12:24
@workers-devprod

workers-devprod commented Oct 16, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/deploy-config
  • @cloudflare/workflows
  • ✅ @cloudflare/wrangler
Show detailed file reviewers
  • packages/workers-shared/asset-worker/tests/tsconfig.json: [@cloudflare/deploy-config]
  • packages/workers-shared/asset-worker/vitest.config.mts: [@cloudflare/deploy-config]
  • packages/workers-shared/asset-worker/wrangler.jsonc: [@cloudflare/deploy-config]
  • packages/workers-shared/package.json: [@cloudflare/deploy-config]
  • packages/workers-shared/router-worker/tests/tsconfig.json: [@cloudflare/deploy-config]
  • packages/workers-shared/router-worker/vitest.config.mts: [@cloudflare/deploy-config]
  • packages/workers-shared/router-worker/wrangler.jsonc: [@cloudflare/deploy-config]
  • packages/workflows-shared/package.json: [@cloudflare/workflows]
  • packages/workflows-shared/tests/binding.test.ts: [@cloudflare/workflows]
  • packages/workflows-shared/tests/tsconfig.json: [@cloudflare/workflows]
  • packages/workflows-shared/vitest.config.mts: [@cloudflare/workflows]

devin-ai-integration[bot]

This comment was marked as resolved.

@NuroDev
NuroDev enabled auto-merge (squash) October 16, 2026 13:29

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Looks like it needs a rebase and I propose that you split the changeset. Otherwise LGTM

Comment thread .changeset/vitest-five-templates.md Outdated
@NuroDev
NuroDev force-pushed the NuroDev/migrate-vitest-v5 branch from 1dfb66a to 61cf517 Compare October 19, 2026 11:37
@clanky-the-clanker

clanky-the-clanker Bot commented Oct 19, 2026 •

Copy link
Copy Markdown

✅ Approved — No problems found. The Vitest 5 migration is consistent across manifests, test APIs, snapshot names, templates and changesets, and it changes no production code at runtime.

The decision is advisory: this comment never approves, blocks or requests changes on the pull request.


✅ All checks passed

🚀 Release: ✅ LGTM

Risk: low. Patch changesets cover the wider peer ranges and the template updates.


🔒 Security: ✅ LGTM

This pull request only changes test tooling and dependency versions. It has no security impact.


📖 AGENTS.md: ✅ LGTM

The update to packages/miniflare/AGENTS.md matches the new API.


📋 Code Quality: ✅ LGTM

Checked the switch from sequential to { concurrent: false }, the restructured Wrangler dev E2E suite (its names still match the snapshot keys), the matcher type augmentation, removal of the old catalog and pool references, and the workflow RPC test's prototype spy. Everything is consistent.


⚡ Performance: ✅ LGTM

The change does not touch any runtime code path.


📝 Documentation: ✅ LGTM

The changesets and the package AGENTS.md update match the change.


Reviewed commit: a6b074a1

@petebacondarwin petebacondarwin left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners bypass

@workers-devprod workers-devprod left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Codeowners reviews satisfied

@NuroDev
NuroDev merged commit 017bf9b into main Oct 20, 2026
92 checks passed
@NuroDev
NuroDev deleted the NuroDev/migrate-vitest-v5 branch October 20, 2026 10:07
@github-project-automation github-project-automation Bot moved this from Untriaged to Done in workers-sdk Oct 20, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Done

Development

Successfully merging this pull request may close these issues.

3 participants