-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Support ES6 module syntax in Acorn and Closure #23730
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
Merged
Merged
Changes from all commits
Commits
Show all changes
42 commits
Select commit
Hold shift + click to select a range
ea0ed86
Cherry-pick 234940f032e4353a4390af02bbc59a6a9f87afcf
kleisauke decb8f8
Fix test failure in `core2.test_modularize_closure_pre`
kleisauke 908c47c
Fix test failure in `core2.test_pthread_proxying_modularize`
kleisauke 985f4dc
Remove redundant code
kleisauke 254ed04
Automatic rebaseline of codesize expectations. NFC
kleisauke e194143
Fix test failure in `browser.test_cross_origin_es6`
kleisauke 047b852
Ensure 2-space indent
kleisauke b077e9c
Fix test failure in `browser_2gb.test_source_phase_imports`
kleisauke b7c92f5
Avoid dependence on PR #23261
kleisauke 1fbc5ca
Closure doesn't support top-level await
kleisauke dbf6e5e
Allow Babel to parse top-level await
kleisauke e9f3e23
Merge branch 'main' into es6-acorn-closure
kleisauke d745291
Automatic rebaseline of codesize expectations. NFC
kleisauke 31cf27b
Merge branch 'main' into es6-acorn-closure
kleisauke f2fbf66
Revise comments
kleisauke 6ac9b01
Allow Babel to parse `import.meta`
kleisauke 083405a
Ensure `import()` expressions are not Babeled
kleisauke ef36474
Ensure Closure doesn't minify `require()`
kleisauke df79ebe
Automatic rebaseline of codesize expectations. NFC
kleisauke 711efc1
`globalThis` -> `global`
kleisauke 0972e63
Automatic rebaseline of codesize expectations. NFC
kleisauke 5fd7830
Add comment regarding `export{};`
kleisauke 06d1884
Merge branch 'main' into es6-acorn-closure
kleisauke 0ea5e1c
Automatic rebaseline of codesize expectations. NFC
kleisauke bd18866
`modules.js` was renamed to `modules.mjs`
kleisauke 2d6ba19
Merge branch 'main' into es6-acorn-closure
kleisauke af43dd1
Revert "Ensure Closure doesn't minify `require()`"
kleisauke 5c2f12b
Restore the mangling logic to its original location
kleisauke 0b218f2
Prefer use of `replaceAll`
kleisauke cf6417c
Add comment
kleisauke 8283862
Automatic rebaseline of codesize expectations. NFC
kleisauke f74a9b7
`parseTools.js` was renamed to `parseTools.mjs`
kleisauke 11a3324
Move unmangling to JS compiler
kleisauke decf760
Update comment
kleisauke f8be17f
Update comment (2)
kleisauke dd9e7bc
Merge branch 'main' into es6-acorn-closure
kleisauke 39c3bae
Merge branch 'main' into es6-acorn-closure
kleisauke 82db117
Automatic rebaseline of codesize expectations. NFC
kleisauke c5114bd
Merge branch 'main' into es6-acorn-closure
kleisauke 75f626a
Automatic rebaseline of codesize expectations. NFC
kleisauke fc46e0a
Ensure Closure doesn't minify `Module` in `--chunk_output_type=ES_MOD…
kleisauke 10e6383
Update comment references
kleisauke File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
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.
Perhaps mention why we are doing this?
Something like "Unmangle import.meta which was only mangled to allow the code to flow through vm.runInContext".
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.
This is already mentioned in the comment that is referenced.
emscripten/src/parseTools.mjs
Lines 38 to 43 in 10e6383