-
Notifications
You must be signed in to change notification settings - Fork 660
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
fix: add fetch()
dev helper correctly for pnp style package managers
#1496
Conversation
🦋 Changeset detectedLatest commit: 1381929 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.developers.workers.dev/runs/2697120081/npm-package-wrangler-1496 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1496/npm-package-wrangler-1496 Or you can use npx https://prerelease-registry.developers.workers.dev/runs/2697120081/npm-package-wrangler-1496 dev path/to/script.js |
Codecov Report
@@ Coverage Diff @@
## main #1496 +/- ##
==========================================
- Coverage 78.62% 78.59% -0.03%
==========================================
Files 84 84
Lines 5768 5771 +3
Branches 1484 1484
==========================================
+ Hits 4535 4536 +1
- Misses 1233 1235 +2
|
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 fast turnaround @threepointone - just one NIT.
In #992, we added a dev-only helper that would warn when using `fetch()` in a manner that wouldn't work as expected (because of a bug we currently have in the runtime). We did this by injecting a file that would override usages of `fetch()`. When using pnp style package managers like yarn, this file can't be resolved correctly. So to fix that, we extract it into the temporary destination directory that we use to build the worker (much like a similar fix we did in #1154) Reported at #1320 (comment)
a4f507d
to
1381929
Compare
In #992, we added a dev-only helper that would warn when using
fetch()
in a manner that wouldn't work as expected (because of a bug we currently have in the runtime). We did this by injecting a file that would override usages offetch()
. When using pnp style package managers like yarn, this file can't be resolved correctly. So to fix that, we extract it into the temporary destination directory that we use to build the worker (much like a similar fix we did in #1154)Reported at #1320 (comment)