From d0e04e053c7f96f4c75aea06e020926cfcd73351 Mon Sep 17 00:00:00 2001 From: Aviv Keller <38299977+RedYetiDev@users.noreply.github.com> Date: Mon, 6 May 2024 13:14:33 -0400 Subject: [PATCH 1/2] doc: add note about `--expose-internals` --- lib/internal/README.md | 15 +++++++++++---- 1 file changed, 11 insertions(+), 4 deletions(-) diff --git a/lib/internal/README.md b/lib/internal/README.md index d44321c6a24392..8c757005edccc5 100644 --- a/lib/internal/README.md +++ b/lib/internal/README.md @@ -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. From 530c63a711204021171d61966ba6bec05053803f Mon Sep 17 00:00:00 2001 From: Aviv Keller Date: Wed, 11 Sep 2024 18:21:09 -0400 Subject: [PATCH 2/2] Update README.md --- lib/internal/README.md | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/lib/internal/README.md b/lib/internal/README.md index 8c757005edccc5..f02d352f6cdd04 100644 --- a/lib/internal/README.md +++ b/lib/internal/README.md @@ -8,6 +8,6 @@ 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. +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.