From 3872abd9a61f78775e9c57903625734a68c196d1 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 8 Sep 2022 14:29:31 -0400 Subject: [PATCH] doc: update guidance for adding new modules MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - updated based on decision to use node: prefix in https://github.com/nodejs/TSC/pull/1206 - updated based on agreement in TSC meeting on adding /promises to existing modules as per minutes - https://github.com/nodejs/TSC/pull/1281 Signed-off-by: Michael Dawson PR-URL: https://github.com/nodejs/node/pull/44576 Reviewed-By: Luigi Pinca Reviewed-By: Rich Trott Reviewed-By: Colin Ihrig Reviewed-By: Geoffrey Booth Reviewed-By: Matteo Collina Reviewed-By: Antoine du Hamel Reviewed-By: Joyee Cheung Reviewed-By: Michaƫl Zasso Reviewed-By: Beth Griggs Reviewed-By: Darshan Sen Reviewed-By: Danielle Adams Reviewed-By: Ruben Bridgewater --- doc/contributing/collaborator-guide.md | 20 ++++++++++++++------ 1 file changed, 14 insertions(+), 6 deletions(-) diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index dfb23aa53156e7..018d164b55acd4 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -392,13 +392,21 @@ metadata. Raise a pull request like any other change. Treat commits that introduce new core modules with extra care. -Check if the module's name conflicts with an existing ecosystem module. If it -does, choose a different name unless the module owner has agreed in writing to -transfer it. +New modules must only be added with the `node:` prefix. -If the new module name is free, register a placeholder in the module registry as -soon as possible. Link to the pull request that introduces the new core module -in the placeholder's `README`. +When adding promises to an existing API, add `/promises` +(`inspector/promises`, etc.). Apply the `semver-major` label to the addition. + +If the new module name is free in npm, register +a placeholder in the module registry as soon as possible. Link to the pull +request that introduces the new core module in the placeholder's `README`. + +If the module name is not free and the module is +not widely used, contact the owner to see if they would be willing to transfer +it to the project. + +We register a placeholder without the `node:` prefix whenever +possible to avoid confusion and typosquatting attacks. For pull requests introducing new core modules: