cloudflare / miniflare

🔥 Fully-local simulator for Cloudflare Workers. For the latest version, see https://github.com/cloudflare/workers-sdk/tree/main/packages/miniflare.
https://miniflare.dev
MIT License
3.78k stars 205 forks source link

Removing shim from D1 #628

Closed geelen closed 1 year ago

geelen commented 1 year ago

Now that workerd includes the D1 shim, we no longer need wrangler to bundle it, and no longer require all bindings to be prefixed with __D1_BETA__.

This will need to be released alongside the Wrangler version that drops support for the shim as well, currently being tracked in this PR: https://github.com/cloudflare/workers-sdk/pull/3595

changeset-bot[bot] commented 1 year ago

⚠️ No Changeset found

Latest commit: 23701d9d45c6d4199a8d569743259d0820720929

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.

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

geelen commented 1 year ago

Updated the PR to make Miniflare backwards-compatible with the older style of bindings.

I also broke the test apart into a shared.ts, which has the basic test infra, and then a suite.ts, since the two test cases differ only on which file they're including, and the binding name.

Not sure this is great but for right now, all I want to confirm is that the runtime shim has the exact same behaviour as the Wrangler-based shim...