From 57e9e2c5b062e9d9f21957c9c9d578e1b5be07cc Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Sun, 16 Feb 2025 11:19:00 +0000 Subject: [PATCH] doc: update `module.builtinModules` sentence updates the sentence saying that `module.builtinModule` only contains the modules that can be loaded without `node:` (since v23.5.0 also prefix-only modules are included in the list) --- doc/api/modules.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/api/modules.md b/doc/api/modules.md index 8de9375c561dba..831a9da7a34547 100644 --- a/doc/api/modules.md +++ b/doc/api/modules.md @@ -516,9 +516,11 @@ by that name. Some built-in modules are always preferentially loaded if their identifier is passed to `require()`. For instance, `require('http')` will always -return the built-in HTTP module, even if there is a file by that name. The list -of built-in modules that can be loaded without using the `node:` prefix is exposed -in [`module.builtinModules`][], listed without the prefix. +return the built-in HTTP module, even if there is a file by that name. + +The list of all the built-in modules can be retrieved from [`module.builtinModules`][]. +The modules being all listed without the `node:` prefix, except those that mandate such +prefix (as explained in the next section). ### Built-in modules with mandatory `node:` prefix