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

module: Allow runMain to be ESM #14369

Closed
wants to merge 1 commit into
base: master
from

Conversation

@bmeck
Member

bmeck commented Jul 19, 2017

This follows the EPS an allows the node CLI to have ESM as an entry point.
node ./example.mjs. A newer V8 is needed for import() so that is not
included. import.meta is still in specification stage so that also is not
included.

Author: Bradley Farias bradley.meck@gmail.com
Author: Guy Bedford guybedford@gmail.com
Author: Jan Krems jan.krems@groupon.com

Checklist
  • make -j4 test (UNIX), or vcbuild test (Windows) passes
  • tests and/or benchmarks are included
  • documentation is changed or added
  • commit message follows commit guidelines
Affected core subsystem(s)
@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Jul 19, 2017

Member

Going to be on vacation til TC39 next week / tests need to be pulled in from sketchy. Opening this since it is going to want a lot of eyes.

Member

bmeck commented Jul 19, 2017

Going to be on vacation til TC39 next week / tests need to be pulled in from sketchy. Opening this since it is going to want a lot of eyes.

@jasnell

This comment has been minimized.

Show comment
Hide comment
@jasnell

jasnell Jul 19, 2017

Member

Great to see progress here. Won't have an opportunity to review likely until after NodeSummit next week.

Member

jasnell commented Jul 19, 2017

Great to see progress here. Won't have an opportunity to review likely until after NodeSummit next week.

@TimothyGu

More to come later. Is the C++ resolution necessary or for performance? I kinda drew the line at parsing JSON in C++...

Show outdated Hide outdated lib/internal/loader/resolveRequestUrl.js
Show outdated Hide outdated lib/internal/loader/resolveRequestUrl.js
Show outdated Hide outdated lib/internal/loader/Loader.js
@@ -0,0 +1,24 @@
const copyProps = (unsafe, safe) => {

This comment has been minimized.

@TimothyGu

TimothyGu Jul 20, 2017

Member

If this is necessary, 'use strict'.

@TimothyGu

TimothyGu Jul 20, 2017

Member

If this is necessary, 'use strict'.

This comment has been minimized.

@bmeck

bmeck Aug 30, 2017

Member

was fixed, forgot to reply

@bmeck

bmeck Aug 30, 2017

Member

was fixed, forgot to reply

Show outdated Hide outdated lib/internal/loader/resolveRequestUrl.js
Show outdated Hide outdated src/loader/module_wrap.cc
Show outdated Hide outdated src/loader/module_wrap.cc
Show outdated Hide outdated src/loader/module_wrap.cc
Show outdated Hide outdated src/loader/module_wrap.cc
Show outdated Hide outdated src/loader/module_wrap.cc

@targos targos referenced this pull request Jul 20, 2017

Closed

Call with V8 team, #3 #156

@mcollina

This is a very complex feature to review without any attached unit tests. Would you mind adding them?

@targos

This comment has been minimized.

Show comment
Hide comment
@targos

targos Jul 20, 2017

Member

I took the liberty to fix ESLint issues and compilation.
I don't think this is ready to be reviewed:

make test
$ make test
make -C out BUILDTYPE=Release V=1
  touch 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
  LD_LIBRARY_PATH=/home/mzasso/git/nodejs/node/out/Release/lib.host:/home/mzasso/git/nodejs/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/src/inspector; mkdir -p /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector/protocol /home/mzasso/git/nodejs/node/out/Release/obj/gen/include/inspector; python ../../third_party/inspector_protocol/CodeGenerator.py --jinja_dir ../../third_party --output_base "/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector" --config inspector_protocol_config.json
rm 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
make build-addons
make -C out BUILDTYPE=Release V=1
  touch 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
  LD_LIBRARY_PATH=/home/mzasso/git/nodejs/node/out/Release/lib.host:/home/mzasso/git/nodejs/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/src/inspector; mkdir -p /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector/protocol /home/mzasso/git/nodejs/node/out/Release/obj/gen/include/inspector; python ../../third_party/inspector_protocol/CodeGenerator.py --jinja_dir ../../third_party --output_base "/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector" --config inspector_protocol_config.json
rm 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
rm -f -r test/addons/??_*/
./node tools/doc/addon-verify.js
/home/mzasso/git/nodejs/node/tools/doc/addon-verify.js:13
const tokens = marked.lexer(contents);
                     ^

TypeError: Cannot read property 'lexer' of undefined
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/tools/doc/addon-verify.js:13:22)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Makefile:230: recipe for target 'test/addons/.docbuildstamp' failed
make[1]: *** [test/addons/.docbuildstamp] Error 1
Makefile:196: recipe for target 'test' failed
make: *** [test] Error 2
make test-parallel
$ make test-parallel
make -C out BUILDTYPE=Release V=1
  touch 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
  LD_LIBRARY_PATH=/home/mzasso/git/nodejs/node/out/Release/lib.host:/home/mzasso/git/nodejs/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/src/inspector; mkdir -p /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector/protocol /home/mzasso/git/nodejs/node/out/Release/obj/gen/include/inspector; python ../../third_party/inspector_protocol/CodeGenerator.py --jinja_dir ../../third_party --output_base "/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector" --config inspector_protocol_config.json
rm 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
/usr/bin/python tools/test.py --mode=release parallel -J
=== release test-assert-checktag ===
Path: parallel/test-assert-checktag
/home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js:17
  return common.expectsError({
               ^

TypeError: Cannot read property 'expectsError' of undefined
    at re (/home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js:17:16)
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js:39:19)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js
=== release test-assert-deep ===
Path: parallel/test-assert-deep
/home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js:17
  return common.expectsError({
               ^

TypeError: Cannot read property 'expectsError' of undefined
    at re (/home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js:17:16)
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js:34:17)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js
=== release test-assert ===
Path: parallel/test-assert
/home/mzasso/git/nodejs/node/test/parallel/test-assert.js:42
  common.expectsError({
        ^

TypeError: Cannot read property 'expectsError' of undefined
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-assert.js:42:9)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-assert.js
=== release test-async-hooks-close-during-destroy ===
Path: parallel/test-async-hooks-close-during-destroy
/home/mzasso/git/nodejs/node/test/parallel/test-async-hooks-close-during-destroy.js:14
  init: common.mustCallAtLeast((id, provider, triggerAsyncId) => {
              ^

TypeError: Cannot read property 'mustCallAtLeast' of undefined
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-async-hooks-close-during-destroy.js:14:15)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-async-hooks-close-during-destroy.js

...
Member

targos commented Jul 20, 2017

I took the liberty to fix ESLint issues and compilation.
I don't think this is ready to be reviewed:

make test
$ make test
make -C out BUILDTYPE=Release V=1
  touch 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
  LD_LIBRARY_PATH=/home/mzasso/git/nodejs/node/out/Release/lib.host:/home/mzasso/git/nodejs/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/src/inspector; mkdir -p /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector/protocol /home/mzasso/git/nodejs/node/out/Release/obj/gen/include/inspector; python ../../third_party/inspector_protocol/CodeGenerator.py --jinja_dir ../../third_party --output_base "/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector" --config inspector_protocol_config.json
rm 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
make build-addons
make -C out BUILDTYPE=Release V=1
  touch 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
  LD_LIBRARY_PATH=/home/mzasso/git/nodejs/node/out/Release/lib.host:/home/mzasso/git/nodejs/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/src/inspector; mkdir -p /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector/protocol /home/mzasso/git/nodejs/node/out/Release/obj/gen/include/inspector; python ../../third_party/inspector_protocol/CodeGenerator.py --jinja_dir ../../third_party --output_base "/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector" --config inspector_protocol_config.json
rm 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
rm -f -r test/addons/??_*/
./node tools/doc/addon-verify.js
/home/mzasso/git/nodejs/node/tools/doc/addon-verify.js:13
const tokens = marked.lexer(contents);
                     ^

TypeError: Cannot read property 'lexer' of undefined
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/tools/doc/addon-verify.js:13:22)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Makefile:230: recipe for target 'test/addons/.docbuildstamp' failed
make[1]: *** [test/addons/.docbuildstamp] Error 1
Makefile:196: recipe for target 'test' failed
make: *** [test] Error 2
make test-parallel
$ make test-parallel
make -C out BUILDTYPE=Release V=1
  touch 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
  LD_LIBRARY_PATH=/home/mzasso/git/nodejs/node/out/Release/lib.host:/home/mzasso/git/nodejs/node/out/Release/lib.target:$LD_LIBRARY_PATH; export LD_LIBRARY_PATH; cd ../deps/v8/src/inspector; mkdir -p /home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector/protocol /home/mzasso/git/nodejs/node/out/Release/obj/gen/include/inspector; python ../../third_party/inspector_protocol/CodeGenerator.py --jinja_dir ../../third_party --output_base "/home/mzasso/git/nodejs/node/out/Release/obj/gen/src/inspector" --config inspector_protocol_config.json
rm 9349840c76d301fd95cb4ac8c5f455128549de34.intermediate
if [ ! -r node -o ! -L node ]; then ln -fs out/Release/node node; fi
/usr/bin/python tools/test.py --mode=release parallel -J
=== release test-assert-checktag ===
Path: parallel/test-assert-checktag
/home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js:17
  return common.expectsError({
               ^

TypeError: Cannot read property 'expectsError' of undefined
    at re (/home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js:17:16)
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js:39:19)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-assert-checktag.js
=== release test-assert-deep ===
Path: parallel/test-assert-deep
/home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js:17
  return common.expectsError({
               ^

TypeError: Cannot read property 'expectsError' of undefined
    at re (/home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js:17:16)
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js:34:17)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-assert-deep.js
=== release test-assert ===
Path: parallel/test-assert
/home/mzasso/git/nodejs/node/test/parallel/test-assert.js:42
  common.expectsError({
        ^

TypeError: Cannot read property 'expectsError' of undefined
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-assert.js:42:9)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-assert.js
=== release test-async-hooks-close-during-destroy ===
Path: parallel/test-async-hooks-close-during-destroy
/home/mzasso/git/nodejs/node/test/parallel/test-async-hooks-close-during-destroy.js:14
  init: common.mustCallAtLeast((id, provider, triggerAsyncId) => {
              ^

TypeError: Cannot read property 'mustCallAtLeast' of undefined
    at Object.<anonymous> (/home/mzasso/git/nodejs/node/test/parallel/test-async-hooks-close-during-destroy.js:14:15)
    at Module._compile (module.js:598:30)
    at Object.Module._extensions..js (module.js:609:10)
    at Module.load (module.js:532:32)
    at tryModuleLoad (module.js:495:12)
    at Function.Module._load (module.js:489:3)
    at Function.Module.runMain (module.js:634:10)
    at startup (bootstrap_node.js:158:16)
    at bootstrap_node.js:575:3
Command: out/Release/node /home/mzasso/git/nodejs/node/test/parallel/test-async-hooks-close-during-destroy.js

...

@Fishrock123 Fishrock123 self-assigned this Jul 20, 2017

@Fishrock123

This comment has been minimized.

Show comment
Hide comment
@Fishrock123

Fishrock123 Jul 20, 2017

Member

adding myself as an assignee in an attempt to not forget about it

Member

Fishrock123 commented Jul 20, 2017

adding myself as an assignee in an attempt to not forget about it

@TimothyGu TimothyGu self-assigned this Jul 21, 2017

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Jul 21, 2017

Member

The entire test suite passes here after dbd1ec3. @targos can you recheck?

Member

TimothyGu commented Jul 21, 2017

The entire test suite passes here after dbd1ec3. @targos can you recheck?

@targos

This comment has been minimized.

Show comment
Hide comment
@targos

targos Jul 21, 2017

Member

@TimothyGu I pushed a last fix. Now make test passes.

Member

targos commented Jul 21, 2017

@TimothyGu I pushed a last fix. Now make test passes.

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax
Member

addaleax commented Jul 21, 2017

@Fishrock123

Some rough review. Will give it a try to day hopefully.

I suppose we will need quite the assortment of test cases? Or are there already standard tests somewhere?

Also all errors should probably switched to the new internal/errors system.

Show outdated Hide outdated lib/internal/loader/index.js
Show outdated Hide outdated src/node_url.cc
Show outdated Hide outdated node.gyp
Show outdated Hide outdated lib/module.js
filename = Module._resolveFilename(request, parent, isMain);
} catch (e) {
// try to keep stack
e.stack;

This comment has been minimized.

@Fishrock123

Fishrock123 Jul 21, 2017

Member

What's this for?

Is this actually a getter?

@Fishrock123

Fishrock123 Jul 21, 2017

Member

What's this for?

Is this actually a getter?

This comment has been minimized.

@addaleax

addaleax Jul 21, 2017

Member

Yes.

@addaleax
Show outdated Hide outdated lib/module.js
}
}
};
const makeSafe = (unsafe, safe) => {

This comment has been minimized.

@Fishrock123

Fishrock123 Jul 21, 2017

Member

These should be function () {}s?

(Please don't export arrow functions unless absolutely necessary.)

@Fishrock123

Fishrock123 Jul 21, 2017

Member

These should be function () {}s?

(Please don't export arrow functions unless absolutely necessary.)

This comment has been minimized.

@addaleax

addaleax Jul 21, 2017

Member

Do we have a policy around that? What’s the reason?

@addaleax

addaleax Jul 21, 2017

Member

Do we have a policy around that? What’s the reason?

This comment has been minimized.

@ljharb

ljharb Jul 21, 2017

Why? Arrow functions aren't constructable, so you'd be exporting a tighter API

@ljharb

ljharb Jul 21, 2017

Why? Arrow functions aren't constructable, so you'd be exporting a tighter API

This comment has been minimized.

@bmeck

bmeck Jul 26, 2017

Member

@Fishrock123 can you clarify why?

@bmeck

bmeck Jul 26, 2017

Member

@Fishrock123 can you clarify why?

This comment has been minimized.

@jasnell

jasnell Aug 1, 2017

Member

We haven't had much of a defined policy about this. There have been cases where we have avoided changing existing exports from regular functions to arrow functions but given that this is a new API, I'm not sure if there's an issue here.

@jasnell

jasnell Aug 1, 2017

Member

We haven't had much of a defined policy about this. There have been cases where we have avoided changing existing exports from regular functions to arrow functions but given that this is a new API, I'm not sure if there's an issue here.

Show outdated Hide outdated lib/internal/loader/Loader.js
Show outdated Hide outdated lib/internal/loader/Loader.js
@targos

This comment has been minimized.

Show comment
Hide comment
Member

targos commented Jul 21, 2017

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Jul 21, 2017

Member

@Fishrock123 There are some test cases in @bmeck's sketchy-as-heck repo, I assume he has not yet had the time to port them over.

Member

TimothyGu commented Jul 21, 2017

@Fishrock123 There are some test cases in @bmeck's sketchy-as-heck repo, I assume he has not yet had the time to port them over.

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Jul 21, 2017

Member

TBH I'm still not sure about the whole safe_globals business. If someone can explain its necessity that would be best.

Member

TimothyGu commented Jul 21, 2017

TBH I'm still not sure about the whole safe_globals business. If someone can explain its necessity that would be best.

@addaleax

This comment has been minimized.

Show comment
Hide comment
@addaleax
Member

addaleax commented Jul 21, 2017

@TimothyGu TimothyGu added module C++ and removed lib / src labels Jul 23, 2017

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Jul 23, 2017

Member

New CI: https://ci.nodejs.org/job/node-test-pull-request/9303/

A recap of my work done:

  • CJS now works fully with module loading
  • Some basic .mjs tests were imported from sketchy, but I'm not yet sure if I want to import the ones using the internal Loader class yet.
  • Linter now supports .mjs too
  • process.exit(1) instead of emitting the annoying rejected promise w/o handler warning and exiting with code 1; this can be done because the ESM loader is only used for the main script right now.

Pending the resolution from nodejs/node-eps#60, maybe we should delay the work on this a bit before the resolver algorithm is set in stone. Some good arguments from both sides.

Member

TimothyGu commented Jul 23, 2017

New CI: https://ci.nodejs.org/job/node-test-pull-request/9303/

A recap of my work done:

  • CJS now works fully with module loading
  • Some basic .mjs tests were imported from sketchy, but I'm not yet sure if I want to import the ones using the internal Loader class yet.
  • Linter now supports .mjs too
  • process.exit(1) instead of emitting the annoying rejected promise w/o handler warning and exiting with code 1; this can be done because the ESM loader is only used for the main script right now.

Pending the resolution from nodejs/node-eps#60, maybe we should delay the work on this a bit before the resolver algorithm is set in stone. Some good arguments from both sides.

@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Jul 25, 2017

Member

@TimothyGu ( #14369 (comment) )

Pending the resolution from nodejs/node-eps#60, maybe we should delay the work on this a bit before the resolver algorithm is set in stone. Some good arguments from both sides.

That PR is additive and does not remove or conflict with any features of this PR. There is no need to delay this PR unless you have concerns with conflict either now or in the future.

Member

bmeck commented Jul 25, 2017

@TimothyGu ( #14369 (comment) )

Pending the resolution from nodejs/node-eps#60, maybe we should delay the work on this a bit before the resolver algorithm is set in stone. Some good arguments from both sides.

That PR is additive and does not remove or conflict with any features of this PR. There is no need to delay this PR unless you have concerns with conflict either now or in the future.

@TimothyGu

This comment has been minimized.

Show comment
Hide comment
@TimothyGu

TimothyGu Jul 25, 2017

Member

@bmeck If that is the case, cool. I just didn't want any work to turn out to be unneeded.

Member

TimothyGu commented Jul 25, 2017

@bmeck If that is the case, cool. I just didn't want any work to turn out to be unneeded.

MylesBorins added a commit that referenced this pull request Sep 10, 2017

module: Allow runMain to be ESM
This follows the EPS an allows the node CLI to have ESM as an entry point.
`node ./example.mjs`. A newer V8 is needed for `import()` so that is not
included. `import.meta` is still in specification stage so that also is not
included.

PR-URL: #14369
Author: Bradley Farias <bradley.meck@gmail.com>
Author: Guy Bedford <guybedford@gmail.com>
Author: Jan Krems <jan.krems@groupon.com>
Author: Timothy Gu <timothygu99@gmail.com>
Author: Michaël Zasso <targos@protonmail.com>
Author: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

@MylesBorins MylesBorins referenced this pull request Sep 10, 2017

Merged

v8.5.0 proposal #15308

MylesBorins added a commit that referenced this pull request Sep 11, 2017

module: Allow runMain to be ESM
This follows the EPS an allows the node CLI to have ESM as an entry point.
`node ./example.mjs`. A newer V8 is needed for `import()` so that is not
included. `import.meta` is still in specification stage so that also is not
included.

PR-URL: #14369
Author: Bradley Farias <bradley.meck@gmail.com>
Author: Guy Bedford <guybedford@gmail.com>
Author: Jan Krems <jan.krems@groupon.com>
Author: Timothy Gu <timothygu99@gmail.com>
Author: Michaël Zasso <targos@protonmail.com>
Author: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

MylesBorins added a commit that referenced this pull request Sep 11, 2017

module: Allow runMain to be ESM
This follows the EPS an allows the node CLI to have ESM as an entry point.
`node ./example.mjs`. A newer V8 is needed for `import()` so that is not
included. `import.meta` is still in specification stage so that also is not
included.

PR-URL: #14369
Author: Bradley Farias <bradley.meck@gmail.com>
Author: Guy Bedford <guybedford@gmail.com>
Author: Jan Krems <jan.krems@groupon.com>
Author: Timothy Gu <timothygu99@gmail.com>
Author: Michaël Zasso <targos@protonmail.com>
Author: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

@TimothyGu TimothyGu referenced this pull request Sep 11, 2017

Closed

test: fix single test runner regression #15329

2 of 3 tasks complete

MylesBorins added a commit that referenced this pull request Sep 12, 2017

module: Allow runMain to be ESM
This follows the EPS an allows the node CLI to have ESM as an entry point.
`node ./example.mjs`. A newer V8 is needed for `import()` so that is not
included. `import.meta` is still in specification stage so that also is not
included.

PR-URL: #14369
Author: Bradley Farias <bradley.meck@gmail.com>
Author: Guy Bedford <guybedford@gmail.com>
Author: Jan Krems <jan.krems@groupon.com>
Author: Timothy Gu <timothygu99@gmail.com>
Author: Michaël Zasso <targos@protonmail.com>
Author: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

tniessen added a commit that referenced this pull request Sep 12, 2017

errors: fix ERR_MODULE_RESOLUTION_LEGACY message
PR-URL: #15290
Refs: #14369
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

MylesBorins added a commit that referenced this pull request Sep 12, 2017

2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  #14875

* console:
  * Implement minimal `console.group()`.
  #14910

* deps:
  * upgrade libuv to 1.14.1
    #14866
  * update nghttp2 to v1.25.0
    #14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    #14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    #15034

* inspector:
  * Enable async stack traces
    #13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    #14369

* napi:
  * implement promise
    #14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    #14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    #14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](#14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

PR-URL: #15308

MylesBorins added a commit that referenced this pull request Sep 12, 2017

2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  #14875

* console:
  * Implement minimal `console.group()`.
  #14910

* deps:
  * upgrade libuv to 1.14.1
    #14866
  * update nghttp2 to v1.25.0
    #14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    #14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    #15034

* inspector:
  * Enable async stack traces
    #13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    #14369

* napi:
  * implement promise
    #14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    #14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    #14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](#14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

PR-URL: #15308

MylesBorins added a commit that referenced this pull request Sep 12, 2017

2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  #14875

* console:
  * Implement minimal `console.group()`.
  #14910

* deps:
  * upgrade libuv to 1.14.1
    #14866
  * update nghttp2 to v1.25.0
    #14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    #14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    #15034

* inspector:
  * Enable async stack traces
    #13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    #14369

* napi:
  * implement promise
    #14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    #14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    #14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](#14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

PR-URL: #15308

MylesBorins added a commit that referenced this pull request Sep 12, 2017

2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  #14875

* console:
  * Implement minimal `console.group()`.
  #14910

* deps:
  * upgrade libuv to 1.14.1
    #14866
  * update nghttp2 to v1.25.0
    #14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    #14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    #15034

* inspector:
  * Enable async stack traces
    #13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    #14369

* napi:
  * implement promise
    #14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    #14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    #14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](#14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

PR-URL: #15308
@styfle

This comment has been minimized.

Show comment
Hide comment
@styfle

styfle Sep 13, 2017

Contributor

This is super exciting, thanks for all your hard work! 🎉

I read the Interop with existing modules part of the docs and noticed CommonJS modules are exported as default which makes sense since there were no named exports in CommonJS.

This means I can use the following syntax just fine:

import fs from 'fs';
import _ from 'lodash';

But I cannot use the following syntax:

import * as fs from 'fs';
import * as _ from 'lodash';

Most importantly, I cannot use the following syntax:

import { copyFile } from 'fs';
import { map } from 'lodash';

For node core APIs that's probably okay. But for all the existing CommonJS modules on npm, this could be a problem because tools that provide tree-shaking, expect the latter syntax.

Is there a plan to support the latter syntax for importing smaller pieces of CommonJS modules?

Contributor

styfle commented Sep 13, 2017

This is super exciting, thanks for all your hard work! 🎉

I read the Interop with existing modules part of the docs and noticed CommonJS modules are exported as default which makes sense since there were no named exports in CommonJS.

This means I can use the following syntax just fine:

import fs from 'fs';
import _ from 'lodash';

But I cannot use the following syntax:

import * as fs from 'fs';
import * as _ from 'lodash';

Most importantly, I cannot use the following syntax:

import { copyFile } from 'fs';
import { map } from 'lodash';

For node core APIs that's probably okay. But for all the existing CommonJS modules on npm, this could be a problem because tools that provide tree-shaking, expect the latter syntax.

Is there a plan to support the latter syntax for importing smaller pieces of CommonJS modules?

@rodoabad

This comment has been minimized.

Show comment
Hide comment
@rodoabad

rodoabad Sep 13, 2017

You're the man @bmeck GG!

rodoabad commented Sep 13, 2017

You're the man @bmeck GG!

@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Sep 13, 2017

Member

@styfle

But I cannot use the following syntax:

import * as fs from 'fs';
import * as _ from 'lodash';

Most importantly, I cannot use the following syntax:

import { copyFile } from 'fs';
import { map } from 'lodash';

The syntax by which things are imported does not change the ModuleNamespace objects that are created in the ES spec (the result of * as fs).

We have a few problems supporting namespace creation for CJS with custom names for a few reasons and are trying to figure out an opt-in solution that module authors could do. In particular, we need to know the list of property names that module.exports contains at parse time. We cannot do this with static analysis and will require authors to list these properties. Another problem is mutation of these properties cannot be safely observed and tracked for "live binding" that ES modules do. There will need to be invariant checks that the property descriptors are not configurable/writable/containing getters when module evalutation finishes, similar to Proxy invariant checks.

As for tree shaking, it should still work the same as tools using that do not tree shake CJS modules (except https://github.com/indutny/webpack-common-shake, which should be unaffected). In real ESM there is no tree shaking so that is not an issue.

Named properties are not on the top of my TODO list since they require opt-in changes and can not act like what babel does, but if someone wants to help spec out a pragma or something for opt-in; I am willing to review/help.

Member

bmeck commented Sep 13, 2017

@styfle

But I cannot use the following syntax:

import * as fs from 'fs';
import * as _ from 'lodash';

Most importantly, I cannot use the following syntax:

import { copyFile } from 'fs';
import { map } from 'lodash';

The syntax by which things are imported does not change the ModuleNamespace objects that are created in the ES spec (the result of * as fs).

We have a few problems supporting namespace creation for CJS with custom names for a few reasons and are trying to figure out an opt-in solution that module authors could do. In particular, we need to know the list of property names that module.exports contains at parse time. We cannot do this with static analysis and will require authors to list these properties. Another problem is mutation of these properties cannot be safely observed and tracked for "live binding" that ES modules do. There will need to be invariant checks that the property descriptors are not configurable/writable/containing getters when module evalutation finishes, similar to Proxy invariant checks.

As for tree shaking, it should still work the same as tools using that do not tree shake CJS modules (except https://github.com/indutny/webpack-common-shake, which should be unaffected). In real ESM there is no tree shaking so that is not an issue.

Named properties are not on the top of my TODO list since they require opt-in changes and can not act like what babel does, but if someone wants to help spec out a pragma or something for opt-in; I am willing to review/help.

addaleax added a commit to addaleax/node that referenced this pull request Sep 13, 2017

module: Allow runMain to be ESM
This follows the EPS an allows the node CLI to have ESM as an entry point.
`node ./example.mjs`. A newer V8 is needed for `import()` so that is not
included. `import.meta` is still in specification stage so that also is not
included.

PR-URL: nodejs#14369
Author: Bradley Farias <bradley.meck@gmail.com>
Author: Guy Bedford <guybedford@gmail.com>
Author: Jan Krems <jan.krems@groupon.com>
Author: Timothy Gu <timothygu99@gmail.com>
Author: Michaël Zasso <targos@protonmail.com>
Author: Anna Henningsen <anna@addaleax.net>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Jeremiah Senkpiel <fishrock123@rocketmail.com>

addaleax added a commit to addaleax/node that referenced this pull request Sep 13, 2017

errors: fix ERR_MODULE_RESOLUTION_LEGACY message
PR-URL: nodejs#15290
Refs: nodejs#14369
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

addaleax added a commit to addaleax/node that referenced this pull request Sep 13, 2017

2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  nodejs#14875

* console:
  * Implement minimal `console.group()`.
  nodejs#14910

* deps:
  * upgrade libuv to 1.14.1
    nodejs#14866
  * update nghttp2 to v1.25.0
    nodejs#14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    nodejs#14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    nodejs#15034

* inspector:
  * Enable async stack traces
    nodejs#13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    nodejs#14369

* napi:
  * implement promise
    nodejs#14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    nodejs#14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    nodejs#14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](nodejs#14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

PR-URL: nodejs#15308
@jdalton

This comment has been minimized.

Show comment
Hide comment
@jdalton

jdalton Sep 13, 2017

Member

@bmeck

Named properties are not on the top of my TODO list since they require opt-in changes and can not act like what babel does, but if someone wants to help spec out a pragma or something for opt-in; I am willing to review/help.

From the July 26 TC39 notes you said:

Node is not going to diverge from the browser on this topic. If "use module" is not supported by browsers, Node is not going to use "use module" either.

Are you now open to Node specific pragmas or does this mean you'd want the CJS import named exports pragma to make its way to the TC39? Is it too Node specific?

Member

jdalton commented Sep 13, 2017

@bmeck

Named properties are not on the top of my TODO list since they require opt-in changes and can not act like what babel does, but if someone wants to help spec out a pragma or something for opt-in; I am willing to review/help.

From the July 26 TC39 notes you said:

Node is not going to diverge from the browser on this topic. If "use module" is not supported by browsers, Node is not going to use "use module" either.

Are you now open to Node specific pragmas or does this mean you'd want the CJS import named exports pragma to make its way to the TC39? Is it too Node specific?

@bmeck

This comment has been minimized.

Show comment
Hide comment
@bmeck

bmeck Sep 14, 2017

Member

@jdalton Node specific things within Node only CJS things (module.exports) seems fine, there is no compatibility concerns since other environments would not be affected. I would be very against it being applied to all things/files that might rely on the pragma but are intended to work without Node. Also, this idea is adding invariant checks rather than changing runtime/compiletime behavior.

Member

bmeck commented Sep 14, 2017

@jdalton Node specific things within Node only CJS things (module.exports) seems fine, there is no compatibility concerns since other environments would not be affected. I would be very against it being applied to all things/files that might rely on the pragma but are intended to work without Node. Also, this idea is adding invariant checks rather than changing runtime/compiletime behavior.

jasnell added a commit that referenced this pull request Sep 20, 2017

errors: fix ERR_MODULE_RESOLUTION_LEGACY message
PR-URL: #15290
Refs: #14369
Reviewed-By: Bradley Farias <bradley.meck@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>

@Timer Timer referenced this pull request Oct 4, 2017

Closed

Support .mjs file extensions #3237

}
async resolve(specifier) {
const request = resolveRequestUrl(this.base, specifier);

This comment has been minimized.

@miraage

miraage Oct 6, 2017

Missing await statement.

@miraage

miraage Oct 6, 2017

Missing await statement.

@MylesBorins MylesBorins moved this from In Review to Complete in ECMAScript Modules in Core Nov 3, 2017

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 12, 2018

2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  nodejs#14875

* console:
  * Implement minimal `console.group()`.
  nodejs#14910

* deps:
  * upgrade libuv to 1.14.1
    nodejs#14866
  * update nghttp2 to v1.25.0
    nodejs#14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    nodejs#14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    nodejs#15034

* inspector:
  * Enable async stack traces
    nodejs#13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    nodejs#14369

* napi:
  * implement promise
    nodejs#14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    nodejs#14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    nodejs#14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](nodejs#14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

This applies parts of a10856a that are
relevant to N-API.

PR-URL: nodejs#15308

gabrielschulhof added a commit to gabrielschulhof/node that referenced this pull request Mar 15, 2018

2017-09-12, Version 8.5.0 (Current)
Notable Changes

* build:
  * Snapshots are now re-enabled in V8
  nodejs#14875

* console:
  * Implement minimal `console.group()`.
  nodejs#14910

* deps:
  * upgrade libuv to 1.14.1
    nodejs#14866
  * update nghttp2 to v1.25.0
    nodejs#14955

* dns:
  * Add `verbatim` option to dns.lookup(). When true, results from the
    DNS resolver are passed on as-is, without the reshuffling that
    Node.js otherwise does that puts IPv4 addresses before IPv6
    addresses.
    nodejs#14731

* fs:
  * add fs.copyFile and fs.copyFileSync which allows for more efficient
    copying of files.
    nodejs#15034

* inspector:
  * Enable async stack traces
    nodejs#13870

* module:
  * Add support for ESM. This is currently behind the
    `--experimental-modules` flag and requires the .mjs extension.
    `node --experimental-modules index.mjs`
    nodejs#14369

* napi:
  * implement promise
    nodejs#14365

* os:
  * Add support for CIDR notation to the output of the
    networkInterfaces() method.
    nodejs#14307

* perf_hooks:
  * An initial implementation of the Performance Timing API for
    Node.js. This is the same Performance Timing API implemented by
    modern browsers with a number of Node.js specific properties. The
    User Timing mark() and measure() APIs are implemented, as is a
    Node.js specific flavor of the Frame Timing for measuring event
    loop duration.
    nodejs#14680

* tls:
  * multiple PFX in createSecureContext
    [#14793](nodejs#14793)

* Added new collaborators:
  * BridgeAR – Ruben Bridgewater

This applies parts of a10856a that are
relevant to N-API.

PR-URL: nodejs#15308
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment