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

enhancement/issue 1218 native import attributes parsing #1321

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

thescientist13
Copy link
Member

@thescientist13 thescientist13 commented Nov 14, 2024

Related Issue

resolves #1218

Documentation

N / A

Summary of Changes

  1. Upgrade to latest version of Acorn that now natively supports Import Attributes syntax
  2. Upgrade to Rollup v4 and bump all relevant Rollup plugins (which now also supports import attributes in some plugin hooks!)
  3. Add test cases to validate support for things like static and private class fields
  4. Had originally tried fixing not all expected modern JavaScript syntax supported #1183 but to support all this across browser, API routes, and SSR page bundling, needed to make all these above upgrades anyway

TODO

  1. Upstream this change to WCC and bump here - Import Attributes support in Acorn wcc#173
  2. WCC also needs some help for processing new syntax - escodegen fails on Class fields usage wcc#174
  3. should probably validate these changes in a downstream project or two, to be safe
  4. track full import attributes support in Rollup - Rollup causes syntax error by changing valid code to invalid code (import attributes with -> assert) rollup/rollup#5685
  5. archive / deprecate our custom fork - https://github.com/ProjectEvergreen/escodegen-esm

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working CLI enhancement Improve something existing (e.g. no docs, new APIs, etc) Plugins Greenwood Plugins
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Import Attributes support in Acorn not all expected modern JavaScript syntax supported
1 participant