Refactor checkFetch from a separate method to a proxy around fetch#3497
Refactor checkFetch from a separate method to a proxy around fetch#3497petebacondarwin merged 3 commits intocloudflare:mainfrom
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-3497You 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-3497Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5322410902/npm-package-wrangler-3497 dev path/to/script.jsAdditional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/5322410902/npm-package-cloudflare-pages-shared-3497Note 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
|
petebacondarwin
left a comment
There was a problem hiding this comment.
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!)
Fixes #3478
What this PR solves / how to test:
This PR makes it possible to locally test Workers where the global
fetchobject 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
fetchcalls.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: