node/test/message
Joyee Cheung 45c477c2e6
lib: restructure cjs and esm loaders
Create `lib/internal/modules` and restructure the module loaders
to make the purpose of those files clearer.

Also make it clear in the code that the object exported by
`lib/internal/modules/cjs/loader.js` is `CJSModule` instead of the
ambiguous `Module`.

Before:

```
lib
├── ...
├── internal
│       ├── loaders
│       │     ├── CreateDynamicModule.js
│       │     ├── DefaultResolve.js
│       │     ├── Loader.js
│       │     ├── ModuleJob.js
│       │     ├── ModuleMap.js
│       │     ├── ModuleWrap.js
│       │     └── Translators.js
│       └── module.js
└── module.js
```

After:

```
lib
├── ...
├── internal
│       ├── ...
│       └── modules
│              ├── cjs
│              │     ├── helpers.js
│              │     └── loader.js
│              └── esm
│                    ├── CreateDynamicModule.js
│                    ├── DefaultResolve.js
│                    ├── Loader.js
│                    ├── ModuleJob.js
│                    ├── ModuleMap.js
│                    └── Translators.js
└── module.js # deleted in this commit to work with git file mode
```

Backport-PR-URL: https://github.com/nodejs/node/pull/19374
PR-URL: https://github.com/nodejs/node/pull/19177
Refs: https://github.com/nodejs/node/pull/19112
Reviewed-By: Gus Caplan <me@gus.host>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Benjamin Gruenbaum <benjamingr@gmail.com>
2018-04-04 16:21:19 +02:00
..
2100bytes.js
2100bytes.out
assert_throws_stack.js assert: fix throws trace 2018-03-20 11:33:38 +00:00
assert_throws_stack.out assert: fix throws trace 2018-03-20 11:33:38 +00:00
console_low_stack_space.js console,test: make message test more accurate 2017-08-03 15:41:14 +02:00
console_low_stack_space.out
core_line_numbers.js
core_line_numbers.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
error_exit.js test: improve to use template string 2018-01-30 10:24:05 -06:00
error_exit.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
esm_display_syntax_error.mjs module: print better message on esm syntax error 2017-12-12 03:27:53 -05:00
esm_display_syntax_error.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
esm_display_syntax_error_import.mjs module: print better message on esm import error 2018-01-09 04:32:35 -05:00
esm_display_syntax_error_import.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
esm_display_syntax_error_import_module.mjs module: print better message on esm import error 2018-01-09 04:32:35 -05:00
esm_display_syntax_error_import_module.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
esm_display_syntax_error_module.mjs module: print better message on esm syntax error 2017-12-12 03:27:53 -05:00
esm_display_syntax_error_module.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
eval_messages.js
eval_messages.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
events_unhandled_error_common_trace.js events: show throw stack trace for uncaught exception 2018-03-05 10:07:17 +00:00
events_unhandled_error_common_trace.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
events_unhandled_error_nexttick.js events: show throw stack trace for uncaught exception 2018-03-05 10:07:17 +00:00
events_unhandled_error_nexttick.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
events_unhandled_error_sameline.js events: show throw stack trace for uncaught exception 2018-03-05 10:07:17 +00:00
events_unhandled_error_sameline.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
hello_world.js
hello_world.out
max_tick_depth.js test: improve to use template string 2018-01-30 10:24:05 -06:00
max_tick_depth.out
message.status
nexttick_throw.js
nexttick_throw.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
stack_overflow.js
stack_overflow.out
stdin_messages.js
stdin_messages.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
testcfg.py module: print better message on esm syntax error 2017-12-12 03:27:53 -05:00
throw_custom_error.js
throw_custom_error.out
throw_in_line_with_tabs.js
throw_in_line_with_tabs.out
throw_non_error.js
throw_non_error.out
throw_null.js
throw_null.out
throw_undefined.js
throw_undefined.out
timeout_throw.js
timeout_throw.out
undefined_reference_in_new_context.js
undefined_reference_in_new_context.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
unhandled_promise_trace_warnings.js
unhandled_promise_trace_warnings.out promises: refactor rejection handling 2018-02-27 17:40:39 +01:00
vm_caught_custom_runtime_error.js
vm_caught_custom_runtime_error.out
vm_display_runtime_error.js
vm_display_runtime_error.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
vm_display_syntax_error.js
vm_display_syntax_error.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
vm_dont_display_runtime_error.js
vm_dont_display_runtime_error.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00
vm_dont_display_syntax_error.js
vm_dont_display_syntax_error.out lib: restructure cjs and esm loaders 2018-04-04 16:21:19 +02:00