node/test/message
Joyee Cheung efce655c0f
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>
2019-11-19 13:43:59 +01:00
..
2100bytes.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
2100bytes.out
assert_throws_stack.js assert: fix throws trace 2018-02-09 08:45:51 -05:00
assert_throws_stack.out process: inspect error in case of a fatal exception 2019-05-16 12:50:05 +02:00
async_error_eval_cjs.js process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
async_error_eval_cjs.out process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
async_error_eval_esm.js esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
async_error_eval_esm.out esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
async_error_microtask_main.js process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
async_error_microtask_main.out process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
async_error_nexttick_main.js process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
async_error_nexttick_main.out process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
async_error_sync_esm.mjs esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
async_error_sync_esm.out esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
async_error_sync_main.js process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
async_error_sync_main.out process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
console.js console: fix trace function 2019-03-21 22:55:12 +01:00
console.out console: remove trace frame 2019-04-12 19:29:24 +08:00
console_low_stack_space.js test: remove untested knownGlobals 2018-05-19 17:55:54 +02:00
console_low_stack_space.out
core_line_numbers.js
core_line_numbers.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
error_exit.js test: improve to use template string 2018-01-17 08:50:02 +08:00
error_exit.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
esm_display_syntax_error.mjs esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_display_syntax_error.out esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_display_syntax_error_import.mjs esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_display_syntax_error_import.out esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_display_syntax_error_import_module.mjs esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_display_syntax_error_import_module.out esm: phase two of new esm implementation 2019-03-27 15:52:11 -04:00
esm_display_syntax_error_module.mjs esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_display_syntax_error_module.out esm: phase two of new esm implementation 2019-03-27 15:52:11 -04:00
esm_loader_not_found.mjs esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_loader_not_found.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
esm_loader_syntax_error.mjs esm: unflag --experimental-modules 2019-11-12 14:04:55 -08:00
esm_loader_syntax_error.out esm: exit the process with an error if loader has an issue 2019-11-09 09:30:36 +01:00
eval_messages.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
eval_messages.out cli: add --trace-uncaught flag 2019-10-22 08:16:18 +02:00
events_unhandled_error_common_trace.js events: show throw stack trace for uncaught exception 2018-03-04 21:20:43 +00:00
events_unhandled_error_common_trace.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
events_unhandled_error_nexttick.js events: show throw stack trace for uncaught exception 2018-03-04 21:20:43 +00:00
events_unhandled_error_nexttick.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
events_unhandled_error_sameline.js events: show throw stack trace for uncaught exception 2018-03-04 21:20:43 +00:00
events_unhandled_error_sameline.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
events_unhandled_error_subclass.js events: give subclass name in unhandled 'error' message 2019-08-06 19:28:12 -07:00
events_unhandled_error_subclass.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
hello_world.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
hello_world.out
if-error-has-good-stack.js assert: wrap original error in ifError 2018-01-24 13:16:07 +01:00
if-error-has-good-stack.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
internal_assert.js lib: throw a special error in internal/assert 2019-04-25 01:29:48 +02:00
internal_assert.out errors: make sure all Node.js errors show their properties 2019-10-03 12:34:44 -07:00
internal_assert_fail.js lib: throw a special error in internal/assert 2019-04-25 01:29:48 +02:00
internal_assert_fail.out errors: make sure all Node.js errors show their properties 2019-10-03 12:34:44 -07:00
max_tick_depth.js test: improve to use template string 2018-01-17 08:50:02 +08:00
max_tick_depth.out
message.status test: unskip tests that now pass on AIX 2019-08-10 19:02:57 -07:00
nexttick_throw.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
nexttick_throw.out process: reduce the number of internal frames in async stack trace 2019-04-28 15:36:28 +08:00
promise_always_throw_unhandled.js process: add --unhandled-rejections flag 2019-04-15 18:29:07 +02:00
promise_always_throw_unhandled.out process: add --unhandled-rejections flag 2019-04-15 18:29:07 +02:00
source_map_throw_catch.js process: add source-map support to stack traces 2019-10-05 17:08:00 -07:00
source_map_throw_catch.out process: add source-map support to stack traces 2019-10-05 17:08:00 -07:00
source_map_throw_first_tick.js process: add source-map support to stack traces 2019-10-05 17:08:00 -07:00
source_map_throw_first_tick.out process: add source-map support to stack traces 2019-10-05 17:08:00 -07:00
source_map_throw_set_immediate.js process: add source-map support to stack traces 2019-10-05 17:08:00 -07:00
source_map_throw_set_immediate.out process: add source-map support to stack traces 2019-10-05 17:08:00 -07:00
stack_overflow.js test: use JSON.stringify to trigger stack overflow 2017-04-21 11:46:19 +02:00
stack_overflow.out process: inspect error in case of a fatal exception 2019-05-16 12:50:05 +02:00
stdin_messages.js test: change var to let 2019-11-17 20:08:36 +05:30
stdin_messages.out test: change var to let 2019-11-17 20:08:36 +05:30
testcfg.py tools: python: ignore instead of select flake8 rules 2019-04-13 20:33:06 -04:00
throw_custom_error.js benchmark,doc,lib: capitalize more comments 2019-03-27 17:20:06 +01:00
throw_custom_error.out process: inspect error in case of a fatal exception 2019-05-16 12:50:05 +02:00
throw_error_with_getter_throw.js src: handle errors while printing error objects 2019-02-03 20:37:52 +01:00
throw_error_with_getter_throw.out cli: add --trace-uncaught flag 2019-10-22 08:16:18 +02:00
throw_error_with_getter_throw_traced.js cli: add --trace-uncaught flag 2019-10-22 08:16:18 +02:00
throw_error_with_getter_throw_traced.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
throw_in_line_with_tabs.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
throw_in_line_with_tabs.out process: inspect error in case of a fatal exception 2019-05-16 12:50:05 +02:00
throw_non_error.js benchmark,doc,lib: capitalize more comments 2019-03-27 17:20:06 +01:00
throw_non_error.out process: inspect error in case of a fatal exception 2019-05-16 12:50:05 +02:00
throw_null.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
throw_null.out cli: add --trace-uncaught flag 2019-10-22 08:16:18 +02:00
throw_null_traced.js cli: add --trace-uncaught flag 2019-10-22 08:16:18 +02:00
throw_null_traced.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
throw_undefined.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
throw_undefined.out cli: add --trace-uncaught flag 2019-10-22 08:16:18 +02:00
throw_undefined_traced.js cli: add --trace-uncaught flag 2019-10-22 08:16:18 +02:00
throw_undefined_traced.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
timeout_throw.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
timeout_throw.out timers: refactor timer callback initialization 2019-03-19 04:25:23 +08:00
undefined_reference_in_new_context.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
undefined_reference_in_new_context.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
unhandled_promise_trace_warnings.js test: make crashOnUnhandleRejection opt-out 2018-07-19 08:47:28 +02:00
unhandled_promise_trace_warnings.out lib: refactor unhandled rejection deprecation warning emission 2019-06-19 15:44:09 +08:00
util_inspect_error.js util: fix inspected stack indentation 2018-05-21 17:38:16 +02:00
util_inspect_error.out module: inline try catch 2019-04-04 13:03:27 +02:00
v8_warning.js benchmark,doc,lib,test: capitalize comments 2019-03-10 00:44:40 +01:00
v8_warning.out src: emit warnings from V8 2018-11-16 09:16:15 -06:00
vm_caught_custom_runtime_error.js
vm_caught_custom_runtime_error.out
vm_display_runtime_error.js lib,src: fix consistent spacing inside braces 2017-07-21 15:13:47 -04:00
vm_display_runtime_error.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
vm_display_syntax_error.js meta: restore original copyright header 2017-03-10 11:23:48 -08:00
vm_display_syntax_error.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
vm_dont_display_runtime_error.js test: remove unused catch bindings 2018-11-06 10:59:18 -05:00
vm_dont_display_runtime_error.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00
vm_dont_display_syntax_error.js test: remove unused catch bindings 2018-11-06 10:59:18 -05:00
vm_dont_display_syntax_error.out module: reduce circular dependency of internal/modules/cjs/loader 2019-11-19 13:43:59 +01:00