Files
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
..
2017-09-11 00:18:02 -03:00
2017-03-10 11:23:48 -08:00
2017-06-10 22:49:28 -04:00
2017-03-10 11:23:48 -08:00
2014-08-29 00:36:48 +04:00
2017-05-19 15:22:44 -04:00
2017-05-19 15:22:44 -04:00
2018-01-30 10:23:51 -06:00
2013-10-16 09:43:19 -07:00
2013-10-16 09:43:19 -07:00
2013-10-16 09:43:19 -07:00
2017-12-11 15:52:37 -05:00
2018-01-30 10:25:24 -06:00
2017-06-06 23:33:56 -07:00