This repository has been archived by the owner on Apr 16, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
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
Refs: nodejs/modules#180 PR-URL: nodejs#6 Reviewed-By: Myles Borins <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Refs: nodejs/modules#180 PR-URL: nodejs#6 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Refs: nodejs/modules#180 PR-URL: nodejs#6 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
Refs: nodejs/modules#180 PR-URL: nodejs#6 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#6 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: John-David Dalton <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
PR-URL: nodejs#6 Reviewed-By: Guy Bedford <[email protected]> Reviewed-By: Myles Borins <[email protected]> Reviewed-By: Michaël Zasso <[email protected]>
This reverts commit 1b0695b.
I think I am in favor of less "virtual package json" magic, so... -0 |
MylesBorins
force-pushed
the
modules-lkgr
branch
from
March 18, 2019 15:42
3e26030
to
484d1fb
Compare
MylesBorins
force-pushed
the
modules-lkgr
branch
from
March 18, 2019 22:07
484d1fb
to
7efc53d
Compare
nodejs-ci
force-pushed
the
modules-lkgr
branch
3 times, most recently
from
March 21, 2019 08:06
c7fa700
to
d69f765
Compare
MylesBorins
force-pushed
the
modules-lkgr
branch
5 times, most recently
from
March 21, 2019 19:09
335d584
to
9a343ce
Compare
nodejs-ci
force-pushed
the
modules-lkgr
branch
3 times, most recently
from
March 24, 2019 08:06
3a00b51
to
bc101f6
Compare
MylesBorins
force-pushed
the
modules-lkgr
branch
3 times, most recently
from
March 27, 2019 02:42
fd5b55a
to
3a40599
Compare
MylesBorins
force-pushed
the
modules-lkgr
branch
from
March 27, 2019 18:53
6fe40a4
to
d9cdfd8
Compare
Sign up for free
to subscribe to this conversation on GitHub.
Already have an account?
Sign in.
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.
With the current implementation, there is an edge case of
--type
that doesn't quite work out.Consider:
main.js
where
dep.js
is also an ECMAScript module.Currently,
node --type=module main.js
will execute main.js as an ECMAScript module, but then when it loads dep.js it forgets the type flag and goes back to the old rules of CJS treatment, which is usually not the intention.This PR fixes this case by having the top-level
--type
flag apply as a scope on the folder of the entry point.I ended up refactoring the type errors and ESM_FORMAT implementation in the process, making both more consistent as a result while retaining the same implementation behaviours as previously. Moving ESM_FORMAT back into the C++ code in the process also fixes the TODO on the package.json cache sharing issue.
I've also updated the spec on how the
--type
flag works to reflect the above, and also fixed some spec bugs where it wasn't quite aligning with our implementation in that files without an extension that weren't the main were still being permitted.