From b4b1ced1eb93d9d1e57d551d37d9f3bead0cdb59 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 8 Sep 2022 14:29:31 -0400 Subject: [PATCH 01/10] doc: update guidance for adding new modules - 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 --- doc/contributing/collaborator-guide.md | 21 +++++++++++++++------ 1 file changed, 15 insertions(+), 6 deletions(-) diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index dfb23aa53156e7..449d936c79f8ce 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -392,13 +392,22 @@ 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 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 APIs it is ok to add `/promises` to an existing module. +For example: `inspector/promises`. These additionsl should be marked as +SemVer major by default. + +If the new module name without the `node:` prefix 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`. + +If the module name without the `node:` prefix 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 try to register a placeholder without the `node:` prefix whenever +possible in order to avoid confusion and typosquatting type attacks. For pull requests introducing new core modules: From 9b3ae9abc2adf3015b74c09b043397db130b4212 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Thu, 8 Sep 2022 14:44:01 -0400 Subject: [PATCH 02/10] squash:fixup --- 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 449d936c79f8ce..77357ffd3366b8 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -395,7 +395,7 @@ Treat commits that introduce new core modules with extra care. New modules must be added with the `node:` prefix. When adding promises APIs it is ok to add `/promises` to an existing module. -For example: `inspector/promises`. These additionsl should be marked as +For example: `inspector/promises`. These additions should be marked as SemVer major by default. If the new module name without the `node:` prefix is free, register From e82833b44cb40b09b3b21756d9c0bf6024b6cbd2 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 8 Sep 2022 13:16:59 -0700 Subject: [PATCH 03/10] Update doc/contributing/collaborator-guide.md --- doc/contributing/collaborator-guide.md | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index 77357ffd3366b8..0ee704424c7d9e 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -394,9 +394,8 @@ Treat commits that introduce new core modules with extra care. New modules must be added with the `node:` prefix. -When adding promises APIs it is ok to add `/promises` to an existing module. -For example: `inspector/promises`. These additions should be marked as -SemVer major by default. +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 without the `node:` prefix is free, register a placeholder in the module registry as soon as possible. Link to the pull From 347453eadba81f3e3665bf4bdab0cba745aca353 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 8 Sep 2022 13:17:03 -0700 Subject: [PATCH 04/10] Update doc/contributing/collaborator-guide.md --- 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 0ee704424c7d9e..532b65c1f542fd 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -406,7 +406,7 @@ not widely used, contact the owner to see if they would be willing to transfer it to the project. We try to register a placeholder without the `node:` prefix whenever -possible in order to avoid confusion and typosquatting type attacks. +possible to avoid confusion and typosquatting attacks. For pull requests introducing new core modules: From 621a8b0c6868c1bc0b948d36828ad388ce654a7e Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 8 Sep 2022 13:17:34 -0700 Subject: [PATCH 05/10] Update doc/contributing/collaborator-guide.md --- doc/contributing/collaborator-guide.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index 532b65c1f542fd..344c3b3e7f51eb 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -394,7 +394,8 @@ Treat commits that introduce new core modules with extra care. New modules must be added with the `node:` prefix. -When adding promises to an existing API, add `/promises` (`inspector/promises`, etc.). +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 without the `node:` prefix is free, register From d1291142fb4b1825193cf70b363c7cde63fa3921 Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 8 Sep 2022 13:18:08 -0700 Subject: [PATCH 06/10] Update doc/contributing/collaborator-guide.md --- doc/contributing/collaborator-guide.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/doc/contributing/collaborator-guide.md b/doc/contributing/collaborator-guide.md index 344c3b3e7f51eb..211cf693561f62 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -395,8 +395,7 @@ Treat commits that introduce new core modules with extra care. New modules must be added with the `node:` prefix. When adding promises to an existing API, add `/promises` -(`inspector/promises`, etc.). -Apply the `semver-major` label to the addition. +(`inspector/promises`, etc.). Apply the `semver-major` label to the addition. If the new module name without the `node:` prefix is free, register a placeholder in the module registry as soon as possible. Link to the pull From af6919e20a55b5871819d7fc2f275b6fa6c738dd Mon Sep 17 00:00:00 2001 From: Rich Trott Date: Thu, 8 Sep 2022 13:18:43 -0700 Subject: [PATCH 07/10] Update doc/contributing/collaborator-guide.md --- 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 211cf693561f62..2cad3ad98c88f9 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -405,7 +405,7 @@ If the module name without the `node:` prefix 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 try to register a placeholder without the `node:` prefix whenever +We register a placeholder without the `node:` prefix whenever possible to avoid confusion and typosquatting attacks. For pull requests introducing new core modules: From a9fe2fe7c554ddec46fde281551a0691d5fa9cd2 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 9 Sep 2022 15:09:42 -0400 Subject: [PATCH 08/10] Update doc/contributing/collaborator-guide.md --- 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 2cad3ad98c88f9..1f3ecc0aac9caa 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -392,7 +392,7 @@ metadata. Raise a pull request like any other change. Treat commits that introduce new core modules with extra care. -New modules must be added with the `node:` prefix. +New modules must only be added with the `node:` prefix. When adding promises to an existing API, add `/promises` (`inspector/promises`, etc.). Apply the `semver-major` label to the addition. From 0b19d4ee6d12d8d6483bf23392f614987550d919 Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 9 Sep 2022 15:10:50 -0400 Subject: [PATCH 09/10] Update doc/contributing/collaborator-guide.md --- 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 1f3ecc0aac9caa..a5a89cd487cb99 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -401,7 +401,7 @@ If the new module name without the `node:` prefix 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`. -If the module name without the `node:` prefix is not free and the module is +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. From c524819d362bcee641c48a3296b044e3cc09f26a Mon Sep 17 00:00:00 2001 From: Michael Dawson Date: Fri, 9 Sep 2022 15:12:04 -0400 Subject: [PATCH 10/10] Update doc/contributing/collaborator-guide.md --- 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 a5a89cd487cb99..018d164b55acd4 100644 --- a/doc/contributing/collaborator-guide.md +++ b/doc/contributing/collaborator-guide.md @@ -397,7 +397,7 @@ New modules must only be added with the `node:` prefix. 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 without the `node:` prefix is free, register +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`.