-
Notifications
You must be signed in to change notification settings - Fork 29.6k
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
esm: remove CLI flag limitation to programmatic registration #48439
Closed
JakobJingleheimer
wants to merge
13
commits into
nodejs:main
from
JakobJingleheimer:esm/instantiate-worker-on-demand
Closed
Changes from 2 commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
28055ff
esm: remove CLI flag limitation to programmatic registration
JakobJingleheimer d4a5dd8
WIP: disentangle `loader` from `ModuleJob`
JakobJingleheimer 378c5a5
WIP: continue to detangle ModuleJob & ESMLoader
JakobJingleheimer d2ad85b
WIP: add debugs
JakobJingleheimer 02c6090
WIP: await getting module job (now always async)
JakobJingleheimer cb72d94
WIP: move initialize import.meta out of module loader
JakobJingleheimer 77e91dc
WIP: tweak debugs
JakobJingleheimer 582f50a
correct ModuleJob(`url` → `responseURL`)
JakobJingleheimer ec5d529
move `setCallbackForWrap` back into `translator('module')`
JakobJingleheimer e6e8cac
fix: restore `setCallbackForWrap` in `ModuleLoader::eval()`
JakobJingleheimer 3819d08
fix: restore gate of `import.meta.resolve` within loader worker
JakobJingleheimer 9ff1de7
fix: existing `job` detection
JakobJingleheimer 6fa7dc7
WIP: investigate missing/tardy job entry in ModuleMap
JakobJingleheimer 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 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 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
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.
i'm confused why a map's "has" function would ever take more than one argument. is
moduleMap
something that's not a Map?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.
Good question! I also had to ask what this is.
The extra argument (import assertion type) is per spec required for matching cache. Under the hood, the extra argument is stored as part of the value (or maybe the key?).
I'll add some code doc for it after I get this stable/passing.
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.
I think it’s very confusing to have something called “map” whose method names violate the expected interface contract for a Map, but i assume that predates this PR. (iow, i think instead of using has/set/etc it should have brand new method names)
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.
Yes, this PR does not introduce
ModuleMap
;)