From 86fa46db1c1b67cd4f621c5e7f49aeec3a5437a2 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sun, 21 Jul 2024 22:51:20 +0500 Subject: [PATCH] doc: add info about prefix-only modules to `module.builtinModules` PR-URL: https://github.com/nodejs/node/pull/53954 Reviewed-By: Antoine du Hamel Reviewed-By: Luigi Pinca --- doc/api/module.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/module.md b/doc/api/module.md index 730776d984c562..1a68ad0f01efa8 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -28,6 +28,8 @@ added: A list of the names of all modules provided by Node.js. Can be used to verify if a module is maintained by a third party or not. +Note: the list doesn't contain [prefix-only modules][] like `node:test`. + `module` in this context isn't the same object that's provided by the [module wrapper][]. To access it, require the `Module` module: @@ -1071,6 +1073,7 @@ returned object contains the following keys: [hooks]: #customization-hooks [load hook]: #loadurl-context-nextload [module wrapper]: modules.md#the-module-wrapper +[prefix-only modules]: modules.md#built-in-modules-with-mandatory-node-prefix [realm]: https://tc39.es/ecma262/#realm [source map include directives]: https://sourcemaps.info/spec.html#h.lmz475t4mvbx [transferrable objects]: worker_threads.md#portpostmessagevalue-transferlist