-
Notifications
You must be signed in to change notification settings - Fork 28.9k
Turbopack: scope hoisting #79459
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
Turbopack: scope hoisting #79459
Changes from all commits
Commits
Show all changes
96 commits
Select commit
Hold shift + click to select a range
a8e483e
Always set exports on reference
mischnic db43184
__turbopack_esm_other__
mischnic 622e91f
Support additional ids in runtime
mischnic 9f5ec8c
MergeableModule
mischnic b758d0f
MergedModules Graph visitor
mischnic 85a3e9c
MergedModules Graph visitor
mischnic 30dd2d9
Convert modules in chunk_group_content
mischnic 3edd980
codegen
mischnic bd8d448
MergedEcmascriptModule
mischnic 6ba12cb
Emit additional id list
mischnic 238a41a
MergedModules per group bitmaps
mischnic ba76647
MergedModules global bitmap
mischnic 3b3e9bf
Don't merge CJS exports
mischnic 6c9b27e
MergedModules
mischnic 2040b1d
fixups
mischnic 2f2b782
fixup codegen
mischnic 391d9c1
WIP MergedModules externals
mischnic 0add007
fixup codegen
mischnic 8c3bff7
fixup MergedEcmascriptModule
mischnic cf4f14b
fixup MergedModules infinite loop
mischnic 42a0102
fix namespace imports inside merged group
mischnic 72fc1e5
Implement __turbopack_esm_other__ differently
mischnic adde1d8
fixup codegen
mischnic 2768749
Require missing exports
mischnic 77fcb19
Don't expose all modules
mischnic a3502aa
cleanup
mischnic e0db749
Async modules aren't mergeable
mischnic cac9439
Revert "undo merged_modules"
mischnic 2e17750
Expose namespace imported modules
mischnic 87d6726
Support ImportedNamespace reexports
mischnic 7ece57d
Fix reexports from unmerged modules
mischnic 3e1537a
Fix reexport-star inside of merged group
mischnic d3ce316
Fix local renaming when they are exports
mischnic 53ab7ab
Fix local renaming when they are exports
mischnic a5cb93c
Refactor: MergeableModule.is_mergable
mischnic ccc416c
Correct order of merged and unmerged references
mischnic 5a7c0b0
Fix list traversal with cycles
mischnic 72d0949
Ensure correct ordering
mischnic a542254
Multiple entries in a merged group
mischnic 2cecad4
Correctly compute merged group entries
mischnic 7a0feb2
Expose entry modules (assuming they are required)
mischnic 28b937b
is_module_merging_enabled on context, not in dev
mischnic 8da956c
Turbopack: remove dead code in runtime
mischnic 4ff4017
Fix module exposing due to splitting
mischnic d828952
Proper stubs for snapshots
mischnic 85b802f
Add turbopackScopeHoisting setting
mischnic 37a060b
Cleanup
mischnic cb013b7
Cleanup
mischnic b637d25
Fix availability info
mischnic 2ac1f5d
Improve error message
mischnic 9e83b34
Review feedback
mischnic 3fa4839
Don't mutate the globals in the cell
mischnic e3705f2
Fix reexport cycle hanging
mischnic e8da2b9
Change chunk item id to first entry instead
mischnic 6ef74d2
Review feedback: reverse map once
mischnic 4fa7678
Refactor ScopeHoistingContext
mischnic ecfb63a
Clone globals only if necessary
mischnic d50aecf
Emit correct comments for scope hoisted modules
mischnic c989d80
Better BytePos module encoding
mischnic cc28898
Emit correct source maps for scope hoisted modules
mischnic 6b1139b
Add test case
mischnic bdb716c
Include syntaxcontext in preserved_exports
mischnic 50083ee
Fix variable renaming again
mischnic 96aa75c
Cleanup
mischnic eeb5248
Insert comments for merged modules
mischnic cda71f8
Update snapshots
mischnic 6e8e874
Make AST merging more efficient
mischnic 4cf49bf
Add snapshot test for input source maps
mischnic 1982472
Bump swc_sourcemap
mischnic 3c1bb40
Fix original source maps for scope hoisting
mischnic 874d165
Cleanup
mischnic 60df2f1
Improve tests
mischnic 41d2637
MergeableModuleExposure
mischnic bc31ac2
Less cloning
mischnic 5a29c4a
Cleanup
mischnic 79012be
Cleanup
mischnic 2a89ff3
Dedupe imports
mischnic 5ea90bb
Leverage `ResolvedVc::deref_vec`
mischnic 4222ece
feedback: clarify MergeableModuleExposure
mischnic 5f0edc2
feedback: disallow scope hoisting in dev
mischnic 84d4afc
feedback: rewrite condition
mischnic ffa9c11
feedback: typos
mischnic d3b821d
feedback: get rid of clone
mischnic 027a091
feedback
mischnic c34168d
feedback: simplify
mischnic 4f1b34e
feedback: derive Ord instead
mischnic d7f3a89
feedback: relax memory ordering
mischnic 20316e4
Fixup name matching in prod
mischnic 554d7ee
feedback: rename to modules_header_width
mischnic 92d6027
add some more comments
mischnic 771595e
Fix reexports of CJS
mischnic 2f3d88d
Add test for CJS reexport
mischnic cffab22
Less strict Module/Script handling
mischnic 1b3d69a
Snapshot tests: setting for prod chunking
mischnic 5aef9b0
Fix shared chunk handling for merged modules
mischnic d3f5c0e
feedback: consistently use mergeable set instead of downcast
mischnic 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
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
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.
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.
Uh oh!
There was an error while loading. Please reload this page.