Joyee Cheung
c2b01881dc
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>
2018-03-15 20:50:35 +08:00
..
2017-03-10 11:23:48 -08:00
2018-02-09 08:45:51 -05:00
2018-02-09 08:45:51 -05:00
2018-01-18 18:12:16 +01:00
2016-05-24 17:03:22 +02:00
2015-12-26 18:00:02 -08:00
2018-03-15 20:50:35 +08:00
2018-01-17 08:50:02 +08:00
2018-03-15 20:50:35 +08:00
2017-12-24 17:38:36 +01:00
2018-03-15 20:50:35 +08:00
2017-12-24 17:38:36 +01:00
2018-03-15 20:50:35 +08:00
2017-11-29 12:06:09 +01:00
2018-03-15 20:50:35 +08:00
2017-11-29 12:06:09 +01:00
2018-03-15 20:50:35 +08:00
2017-03-10 11:23:48 -08:00
2018-03-15 20:50:35 +08:00
2018-03-04 21:20:43 +00:00
2018-03-15 20:50:35 +08:00
2018-03-04 21:20:43 +00:00
2018-03-15 20:50:35 +08:00
2018-03-04 21:20:43 +00:00
2018-03-15 20:50:35 +08:00
2017-03-10 11:23:48 -08:00
2018-01-24 13:16:07 +01:00
2018-03-15 20:50:35 +08:00
2018-01-17 08:50:02 +08:00
2013-05-30 09:30:19 -07:00
2015-10-20 12:16:00 -07:00
2017-03-10 11:23:48 -08:00
2018-03-15 20:50:35 +08:00
2017-04-21 11:46:19 +02:00
2017-04-21 11:46:19 +02:00
2017-03-10 11:23:48 -08:00
2018-03-15 20:50:35 +08:00
2017-11-29 12:06:09 +01:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2017-07-27 09:24:20 -07:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2017-03-10 11:23:48 -08:00
2018-02-09 14:59:07 -05:00
2017-03-10 11:23:48 -08:00
2018-03-15 20:50:35 +08:00
2017-07-03 11:39:35 -07:00
2018-01-21 12:37:43 -05:00
2016-06-30 13:02:19 +02:00
2016-06-30 13:02:19 +02:00
2017-07-21 15:13:47 -04:00
2018-03-15 20:50:35 +08:00
2017-03-10 11:23:48 -08:00
2018-03-15 20:50:35 +08:00
2017-03-10 11:23:48 -08:00
2018-03-15 20:50:35 +08:00
2017-03-10 11:23:48 -08:00
2018-03-15 20:50:35 +08:00