diff options
author | Joyee Cheung <joyeec9h3@gmail.com> | 2018-03-07 02:30:18 +0800 |
---|---|---|
committer | Joyee Cheung <joyeec9h3@gmail.com> | 2018-03-15 20:50:35 +0800 |
commit | c2b01881dcb3bf302f9d83157e719cc5240a9042 (patch) | |
tree | 55446f6bda8c376cc52a7be2c139e2cc9236ae2d /test/message/stdin_messages.out | |
parent | 8484b40b3d38e18c524b7dd560c16ab30c94e427 (diff) | |
download | android-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/stdin_messages.out')
-rw-r--r-- | test/message/stdin_messages.out | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/test/message/stdin_messages.out b/test/message/stdin_messages.out index c6c37a5be4..d4498b452a 100644 --- a/test/message/stdin_messages.out +++ b/test/message/stdin_messages.out @@ -7,7 +7,7 @@ SyntaxError: Strict mode code may not include a with statement at createScript (vm.js:*) at Object.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) - at Module._compile (module.js:*:*) + at Module._compile (internal/modules/cjs/loader.js:*:*) at evalScript (internal/bootstrap/node.js:*:*) at Socket.<anonymous> (internal/bootstrap/node.js:*:*) at Socket.emit (events.js:*:*) @@ -24,7 +24,7 @@ Error: hello at Script.runInThisContext (vm.js:*) at Object.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) - at Module._compile (module.js:*:*) + at Module._compile (internal/modules/cjs/loader.js:*:*) at evalScript (internal/bootstrap/node.js:*:*) at Socket.<anonymous> (internal/bootstrap/node.js:*:*) at Socket.emit (events.js:*:*) @@ -39,7 +39,7 @@ Error: hello at Script.runInThisContext (vm.js:*) at Object.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) - at Module._compile (module.js:*:*) + at Module._compile (internal/modules/cjs/loader.js:*:*) at evalScript (internal/bootstrap/node.js:*:*) at Socket.<anonymous> (internal/bootstrap/node.js:*:*) at Socket.emit (events.js:*:*) @@ -55,7 +55,7 @@ ReferenceError: y is not defined at Script.runInThisContext (vm.js:*) at Object.runInThisContext (vm.js:*) at Object.<anonymous> ([stdin]-wrapper:*:*) - at Module._compile (module.js:*:*) + at Module._compile (internal/modules/cjs/loader.js:*:*) at evalScript (internal/bootstrap/node.js:*:*) at Socket.<anonymous> (internal/bootstrap/node.js:*:*) at Socket.emit (events.js:*:*) |