Should a module be in core? This question arises every so often. This document explains things to consider when deciding whether a module should be in core or not.
- The module provides functionality that is standardized (such as a Web API) and overlaps with existing functionality.
- The module can only be implemented in core.
- The module can only be implemented in a performant way in core.
- Developer experience is significantly improved if the module is in core.
- The module provides functionality that can be expected to solve at least one common use case Node.js users face.
- The module requires native bindings. Inclusion in core enables utility across operating systems and architectures without requiring users to have a native compilation toolchain.
- Part or all of the module will also be re-used or duplicated in core.
- None of the arguments list in the previous section apply.
- The module has a license that prohibits Node.js from including it in core without also changing its own license.
- There is already similar functionality in core and adding the module will provide a second API to do the same thing.
- A module (or/and the standard it is based on) is deprecated and there is a non-deprecated alternative.
- The module is evolving quickly and inclusion in core will require frequent API changes.
When it is unclear whether a module should be included in core, it might be helpful to consider these additional factors.
- The module will receive more frequent testing with Node.js CI and CITGM.
- The module will be integrated into the LTS workflow.
- Documentation will be integrated with core.
- There is no dependency on npm.
- Inclusion in core is likely to reduce code merging velocity as the Node.js process for code review and merging is more time-consuming than that of most individual modules.
- By being bound to the Node.js release cycle, it is harder and slower to publish patches.
- Less flexibility for end users. They can't update the module when they choose without also updating Node.js.