Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

doc: add note about --expose-internals #52861

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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. Exercise caution when using
this flag, as it can lead to unexpected results and is primarily intended
for advanced users and debugging purposes.