Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat: Add D1 binding support to Email Workers #2878

Merged
merged 1 commit into from
Mar 8, 2023
Merged

Conversation

rozenmd
Copy link
Contributor

@rozenmd rozenmd commented Mar 8, 2023

What this PR solves / how to test:

This PR makes it possible to query D1 from an Email Worker, assuming a binding has been setup.

As D1 is in alpha and not considered "production-ready", this changeset is a patch, rather than a minor bump to wrangler.

Associated docs issues/PR:

  • N/A

Author has included the following, where applicable:

  • Changeset

Reviewer has performed the following, where applicable:

  • Checked for inclusion of a relevant changeset
  • Manually pulled down the changes and spot-tested

Fixes #2876

@rozenmd rozenmd requested a review from a team as a code owner March 8, 2023 15:58
@rozenmd rozenmd self-assigned this Mar 8, 2023
@changeset-bot
Copy link

changeset-bot bot commented Mar 8, 2023

🦋 Changeset detected

Latest commit: d1c295e

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

This PR includes changesets to release 1 package
Name Type
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 Mar 8, 2023

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/4366105500/npm-package-wrangler-2878

You can reference the automatically updated head of this PR with:

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/2878/npm-package-wrangler-2878

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4366105500/npm-package-wrangler-2878 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4366105500/npm-package-cloudflare-pages-shared-2878

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

@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #2878 (d1c295e) into main (5bcc333) will increase coverage by 0.02%.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2878      +/-   ##
==========================================
+ Coverage   73.93%   73.96%   +0.02%     
==========================================
  Files         166      166              
  Lines       10251    10251              
  Branches     2745     2745              
==========================================
+ Hits         7579     7582       +3     
+ Misses       2672     2669       -3     
Impacted Files Coverage Δ
packages/wrangler/src/git-client.ts 43.75% <0.00%> (+4.16%) ⬆️
...ackages/wrangler/src/__tests__/helpers/mock-bin.ts 100.00% <0.00%> (+5.26%) ⬆️

Copy link
Contributor

@JacobMGEvans JacobMGEvans left a comment

Choose a reason for hiding this comment

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

Looks pretty straightforward and the changeset is clear on feature and reason for patching. Thanks!

@rozenmd rozenmd merged commit 6ebb23d into main Mar 8, 2023
@rozenmd rozenmd deleted the rozenmd/email-workers branch March 8, 2023 16:37
@github-actions github-actions bot mentioned this pull request Mar 8, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

🚀 Feature Request: Add the D1 shim to the email handler
2 participants