-
Notifications
You must be signed in to change notification settings - Fork 606
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
Refactor checkFetch from a separate method to a proxy around fetch #3497
Refactor checkFetch from a separate method to a proxy around fetch #3497
Conversation
🦋 Changeset detectedLatest commit: f221a61 The changes in this PR will be included in the next version bump. This PR includes changesets to release 1 package
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 |
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/5322410902/npm-package-wrangler-3497 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/3497/npm-package-wrangler-3497 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5322410902/npm-package-wrangler-3497 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5322410902/npm-package-cloudflare-pages-shared-3497 Note that these links will no longer work once the GitHub Actions artifact expires. |
Codecov Report
@@ Coverage Diff @@
## main #3497 +/- ##
==========================================
+ Coverage 75.18% 75.21% +0.02%
==========================================
Files 183 183
Lines 11055 11054 -1
Branches 2904 2903 -1
==========================================
+ Hits 8312 8314 +2
+ Misses 2743 2740 -3
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice little feature @evanderkoogh.
I have pulled this down and tried it out locally. It appears to work as expected.
(@evanderkoogh - I note your GH profile still says you are a PM at Cloudflare!)
…3497) * refactor checkFetch from a separate method to a proxy around fetch * Add changeset * prettier with the right options
Fixes #3478
What this PR solves / how to test:
This PR makes it possible to locally test Workers where the global
fetch
object is proxied with a Javascript Proxy.While this won't happen often in regular Workers, things like the Open Telemetry SDK do need that to intercept and instrument outgoing
fetch
calls.Associated docs issue(s)/PR(s):
This does not change any externally observable behaviour, so no tests are needed.
Author has included the following, where applicable:
Reviewer is to perform the following, as applicable: