Files
node/lib/internal
Joyee Cheung 5572f8fca0 module: do less CJS module loader initialization at run time
This patch:

- Builds the set of modules that can be required by users with/without
  the `node:` prefix at snapshot building time. We only modify it when
  `--expose-internals` but the default set is now in the snapshot. At
  run time the CJS module loader only creates a frozen array out of it.
- `BuiltinModule.canBeRequiredWithoutScheme()` is now enough to
  determine if an id can be required without `node:` without an
  additional call to `BuiltinModule.canBeRequiredByUsers()`
- Replace the pending-to-deprecate methods on `Module` with an internal
  implementation that only queries the CLI flags when being invoked.
  So we can install these methods in the snapshot.

PR-URL: https://github.com/nodejs/node/pull/47194
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Chengzhong Wu <legendecas@gmail.com>
2023-04-05 11:13:23 +00:00
..
2023-03-26 18:03:58 +00:00
2023-03-06 10:44:14 +01:00
2023-03-06 10:44:14 +01:00
2023-03-06 10:44:14 +01:00
2023-04-05 08:08:24 +00:00
2023-03-12 18:35:55 +00:00
2023-03-06 10:44:14 +01:00
2023-03-06 10:44:14 +01:00
2022-09-07 09:33:10 +00:00
2022-08-05 14:25:06 +00:00
2023-02-28 09:37:24 +00:00

Internal Modules

The modules in lib/internal are intended for internal use in Node.js core only, and are not accessible with require() from user modules. These modules can be changed at any time. Reliance on these modules outside of core is not supported in any way.