summaryrefslogtreecommitdiff
path: root/test/message/esm_display_syntax_error_module.out
diff options
context:
space:
mode:
authorJoyee Cheung <joyeec9h3@gmail.com>2018-03-07 02:30:18 +0800
committerJoyee Cheung <joyeec9h3@gmail.com>2018-03-15 20:50:35 +0800
commitc2b01881dcb3bf302f9d83157e719cc5240a9042 (patch)
tree55446f6bda8c376cc52a7be2c139e2cc9236ae2d /test/message/esm_display_syntax_error_module.out
parent8484b40b3d38e18c524b7dd560c16ab30c94e427 (diff)
downloadandroid-node-v8-c2b01881dcb3bf302f9d83157e719cc5240a9042.tar.gz
android-node-v8-c2b01881dcb3bf302f9d83157e719cc5240a9042.tar.bz2
android-node-v8-c2b01881dcb3bf302f9d83157e719cc5240a9042.zip
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 │ │ └── 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 ``` 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>
Diffstat (limited to 'test/message/esm_display_syntax_error_module.out')
-rw-r--r--test/message/esm_display_syntax_error_module.out2
1 files changed, 1 insertions, 1 deletions
diff --git a/test/message/esm_display_syntax_error_module.out b/test/message/esm_display_syntax_error_module.out
index 56bbac9307..fc0581c225 100644
--- a/test/message/esm_display_syntax_error_module.out
+++ b/test/message/esm_display_syntax_error_module.out
@@ -3,4 +3,4 @@ file:///*/test/fixtures/es-module-loaders/syntax-error.mjs:2
await async () => 0;
^^^^^
SyntaxError: Unexpected reserved word
- at translators.set (internal/loader/Translators.js:*:*)
+ at translators.set (internal/modules/esm/Translators.js:*:*)