Files
node/lib/internal
Joyee Cheung 170848bc18 module: handle null source from async loader hooks in sync hooks
This relaxes the validation in sync hooks so that it accepts
the quirky nullish source returned by the default step of the
async loader when the module being loaded is CommonJS.
When there are no customization hooks registered, a saner
synchronous default load step is used to use a property
instead of a reset nullish source to signify that the module
should go through the CJS monkey patching routes and reduce
excessive reloading from disk.

PR-URL: https://github.com/nodejs/node/pull/59929
Fixes: https://github.com/nodejs/node/issues/59384
Fixes: https://github.com/nodejs/node/issues/57327
Refs: https://github.com/nodejs/node/issues/59666
Refs: https://github.com/dygabo/load_module_test
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Jacob Smith <jacob@frende.me>
2025-10-14 16:28:22 +00:00
..
2025-06-28 22:51:59 +00:00
2025-10-13 10:05:45 +02:00
2025-10-10 04:16:56 +00:00
…
…
2024-10-09 06:42:16 +00:00
…
…
2025-09-22 23:19:26 +00:00
2025-07-18 07:55:10 -07:00
2025-08-16 06:43:49 +00:00
2025-10-04 22:08:00 +02:00
…
2024-12-04 09:29:30 -08:00
2025-09-07 13:04:52 +00:00
2025-07-18 09:28:21 +00:00
2025-09-23 12:41:47 +00:00

Internal Modules

The modules located in lib/internal directory are exclusively meant for internal usage within the Node.js core. They are not intended to be accessed via user modules require(). These modules may change at any point in time. Relying on these internal modules outside the core is not supported and can lead to unpredictable behavior.

In certain scenarios, accessing these internal modules for debugging or experimental purposes might be necessary. Node.js provides the --expose-internals flag to expose these modules to userland code. This flag only exists to assist Node.js maintainers with debugging internals. It is not meant for use outside the project.