Skip to content

[vite-plugin] Use Vitest 5 in v1 maintenance tests - #16378

Open
petebacondarwin wants to merge 1 commit into
codex/vite-v1-backport-15846from
codex/vite-v1-backport-16259
Open

petebacondarwin wants to merge 1 commit into
codex/vite-v1-backport-15846from
codex/vite-v1-backport-16259

Conversation

@petebacondarwin

@petebacondarwin petebacondarwin commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Backport the useful remaining parts of #16259 to the Vite plugin v1 maintenance workspace. Run the retained asset/router workers and plugin tests with Vitest 5.0.4, replace the old published vitest-pool-workers test runner with published @cloudflare/vitest-plugin 1.4.3, and keep the remote-binding and React SPA tests sequential using Vitest 5's supported options.

Preserve all retained private packages and workspace:* references. Update pinned workers-utils to 0.47.3 and workers-auth to 0.14.1 for their Vitest 5 peers. Couple cli-shared-helpers 0.2.7, containers-shared 0.23.1, and deploy-helpers 0.22.1 so retained remote-bindings has one compatible workers-utils type identity. Keeping deploy-helpers 0.21.0 fails its type check: createWorkerUploadForm expects the old Binding type with a different INHERIT_SYMBOL. This is a concrete build requirement introduced by this test migration; the earlier Container backport does not need this upgrade by itself. The remaining lockfile is regenerated by pnpm, rather than copying main's lockfile.

Stacked on #16373, above #16334 and runtime #16333. Miniflare 5.20261019.1-beta / Wrangler 4.151.3 remain supplied by #16333; this PR does not repeat or revert the runtime upgrade. No public sibling source or upstream dependency tests are restored. Main's C3 templates, Wrangler tests, and removed packages are excluded. No plugin changeset: the behavior change is internal test tooling and compatible helper peers, with no new user-facing plugin behavior.

Validation on Node.js 22.22.1 / pnpm 10.33.0: build (3 tasks), all retained suites (8 tasks, including 211 plugin tests, 28 remote-bindings tests, 277 asset-worker tests and 65 router-worker tests), and pnpm check (58 tasks) pass. Existing React SPA and Workflow playgrounds pass in dev (9 passed, 3 expected failures) and build/preview (11 passed, 1 expected skip). Offline frozen-lockfile install passes. Selected package-manager E2E coverage passes: npm/yarn (34 tests) and pnpm 10.33.0 (22 tests, 6 files). An initial pnpm attempt used Corepack's external-fixture default 11.28.5 and rejected ignored build scripts; rerunning with the repository-declared 10.33.0 resolved every fixture setup failure. Cross-platform CI remains required.


  • 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 maintains internal v1 testing tools and shared helper peer compatibility.

Note

This is a contribution from an AI agent: Codex, preparing maintainer-requested v1 backports.

@petebacondarwin petebacondarwin added the ci:no-changeset-required Skip pull request checks for a valid changeset label Oct 20, 2026
@changeset-bot

changeset-bot Bot commented Oct 20, 2026

Copy link
Copy Markdown

⚠️ No Changeset found

Latest commit: 1de78ca

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

@petebacondarwin

Copy link
Copy Markdown
Contributor Author

@NuroDev (recorded author of #16259) and @petebacondarwin (verified human ant-core approver), could you please check this Vite plugin v1 backport and approve it if it looks good?

The remaining v1 change migrates retained asset/router workers and plugin tests to Vitest 5 using the published test plugin. Shared helper pins are coupled to keep Vitest peers and the retained remote-binding upload types compatible. Earlier #16333 supplies the runtime upgrade; this PR stacks on #16373. Removed public package source, tests, and C3 templates stay absent.

@workers-devprod
workers-devprod requested review from a team and dario-piotrowicz and removed request for a team October 20, 2026 13:07
@workers-devprod

workers-devprod commented Oct 20, 2026 •

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • @cloudflare/deploy-config
  • ✅ @cloudflare/wrangler

@devin-ai-integration devin-ai-integration Bot 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.

Devin Review found 1 potential issue.

Devin Review

Comment thread pnpm-lock.yaml

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.

🔍 Worker tests use an older runtime

@cloudflare/vitest-plugin resolves Miniflare 5.20261012.0-beta; the Vite plugin uses 5.20261019.1-beta. The worker suites therefore do not exercise the plugin's exact runtime.

Devin Review


Was this helpful? React with 👍 or 👎 to provide feedback.

@clanky-the-clanker

Copy link
Copy Markdown

✅ Approved — No issues found. The Vitest 5 and @​cloudflare/vitest-plugin migration and the helper version bumps match each other and the lockfile.

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


✅ All checks passed

🚀 Release: ✅ LGTM

Risk: Low. Leaving out a plugin changeset is reasonable, since the change does not alter any user-facing plugin behaviour.


🔒 Security: ✅ LGTM

No security issues found. The change only touches test tooling and pinned dependency versions.


📖 AGENTS.md: ✅ LGTM

The change follows the repository guidelines: private workspace references are kept, and public SDK packages are pinned to exact npm versions.


📋 Code Quality: ✅ LGTM

No issues found. What was checked:

  • Leftover references: No vitest-pool-workers references remain except in CHANGELOG entries and one code comment. The catalog entry, workers-shared/package.json, both vitest configs, both test tsconfigs and the wrangler comments all point at @cloudflare/vitest-plugin.
  • Version bumps: Every @cloudflare/workers-utils pin is now 0.47.3, across fixtures/shared, mock-npm-registry, remote-bindings, vite-plugin-cloudflare and the prisma playground. The remote-bindings helper set (cli-shared-helpers 0.2.7, deploy-helpers 0.22.1, workers-auth 0.14.1) and containers-shared 0.23.1 match the pull request description.
  • Lockfile: pnpm-lock.yaml resolves @cloudflare/vitest-plugin@1.4.3 against vitest@5.0.4, so the catalog and the lockfile agree.
  • Sequential test options:
    • In e2e/remote-bindings.test.ts, { concurrent: false } replaces describe.sequential. The e2e config does not turn on sequence.concurrent, so these tests still run one after another.
    • In the React SPA spec, the redundant sequential: true was removed and concurrent: false kept.
  • Workspace references: Private packages still use workspace:*, as the repository guidelines require.

⚡ Performance: ✅ LGTM

No performance issues found.


📝 Documentation: ✅ LGTM

No documentation changes are needed. The change is limited to internal test tooling and compatible helper versions.


Reviewed commit: 1de78ca5

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ci:no-changeset-required Skip pull request checks for a valid changeset

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants