-
Notifications
You must be signed in to change notification settings - Fork 551
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
[Wrangler] Build target ES2022 #2720
Conversation
🦋 Changeset detectedLatest commit: d69b791 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/runs/4205465154/npm-package-wrangler-2720 You can reference the automatically updated head of this PR with: npm install --save-dev https://prerelease-registry.devprod.cloudflare.dev/prs/2720/npm-package-wrangler-2720 Or you can use npx https://prerelease-registry.devprod.cloudflare.dev/runs/4205465154/npm-package-wrangler-2720 dev path/to/script.js Additional artifacts:npm install https://prerelease-registry.devprod.cloudflare.dev/runs/4205465154/npm-package-cloudflare-pages-shared-2720 |
What about |
I'd rather not.
Sticking to a versioned target requires future bump, but it will be an intentional choice that we control and make rather than a side effect of future esbuild update. |
@penalosa Yeah so as much as I would like to, I think this is one of those things we have to manually try to stay on top of as Workerd updates to latest ECMA/V8. If we do something like |
Codecov Report
@@ Coverage Diff @@
## main #2720 +/- ##
==========================================
- Coverage 74.03% 68.16% -5.87%
==========================================
Files 166 166
Lines 10155 10155
Branches 2703 2703
==========================================
- Hits 7518 6922 -596
- Misses 2637 3233 +596
|
I didn't release v8 was so far behind |
… build in ESBuild before ES2022
…dflare/wrangler2 into jacobmgevans/esbuild-es2022
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! Using top-level await to detect es2022
with an error is clever. 🙂
What this PR solves / how to test:
Upgrade the target for JavaScript to ES2022 which is supported in the Worker runtime. You can test that it works by either inspecting your Workers built code or the code being sent over the wire on Publish, if it preserves the ES2022 code then it is working, the only thing we don't support on the Workers runtime (hence 99%) is the ES2022 RegEx feature as seen in the compat table for the latest Chrome version.
Author has included the following, where applicable:
Reviewer has performed the following, where applicable:
Fixes #2716