node/test/es-module
Guy Bedford 598787d854
module: fix main resolution and not found updates
This simplifies the top-level load when ES modules are enabled
as we can entirely delegate the module resolver, which will hand
over to CommonJS where appropriate.

All not found errors are made consistent to throw during resolve
and have the MODULE_NOT_FOUND code.

Includes the test case from https://github.com/nodejs/node/pull/15736.

Fixes: https://github.com/nodejs/node/issues/15732
PR-URL: https://github.com/nodejs/node/pull/16147
Reviewed-By: Franziska Hinkelmann <franziska.hinkelmann@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
2017-10-23 17:23:01 -04:00
..
es-module.status test: update es-module.status prefix 2017-10-11 02:05:30 -04:00
esm-snapshot-mutator.js
esm-snapshot.js
json.json module: resolve and instantiate loader pipeline hooks 2017-10-17 23:25:36 -07:00
test-esm-basic-imports.mjs
test-esm-double-encoding-native%20.js module: allow loading files with % in the name 2017-10-17 23:32:40 -07:00
test-esm-double-encoding.mjs module: allow loading files with % in the name 2017-10-17 23:32:40 -07:00
test-esm-encoded-path-native.js test: replace fixturesDir with fixtures module 2017-10-17 23:35:27 -07:00
test-esm-encoded-path.mjs
test-esm-example-loader.js module: resolve and instantiate loader pipeline hooks 2017-10-17 23:25:36 -07:00
test-esm-forbidden-globals.mjs
test-esm-json.mjs module: resolve and instantiate loader pipeline hooks 2017-10-17 23:25:36 -07:00
test-esm-named-exports.mjs module: resolve and instantiate loader pipeline hooks 2017-10-17 23:25:36 -07:00
test-esm-namespace.mjs
test-esm-ok.mjs
test-esm-preserve-symlinks-not-found-plain.mjs module: fix main resolution and not found updates 2017-10-23 17:23:01 -04:00
test-esm-preserve-symlinks-not-found.mjs module: fix main resolution and not found updates 2017-10-23 17:23:01 -04:00
test-esm-preserve-symlinks.js
test-esm-require-cache.mjs
test-esm-resolve-hook.mjs module: resolve and instantiate loader pipeline hooks 2017-10-17 23:25:36 -07:00
test-esm-shebang.mjs
test-esm-snapshot.mjs
test-esm-symlink.js
testcfg.py