Skip to content

feat(miniflare): add unsafeHandleDevRegistryUpdate callback option#10349

Merged
edmundhung merged 4 commits intomainfrom
edmundhung/registry-update-callback
Aug 13, 2025
Merged

feat(miniflare): add unsafeHandleDevRegistryUpdate callback option#10349
edmundhung merged 4 commits intomainfrom
edmundhung/registry-update-callback

Conversation

@edmundhung
Copy link
Copy Markdown
Member

@edmundhung edmundhung commented Aug 13, 2025

Fixes n/a.

This PR adds a new option unsafeHandleDevRegistryUpdate to Miniflare that allows users to register a callback function that gets invoked whenever the dev registry is updated with changes to external services that the current worker depends on.

This will be used by Wrangler to update bindings tables in a later PR (#10245).


  • Tests
    • Tests included
    • Tests not necessary because:
  • Public documentation
    • Cloudflare docs PR(s):
    • Documentation not necessary because: Updated Miniflare README
  • Wrangler V3 Backport
    • Wrangler PR:
    • Not necessary because: v4 only feature

@edmundhung edmundhung requested a review from a team as a code owner August 13, 2025 09:37
@changeset-bot
Copy link
Copy Markdown

changeset-bot Bot commented Aug 13, 2025

🦋 Changeset detected

Latest commit: a75e450

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

This PR includes changesets to release 5 packages
Name Type
miniflare Minor
@cloudflare/pages-shared Patch
@cloudflare/vite-plugin Patch
@cloudflare/vitest-pool-workers Patch
wrangler 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

@pkg-pr-new
Copy link
Copy Markdown

pkg-pr-new Bot commented Aug 13, 2025

create-cloudflare

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

@cloudflare/kv-asset-handler

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

miniflare

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

@cloudflare/pages-shared

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

@cloudflare/unenv-preset

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

@cloudflare/vite-plugin

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

@cloudflare/vitest-pool-workers

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

@cloudflare/workers-editor-shared

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

wrangler

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

commit: a75e450

@edmundhung edmundhung force-pushed the edmundhung/registry-update-callback branch 2 times, most recently from f2de4ef to 742c962 Compare August 13, 2025 10:29
@edmundhung edmundhung force-pushed the edmundhung/registry-update-callback branch from 742c962 to 84b3b73 Compare August 13, 2025 10:37
Comment thread .changeset/dev-registry-callback.md Outdated
Co-authored-by: Carmen Popoviciu <cpopoviciu@cloudflare.com>
Comment thread .changeset/dev-registry-callback.md Outdated
Comment thread packages/miniflare/src/shared/dev-registry.ts
Co-authored-by: Carmen Popoviciu <cpopoviciu@cloudflare.com>
Comment thread packages/miniflare/test/dev-registry.spec.ts Outdated
Comment thread packages/miniflare/test/dev-registry.spec.ts Outdated
Comment thread packages/miniflare/test/dev-registry.spec.ts Outdated
Comment thread packages/miniflare/test/dev-registry.spec.ts Outdated
Comment thread packages/miniflare/test/dev-registry.spec.ts Outdated
Comment thread packages/miniflare/test/dev-registry.spec.ts Outdated
Copy link
Copy Markdown
Contributor

@CarmenPopoviciu CarmenPopoviciu left a comment

Choose a reason for hiding this comment

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

great work on this!

@github-project-automation github-project-automation Bot moved this from Untriaged to Approved in workers-sdk Aug 13, 2025
Co-authored-by: Carmen Popoviciu <cpopoviciu@cloudflare.com>
@edmundhung edmundhung merged commit d54d8b7 into main Aug 13, 2025
45 of 50 checks passed
@github-project-automation github-project-automation Bot moved this from Approved to Done in workers-sdk Aug 13, 2025
@edmundhung edmundhung deleted the edmundhung/registry-update-callback branch August 13, 2025 20:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants