From f1b951fd2248c9f44b730345e1681f18903aa747 Mon Sep 17 00:00:00 2001 From: Dario Piotrowicz Date: Sun, 16 Feb 2025 22:31:15 +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) PR-URL: https://github.com/nodejs/node/pull/57089 Refs: https://github.com/nodejs/node/pull/56185 Reviewed-By: Antoine du Hamel Reviewed-By: James M Snell Reviewed-By: Jordan Harband Reviewed-By: Colin Ihrig --- 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 9e7c2e9b099a19..dee0eb26a9145c 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