0
0
mirror of https://github.com/nodejs/node.git synced 2024-12-01 16:10:02 +01:00
nodejs/lib/internal/loader
Guy Bedford fe4675b301 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-21 10:45:40 -07:00
..
Loader.js module: fix main resolution and not found updates 2017-10-21 10:45:40 -07:00
ModuleJob.js
ModuleMap.js
ModuleRequest.js module: fix main resolution and not found updates 2017-10-21 10:45:40 -07:00
ModuleWrap.js lib: pass internalBinding more implicitly 2017-10-18 11:36:28 +02:00
search.js lib: pass internalBinding more implicitly 2017-10-18 11:36:28 +02:00