diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2019-11-10 16:59:16 +0800 |
---|---|---|
committer | Anna Henningsen <anna@addaleax.net> | 2019-11-19 13:43:59 +0100 |
commit | efce655c0f1671d0e86b5c89092ac93db983ef94 (patch) | |
tree | 26af173e687a6c8ee0f26d2857742ffce01729f2 /test/message/esm_loader_not_found.out | |
parent | 0f78dcc86d9af8f742f76505c5a104c6dff17ca9 (diff) | |
download | android-node-v8-efce655c0f1671d0e86b5c89092ac93db983ef94.tar.gz android-node-v8-efce655c0f1671d0e86b5c89092ac93db983ef94.tar.bz2 android-node-v8-efce655c0f1671d0e86b5c89092ac93db983ef94.zip |
module: reduce circular dependency of internal/modules/cjs/loader
Previously `internal/bootstrap/pre_execution.js` requires
`internal/modules/cjs/loader.js` which in turn requires
`internal/bootstrap/pre_execution.js`. This patch moves the
entry point execution logic out of `pre_execution.js` and
puts it into `internal/modules/run_main.js`. It also tests
that `Module.runMain` can be monkey-patched before further
deprecation/refactoring can be done.
Also added an internal assertion `hasLoadedAnyUserCJSModule`
for documentation purposes.
PR-URL: https://github.com/nodejs/node/pull/30349
Reviewed-By: Guy Bedford <guybedford@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Anna Henningsen <anna@addaleax.net>
Diffstat (limited to 'test/message/esm_loader_not_found.out')
-rw-r--r-- | test/message/esm_loader_not_found.out | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/test/message/esm_loader_not_found.out b/test/message/esm_loader_not_found.out index 87161cdff5..b03b7641af 100644 --- a/test/message/esm_loader_not_found.out +++ b/test/message/esm_loader_not_found.out @@ -11,8 +11,8 @@ Error: Cannot find package 'i-dont-exist' imported from * at Loader.import (internal/modules/esm/loader.js:*:*) at internal/process/esm_loader.js:*:* at Object.initializeLoader (internal/process/esm_loader.js:*:*) - at runMainESM (internal/bootstrap/pre_execution.js:*:*) - at Function.Module.runMain (internal/modules/cjs/loader.js:*:*) + at runMainESM (internal/modules/run_main.js:*:*) + at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:*:*) at internal/main/run_main_module.js:*:* { code: 'ERR_MODULE_NOT_FOUND' } |