Skip to content

Commit

Permalink
doc: add note about --expose-internals
Browse files Browse the repository at this point in the history
PR-URL: #52861
Reviewed-By: Jan Krems <jan.krems@gmail.com>
Reviewed-By: James M Snell <jasnell@gmail.com>
Reviewed-By: Rafael Gonzaga <rafael.nunu@hotmail.com>
  • Loading branch information
Aviv Keller authored and marco-ippolito committed Nov 17, 2024
1 parent 8e6b606 commit 27ff2da
Showing 1 changed file with 11 additions and 4 deletions.
15 changes: 11 additions & 4 deletions lib/internal/README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,13 @@
# 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.
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.

0 comments on commit 27ff2da

Please sign in to comment.