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

fix: instruct api to exclude script content on worker upload #1248

Merged
merged 1 commit into from
Jun 14, 2022

Conversation

threepointone
Copy link
Contributor

@threepointone threepointone commented Jun 13, 2022

When we upload a script bundle, we get the actual content of the script back in the response. Sometimes that script can be large (depending on whether the upload was large), and currently it may even be a badly escaped string. We can pass a queryparam excludeScript that, as it implies, exclude the script content in the response. This fix does that.

Will eventually fix #1222


This fix working is dependent on the internal api rolling out support for this query param, which is imminent.

@changeset-bot
Copy link

changeset-bot bot commented Jun 13, 2022

🦋 Changeset detected

Latest commit: d1fbaef

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 Jun 13, 2022

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/2491337621/npm-package-wrangler-1248

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

npm install --save-dev https://prerelease-registry.developers.workers.dev/prs/1248/npm-package-wrangler-1248

Or you can use npx with this latest build directly:

npx https://prerelease-registry.developers.workers.dev/runs/2491337621/npm-package-wrangler-1248 dev path/to/script.js

When we upload a script bundle, we get the actual content of the script back in the response. Sometimes that script can be large (depending on whether the upload was large), and currently it may even be a badly escaped string. We can pass a queryparam `excludeScript` that, as it implies, exclude the script content in the response. This fix does that.

Fixes #1222
@threepointone threepointone marked this pull request as ready for review June 14, 2022 09:19
@threepointone
Copy link
Contributor Author

Let's land this anyway, so the api rolling out will fix anyone already using this patch.

Copy link
Contributor

@rozenmd rozenmd left a comment

Choose a reason for hiding this comment

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

LGTM 👍

@threepointone threepointone merged commit db8a0bb into main Jun 14, 2022
@threepointone threepointone deleted the exclude-script-on-upload branch June 14, 2022 09:40
@github-actions github-actions bot mentioned this pull request Jun 14, 2022
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.

🐛 BUG: Received a malformed response from the API
2 participants