Skip to content

Support V2 protocol for module fallback service in Miniflare and Vite plugin#13618

Merged
jamesopstad merged 5 commits into
mainfrom
james/support-new-module-registry
Apr 29, 2026
Merged

Support V2 protocol for module fallback service in Miniflare and Vite plugin#13618
jamesopstad merged 5 commits into
mainfrom
james/support-new-module-registry

Conversation

@jamesopstad

Copy link
Copy Markdown
Contributor

When the new_module_registry compatibility flag is set, requests sent to unsafeModuleFallbackService() use a different protocol. This adds support in Miniflare and the Vite plugin.

Updating vitest-pool-workers is considerably more complex so that will follow in a separate PR.


  • 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: internal change

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

@changeset-bot

changeset-bot Bot commented Apr 21, 2026

Copy link
Copy Markdown

🦋 Changeset detected

Latest commit: 64db9aa

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 21, 2026

Copy link
Copy Markdown
Contributor

UnknownError: ProviderInitError

github run

@ask-bonk

ask-bonk Bot commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

@jamesopstad Bonk workflow failed. Check the logs for details.

View workflow run · To retry, trigger Bonk again.

@pkg-pr-new

pkg-pr-new Bot commented Apr 21, 2026

Copy link
Copy Markdown
create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

@cloudflare/workers-utils

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

wrangler

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

commit: 64db9aa

@jamesopstad jamesopstad marked this pull request as ready for review April 21, 2026 09:39
@jamesopstad jamesopstad changed the title Support V2 protocol for module fallback service Support V2 protocol for module fallback service in Miniflare and Vite plugin Apr 21, 2026
@workers-devprod workers-devprod requested review from a team and dario-piotrowicz and removed request for a team April 21, 2026 09:39
@workers-devprod

workers-devprod commented Apr 21, 2026

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

devin-ai-integration[bot]

This comment was marked as resolved.

@jamesopstad jamesopstad force-pushed the james/support-new-module-registry branch 2 times, most recently from b5202a2 to fd3edb4 Compare April 22, 2026 09:13

@dario-piotrowicz dario-piotrowicz 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.

Looks good to me, with some few minor comments/suggestions 🙂

Comment thread packages/vite-plugin-cloudflare/src/miniflare-options.ts Outdated
Comment thread packages/miniflare/src/plugins/core/module-fallback.ts Outdated
Comment thread packages/miniflare/test/index.spec.ts Outdated

@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 24, 2026
@jamesopstad jamesopstad force-pushed the james/support-new-module-registry branch from fd3edb4 to 64db9aa Compare April 29, 2026 11:32
@workers-devprod

Copy link
Copy Markdown
Contributor

Codeowners approval required for this PR:

  • ✅ @cloudflare/wrangler
Show detailed file reviewers

@github-actions

Copy link
Copy Markdown
Contributor

Changeset Review

Files Reviewed

  • .changeset/shaky-parks-buy.md
  • .changeset/twelve-eggs-fetch.md

Review Results

✅ All changesets look good

Details

shaky-parks-buy.md (miniflare - minor)

  • Version Type: Minor is appropriate for adding V2 protocol support (new feature)
  • Changelog Quality: Clear description explaining the change and the exported parseModuleFallbackRequest() utility
  • Markdown Headers: No h1/h2/h3 headers found
  • Experimental Feature: References new_module_registry compatibility flag for opting in

twelve-eggs-fetch.md (@cloudflare/vite-plugin - minor)

  • Version Type: Minor is appropriate for adding V2 protocol support (new feature)
  • Changelog Quality: Clear description explaining V2 protocol support for additional module types
  • Markdown Headers: No h1/h2/h3 headers found
  • Experimental Feature: References new_module_registry compatibility flag for opting in

@jamesopstad jamesopstad merged commit c07d0cb into main Apr 29, 2026
62 checks passed
@jamesopstad jamesopstad deleted the james/support-new-module-registry branch April 29, 2026 12:19
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Apr 29, 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