Skip to content

Update vitest integration recipes - #13548

Merged
emily-shen merged 26 commits into
mainfrom
emily/vitest-recipes
Apr 16, 2026
Merged

Update vitest integration recipes#13548
emily-shen merged 26 commits into
mainfrom
emily/vitest-recipes

Conversation

@emily-shen

Copy link
Copy Markdown
Contributor

Various fixes mostly around using exports instead of SELF.

each fixture has its own commit

with a bonus semi-related docs PR


  • Tests
    • Tests included/updated
    • Automated tests not possible - manual testing has been completed as follows:
    • Additional testing not necessary because: these are tests i guess
  • Public documentation

A picture of a cute animal (not mandatory, but encouraged)

@changeset-bot

changeset-bot Bot commented Apr 15, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 37a5e60

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

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

@ask-bonk

ask-bonk Bot commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Note this file does NOT have the /* eslint-disable */ and generated comment at the top that the other env.d.ts files have, despite its Cloudflare namespace block looking like it's from wrangler types. The QueueJob interface was manually added above it. This is fine - it's a manually curated file that combines custom types with the generated structure.

I've now thoroughly reviewed the entire PR. Here's my assessment:

The changes are a straightforward, mechanical migration of test fixtures from SELF/cloudflare:test to exports/cloudflare:workers, plus refactoring some examples to separate utility functions into their own files, updating env.d.ts to use the new Wrangler-generated namespace format, and updating READMEs/docs. The one source code change is a warning message string in patch-ctx.ts.

There are no logic bugs, security issues, or backward compatibility violations. The only very minor issue is duplicate imports from the same module in one file, but this is a nitpick on a fixture file -- it's not even a formatting issue since it's functionally valid. I don't consider this actionable.

LGTM

github run

@emily-shen
emily-shen force-pushed the emily/vitest-recipes branch from 27a1b00 to 0617588 Compare April 15, 2026 16:32
@pkg-pr-new

pkg-pr-new Bot commented Apr 15, 2026

Copy link
Copy Markdown
create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

npm i https://pkg.pr.new/@cloudflare/vitest-pool-workers@13548

@cloudflare/workers-editor-shared

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

wrangler

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

commit: 37a5e60

@emily-shen
emily-shen marked this pull request as ready for review April 16, 2026 09:03
@workers-devprod
workers-devprod requested review from a team and edmundhung and removed request for a team April 16, 2026 09:03
@workers-devprod

workers-devprod commented Apr 16, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@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: No Issues Found

Devin Review analyzed this PR and found no potential bugs to report.

View in Devin Review to see 4 additional findings.

Open in Devin Review

@emily-shen emily-shen added the ci:no-changeset-required Skip pull request checks for a valid changeset label Apr 16, 2026
Comment thread packages/vitest-pool-workers/src/worker/patch-ctx.ts Outdated

@edmundhung edmundhung left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Approved with an assumption that you will either add a changeset or remove the fix from this PR.

@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

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Apr 16, 2026
@emily-shen
emily-shen force-pushed the emily/vitest-recipes branch from cb1934a to 37a5e60 Compare April 16, 2026 13:20
@emily-shen emily-shen removed the ci:no-changeset-required Skip pull request checks for a valid changeset label Apr 16, 2026
@github-actions

Copy link
Copy Markdown
Contributor

Changeset Review

Summary

✅ All changesets look good

Reviewed Changesets

clear-turkeys-boil.md

  • Package: @cloudflare/vitest-pool-workers
  • Version: patch
  • Status: ✅ Good - Clear description of warning message update for deprecated API

rename-flags-to-flagship.md

  • Package: miniflare
  • Version: patch
  • Status: ✅ Good - Clear description of type rename to match upstream

rename-browser-run.md

  • Packages: wrangler, miniflare, @cloudflare/workers-utils
  • Version: patch
  • Status: ✅ Good - Clear description of user-facing string changes

c3-frameworks-update-12714.md

  • Package: create-cloudflare
  • Version: patch
  • Status: ✅ Skipped per rule 5 (dependency update changesets for create-cloudflare are not validated)

dependabot-update-13557.md

  • Packages: miniflare, wrangler
  • Version: patch
  • Status: ✅ Good - Clear dependency update with before/after versions

native-dev-registry-proxy.md

  • Packages: miniflare, wrangler, @cloudflare/vite-plugin
  • Version: minor
  • Status: ✅ Good - Feature improvement using workerd's debug port; minor version appropriate

nasty-years-taste.md

  • Package: wrangler
  • Version: patch
  • Status: ✅ Good - Clear bug fix description for R2 CORS validation

r2-bucket-list-no-config.md

  • Package: wrangler
  • Version: patch
  • Status: ✅ Good - Clear description explaining the rationale for the change

fix-ipv6-localhost-spin.md

  • Package: miniflare
  • Version: patch
  • Status: ✅ Good - Excellent description explaining the technical issue and solution

local-explorer-ui-fix-occured-typo.md

  • Package: @cloudflare/local-explorer-ui
  • Version: patch
  • Status: ✅ Good - Clear typo fix description

Checks Performed

  • ✅ Version types are appropriate for the changes described
  • ✅ Changelog descriptions are meaningful and explain user impact
  • ✅ No h1/h2/h3 headers found in any changeset
  • ✅ All non-dependency changesets have clear descriptions

@emily-shen
emily-shen merged commit 1aee990 into main Apr 16, 2026
67 of 70 checks passed
@emily-shen
emily-shen deleted the emily/vitest-recipes branch April 16, 2026 15:46
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 16, 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