From ca9144674246a7ef3b098b5ccae5c6010059628e Mon Sep 17 00:00:00 2001 From: Grigory Date: Thu, 18 Jul 2024 20:05:59 +0500 Subject: [PATCH 1/3] doc: add info about prefix-only modules to `module.builtinModules` --- doc/api/module.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/doc/api/module.md b/doc/api/module.md index 730776d984c562..8a35655e8c1771 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: @@ -1074,3 +1076,4 @@ returned object contains the following keys: [realm]: https://tc39.es/ecma262/#realm [source map include directives]: https://sourcemaps.info/spec.html#h.lmz475t4mvbx [transferrable objects]: worker_threads.md#portpostmessagevalue-transferlist +[prefix-only modules]: modules.md#built-in-modules-with-mandatory-node-prefix From ae6c00e0b2a8f6617590ae2af592d803e7bcb7d0 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sat, 20 Jul 2024 03:55:16 +0500 Subject: [PATCH 2/3] move `prefix-only modules` reference up --- doc/api/module.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/module.md b/doc/api/module.md index 8a35655e8c1771..7601b08f939004 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -1075,5 +1075,5 @@ returned object contains the following keys: [module wrapper]: modules.md#the-module-wrapper [realm]: https://tc39.es/ecma262/#realm [source map include directives]: https://sourcemaps.info/spec.html#h.lmz475t4mvbx -[transferrable objects]: worker_threads.md#portpostmessagevalue-transferlist [prefix-only modules]: modules.md#built-in-modules-with-mandatory-node-prefix +[transferrable objects]: worker_threads.md#portpostmessagevalue-transferlist From 1ed2d2c9c0b591d2019bd7410850a40098eacd93 Mon Sep 17 00:00:00 2001 From: Grigory Date: Sat, 20 Jul 2024 13:20:42 +0500 Subject: [PATCH 3/3] fix references order --- doc/api/module.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/api/module.md b/doc/api/module.md index 7601b08f939004..1a68ad0f01efa8 100644 --- a/doc/api/module.md +++ b/doc/api/module.md @@ -1073,7 +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 -[prefix-only modules]: modules.md#built-in-modules-with-mandatory-node-prefix [transferrable objects]: worker_threads.md#portpostmessagevalue-transferlist