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 cloudflare module worker support #681

Merged
merged 28 commits into from
Apr 11, 2023

Conversation

timhanlon
Copy link
Contributor

πŸ”— Linked issue

#91

❓ Type of change

  • πŸ“– Documentation (updates to the documentation or readme)
  • 🐞 Bug fix (a non-breaking change that fixes an issue)
  • πŸ‘Œ Enhancement (improving an existing functionality like performance)
  • ✨ New feature (a non-breaking change that adds functionality)
  • ⚠️ Breaking change (fix or feature that would cause existing functionality to change)

πŸ“š Description

Adds initial support for Cloudflare Module Workers as discussed here.

πŸ“ Checklist

  • I have linked an issue or discussion.
  • I have updated the documentation accordingly.

@marshallswain
Copy link
Contributor

Prerequisite: #677

@DaniFoldi
Copy link
Contributor

+1 on this, small note for the docs that service worker syntax also supports service bindings, it's just DO and D1 (since it's basically a DO) that are limited to module workers.

@timhanlon timhanlon mentioned this pull request Feb 5, 2023
7 tasks
@timhanlon
Copy link
Contributor Author

+1 on this, small note for the docs that service worker syntax also supports service bindings, it's just DO and D1 (since it's basically a DO) that are limited to module workers.

Thanks for the heads up, that's been corrected.

@manniL manniL requested a review from pi0 February 18, 2023 21:50
@nuxt-studio
Copy link
Contributor

nuxt-studio bot commented Mar 8, 2023

βœ… Live Preview ready!

Name Edit Preview Latest Commit
nitro Edit on Studio β†—οΈŽ View Live Preview 8560e02

@codecov
Copy link

codecov bot commented Mar 8, 2023

Codecov Report

Merging #681 (d046631) into main (2d55caf) will increase coverage by 0.04%.
The diff coverage is 76.47%.

❗ Current head d046631 differs from pull request most recent head 8560e02. Consider uploading reports for the commit 8560e02 to get more accurate results

@@            Coverage Diff             @@
##             main     #681      +/-   ##
==========================================
+ Coverage   67.77%   67.81%   +0.04%     
==========================================
  Files          63       64       +1     
  Lines        6370     6403      +33     
  Branches      713      713              
==========================================
+ Hits         4317     4342      +25     
- Misses       2039     2047       +8     
  Partials       14       14              
Impacted Files Coverage Ξ”
src/presets/cloudflare-module.ts 75.00% <75.00%> (ΓΈ)
src/presets/index.ts 100.00% <100.00%> (ΓΈ)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

@pi0
Copy link
Member

pi0 commented Apr 11, 2023

Thanks for the PR and sorry this took long.

I have pushed few improvements to add tests and make it more consistent with cf-pages preset and using direct fetch.

@pi0 pi0 merged commit de7e59e into unjs:main Apr 11, 2023
@pi0 pi0 mentioned this pull request Apr 28, 2023
@Hebilicious Hebilicious mentioned this pull request Jun 30, 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.

None yet

5 participants