From 003e2c25ec1c75720b385b749680c97abdff4ba3 Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Tue, 21 Jul 2026 11:30:54 +0200 Subject: [PATCH 1/2] doc: clarify rules for adding new built-in modules Signed-off-by: Antoine du Hamel --- doc/contributing/collaborator-guide.md | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index c0777771be631e..81839b0d3a5621 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -443,10 +443,12 @@ metadata. Raise a pull request like any other change. Treat commits that introduce new core modules with extra care. -New modules must only be added with the `node:` prefix. +New modules must only be added with the `node:` prefix, as `semver-minor`. -When adding promises to an existing API, add `/promises` -(`inspector/promises`, etc.). Apply the `semver-major` label to the addition. +When adding a "sub-module", e.g. a promise varient of an existing API (e.g. +`node:inspector/promises`) that is available without the `node:` prefix, making +the sub-module available without the prefix is possible behind a runtime flag, +or as a `semver-major` change. If the new module name is free in npm, register a placeholder in the module registry as soon as possible. Link to the pull From c75d5a0e6dd84d66a963108bd064ce35b8ee80ab Mon Sep 17 00:00:00 2001 From: Antoine du Hamel Date: Wed, 22 Jul 2026 00:22:36 +0200 Subject: [PATCH 2/2] fixup! doc: clarify rules for adding new built-in modules Co-authored-by: Luigi Pinca --- doc/contributing/collaborator-guide.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index 81839b0d3a5621..b81a86bd86c08f 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -445,7 +445,7 @@ Treat commits that introduce new core modules with extra care. New modules must only be added with the `node:` prefix, as `semver-minor`. -When adding a "sub-module", e.g. a promise varient of an existing API (e.g. +When adding a "sub-module", e.g. a promise variant of an existing API (e.g. `node:inspector/promises`) that is available without the `node:` prefix, making the sub-module available without the prefix is possible behind a runtime flag, or as a `semver-major` change.