Files
node/lib/internal
Joyee Cheung 7cbe3de1d8 module: only emit require(esm) warning under --trace-require-module
require(esm) is relatively stable now and the experimental warning
has run its course - it's now more troublesome than useful.
This patch changes it to no longer emit a warning unless
`--trace-require-module` is explicitly used. The flag supports
two modes:

- `--trace-require-module=all`: emit warnings for all usages
- `--trace-require-module=no-node-modules`: emit warnings for
  usages that do not come from a `node_modules` folder.

PR-URL: https://github.com/nodejs/node/pull/56194
Fixes: https://github.com/nodejs/node/issues/55417
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Marco Ippolito <marcoippolito54@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
2025-01-05 13:05:26 -05:00
..
2024-11-27 11:03:39 -05:00
2024-11-27 11:03:39 -05:00
2024-11-27 11:03:39 -05:00
2024-10-04 10:20:24 +02:00
2024-10-04 10:20:26 +02:00
2024-11-27 11:03:39 -05:00
2025-01-05 13:05:26 -05:00
2024-11-27 11:03:39 -05:00
2024-11-27 11:03:39 -05:00
2024-11-27 11:03:39 -05:00
2024-09-12 11:06:49 +02:00
2024-04-29 22:46:31 +02:00
2024-11-27 11:03:39 -05:00
2024-11-27 11:03:39 -05:00
2024-10-04 10:20:24 +02:00
…
2025-01-05 12:57:35 -05:00
2024-10-04 10:20:24 +02:00
2024-08-30 15:52:14 -03:00
2024-02-19 01:19:44 +00:00
2024-07-16 12:01:15 +02: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.