Skip to content

Support Mixed Mode Service Bindings in Miniflare#9186

Merged
penalosa merged 3 commits intomainfrom
penalosa/mixed-mode-service-bindings
May 12, 2025
Merged

Support Mixed Mode Service Bindings in Miniflare#9186
penalosa merged 3 commits intomainfrom
penalosa/mixed-mode-service-bindings

Conversation

@penalosa
Copy link
Contributor

@penalosa penalosa commented May 9, 2025

Continuation of DEVX-1859

This PR adds support for service bindings to Miniflare's Mixed Mode—both with and without custom entrypoints. Currently only .fetch() calls are supported, rather than full JSRPC communication.


  • Tests
    • TODO (before merge)
    • Tests included
    • Tests not necessary because:
  • Wrangler / Vite E2E Tests CI Job required? (Use "e2e" label or ask maintainer to run separately)
    • I don't know
    • Required
    • Not required because: covered by fixture
  • Public documentation
    • TODO (before merge)
    • Cloudflare docs PR(s):
    • Documentation not necessary because: WIP feature
  • Wrangler V3 Backport
    • TODO (before merge)
    • Wrangler PR:
    • Not necessary because: new feature

@penalosa penalosa requested a review from a team as a code owner May 9, 2025 12:19
@changeset-bot
Copy link

changeset-bot bot commented May 9, 2025

🦋 Changeset detected

Latest commit: f9762e2

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

This PR includes changesets to release 5 packages
Name Type
miniflare Patch
@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

@github-actions
Copy link
Contributor

github-actions bot commented May 9, 2025

A Wrangler prerelease is available for testing. You can install this latest build in your project with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-wrangler-9186
Prereleases for other packages:

cloudflare-workers-bindings-extension:

wget https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-workers-bindings-extension-9186 -O ./cloudflare-workers-bindings-extension.0.0.0-vd3201c8c7.vsix && code --install-extension ./cloudflare-workers-bindings-extension.0.0.0-vd3201c8c7.vsix

create-cloudflare:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-create-cloudflare-9186 --no-auto-update

@cloudflare/kv-asset-handler:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-kv-asset-handler-9186

miniflare:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-miniflare-9186

@cloudflare/pages-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-pages-shared-9186

@cloudflare/unenv-preset:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-unenv-preset-9186

@cloudflare/vite-plugin:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-vite-plugin-9186

@cloudflare/vitest-pool-workers:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-vitest-pool-workers-9186

@cloudflare/workers-editor-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-workers-editor-shared-9186

@cloudflare/workers-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-workers-shared-9186

@cloudflare/workflows-shared:

npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/14970922320/npm-package-cloudflare-workflows-shared-9186

Note that these links will no longer work once the GitHub Actions artifact expires.

@penalosa penalosa force-pushed the penalosa/mixed-mode-service-bindings branch from 5e45600 to 6fa4354 Compare May 12, 2025 11:13
Copy link
Member

@dario-piotrowicz dario-piotrowicz left a comment

Choose a reason for hiding this comment

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

Looks great to me! 🤩

(I just left a very minor nit, feel free to ignore it if you disagree with it)

@github-project-automation github-project-automation bot moved this from Untriaged to Approved in workers-sdk May 12, 2025
@penalosa penalosa added this pull request to the merge queue May 12, 2025
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 12, 2025
@penalosa penalosa added this pull request to the merge queue May 12, 2025
github-merge-queue bot pushed a commit that referenced this pull request May 12, 2025
* Support Service Bindings

* fix lint

* Create old-trainers-camp.md
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks May 12, 2025
@penalosa penalosa added this pull request to the merge queue May 12, 2025
Merged via the queue into main with commit 362cb0b May 12, 2025
18 checks passed
@penalosa penalosa deleted the penalosa/mixed-mode-service-bindings branch May 12, 2025 16:41
@github-project-automation github-project-automation bot moved this from Approved to Done in workers-sdk May 12, 2025
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