-
-
Notifications
You must be signed in to change notification settings - Fork 31.7k
doc: document considerations for inclusion in core #40338
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Closed
Closed
Changes from all commits
Commits
Show all changes
2 commits
Select commit
Hold shift + click to select a range
File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,55 @@ | ||
# To be or not to be in core | ||
|
||
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. | ||
|
||
## Strong arguments for including a module in core | ||
|
||
1. The module provides functionality that is standardized (such as a | ||
[Web API][]) and overlaps with existing functionality. | ||
2. The module can only be implemented in core. | ||
3. The module can only be implemented in a performant way in core. | ||
4. Developer experience is significantly improved if the module is in core. | ||
5. The module provides functionality that can be expected to solve at least one | ||
common use case Node.js users face. | ||
6. The module requires native bindings. Inclusion in core enables utility across | ||
operating systems and architectures without requiring users to have a native | ||
compilation toolchain. | ||
7. Part or all of the module will also be re-used or duplicated in core. | ||
|
||
## Strong arguments against including a module in core | ||
Trott marked this conversation as resolved.
Show resolved
Hide resolved
|
||
|
||
1. None of the arguments list in the previous section apply. | ||
2. The module has a license that prohibits Node.js from including it in core | ||
without also changing its own license. | ||
3. There is already similar functionality in core and adding the module will | ||
provide a second API to do the same thing. | ||
4. A module (or/and the standard it is based on) is deprecated and there is | ||
a non-deprecated alternative. | ||
5. The module is evolving quickly and inclusion in core will require frequent | ||
API changes. | ||
|
||
## Benefits and challenges | ||
|
||
When it is unclear whether a module should be included in core, it might be | ||
helpful to consider these additional factors. | ||
|
||
### Benefits | ||
|
||
1. The module will receive more frequent testing with Node.js CI and CITGM. | ||
Trott marked this conversation as resolved.
Show resolved
Hide resolved
|
||
2. The module will be integrated into the LTS workflow. | ||
Trott marked this conversation as resolved.
Show resolved
Hide resolved
|
||
3. Documentation will be integrated with core. | ||
4. There is no dependency on npm. | ||
|
||
### Challenges | ||
|
||
1. 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. | ||
2. By being bound to the Node.js release cycle, it is harder and slower to | ||
publish patches. | ||
3. Less flexibility for end users. They can't update the module when they choose | ||
without also updating Node.js. | ||
|
||
[Web API]: https://developer.mozilla.org/en-US/docs/Web/API |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Uh oh!
There was an error while loading. Please reload this page.