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 <mdawson@devrus.com>

PR-URL: https://github.com/nodejs/node/pull/44576
Reviewed-By: Luigi Pinca <luigipinca@gmail.com>
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Geoffrey Booth <webadmin@geoffreybooth.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Antoine du Hamel <duhamelantoine1995@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Michaël Zasso <targos@protonmail.com>
Reviewed-By: Beth Griggs <bethanyngriggs@gmail.com>
Reviewed-By: Darshan Sen <raisinten@gmail.com>
Reviewed-By: Danielle Adams <adamzdanielle@gmail.com>
Reviewed-By: Ruben Bridgewater <ruben@bridgewater.de>
This commit is contained in:
Michael Dawson 2022-09-08 14:29:31 -04:00
parent 269aa6ebba
commit eead3e9ac8

View File

@ -392,13 +392,21 @@ metadata. Raise a pull request like any other change.
Treat commits that introduce new core modules with extra care. Treat commits that introduce new core modules with extra care.
Check if the module's name conflicts with an existing ecosystem module. If it New modules must only be added with the `node:` prefix.
does, choose a different name unless the module owner has agreed in writing to
transfer it.
If the new module name is free, register a placeholder in the module registry as When adding promises to an existing API, add `/promises`
soon as possible. Link to the pull request that introduces the new core module (`inspector/promises`, etc.). Apply the `semver-major` label to the addition.
in the placeholder's `README`.
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: For pull requests introducing new core modules: