esm: make dynamic import work in the REPL#29437
Closed
bmeck wants to merge 1 commit intonodejs:masterfrom
Closed
Conversation
lpinca
approved these changes
Sep 4, 2019
BridgeAR
approved these changes
Sep 4, 2019
lib/repl.js
Outdated
Member
There was a problem hiding this comment.
Should that not be loaded at the top level?
Member
Author
There was a problem hiding this comment.
could be, but i don't think we eagerly load esm_loader at top in most places since it is experimental/flagged, we do so as late as possible like in
node/lib/internal/bootstrap/pre_execution.js
Line 388 in 85898e0
Member
Author
There was a problem hiding this comment.
moved up but remaining in defaultEval; made it lazier.
lib/repl.js
Outdated
Member
There was a problem hiding this comment.
Nit: please move it out of the loop, since it won't change inside of the loop.
devsnek
approved these changes
Sep 4, 2019
devnexen
approved these changes
Sep 5, 2019
b8c663d to
b798182
Compare
Member
Author
|
rebased, running CI then will merge if no objections |
Collaborator
Member
Author
|
Landed in cdebd32 |
bmeck
pushed a commit
that referenced
this pull request
Sep 6, 2019
PR-URL: #29437 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: David Carlier <[email protected]>
targos
pushed a commit
that referenced
this pull request
Sep 20, 2019
PR-URL: #29437 Reviewed-By: Luigi Pinca <[email protected]> Reviewed-By: Ruben Bridgewater <[email protected]> Reviewed-By: Gus Caplan <[email protected]> Reviewed-By: David Carlier <[email protected]>
Merged
This was referenced Sep 25, 2019
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
This ensures that
import("fs")will work in the REPL with--experimental-modulesChecklist
make -j4 test(UNIX), orvcbuild test(Windows) passes