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

Don't mangle constructor names with esbuild bundle #2780

Merged
merged 1 commit into from
Feb 21, 2023

Conversation

GregBrimble
Copy link
Member

What this PR solves / how to test:

Associated docs issues/PR:

  • [insert associated docs issue(s)/PR(s)]

Author has included the following, where applicable:

  • Tests
  • Changeset

Reviewer has performed the following, where applicable:

  • Checked for inclusion of relevant tests
  • Checked for inclusion of a relevant changeset
  • Checked for creation of associated docs updates
  • Manually pulled down the changes and spot-tested

Fixes # [insert issue number].

@GregBrimble GregBrimble requested a review from a team as a code owner February 21, 2023 15:00
@changeset-bot
Copy link

changeset-bot bot commented Feb 21, 2023

🦋 Changeset detected

Latest commit: 49e3142

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

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/4233967194/npm-package-wrangler-2780

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

npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/prs/2780/npm-package-wrangler-2780

Or you can use npx with this latest build directly:

npx https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4233967194/npm-package-wrangler-2780 dev path/to/script.js
Additional artifacts:
npm install https://prerelease-registry.devprod.cloudflare.dev/workers-sdk/runs/4233967194/npm-package-cloudflare-pages-shared-2780

Note that these links will no longer work once the GitHub Actions artifact expires.

@GregBrimble
Copy link
Member Author

Tested on a wrangler pages publish. Fixes it!

@codecov
Copy link

codecov bot commented Feb 21, 2023

Codecov Report

Merging #2780 (49e3142) into main (7912e63) will increase coverage by 0.01%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #2780      +/-   ##
==========================================
+ Coverage   73.98%   74.00%   +0.01%     
==========================================
  Files         166      166              
  Lines       10161    10163       +2     
  Branches     2705     2705              
==========================================
+ Hits         7518     7521       +3     
+ Misses       2643     2642       -1     
Impacted Files Coverage Δ
packages/wrangler/src/dev/local.tsx 22.14% <0.00%> (-0.17%) ⬇️
packages/wrangler/src/git-client.ts 43.75% <0.00%> (+4.16%) ⬆️
...ackages/wrangler/src/__tests__/helpers/mock-bin.ts 100.00% <0.00%> (+5.26%) ⬆️

@penalosa
Copy link
Contributor

For posterity, this is a workaround for nodejs/undici#1952

@GregBrimble GregBrimble merged commit 80f1187 into main Feb 21, 2023
@GregBrimble GregBrimble deleted the dont-mangle-constructor-names-with-esbuild-bundle branch February 21, 2023 15:25
@mrbbot
Copy link
Contributor

mrbbot commented Feb 21, 2023

Nice! 😃 FWIW, I don't think we ever released a version of wrangler with an updated version of undici before this fix. We should be very careful with undici upgrades in the future though, definitely not the first time we've been burnt by them.

@github-actions github-actions bot mentioned this pull request Feb 21, 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

3 participants