Skip to content

Commit 1797355

Browse files
committed
doc: document considerations for inclusion in core
Document the things that are considered when making the determination as to whether something should or shouldn't be in core. This does not (yet, at least) attempt to address *how* to include modules in core. (Should it be in the Node.js code base or vendored in from a separate repository?) It is limited to *whether* something should be in core or not. Closes: nodejs/TSC#1041
1 parent 28f711b commit 1797355

File tree

1 file changed

+44
-0
lines changed

1 file changed

+44
-0
lines changed

doc/guides/modules-in-core.md

Lines changed: 44 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,44 @@
1+
# To be or not to be in core
2+
3+
Should a module should be in core? This question arises every so often. This
4+
document explains things to consider when deciding whether a module should be in
5+
core or not.
6+
7+
## Strong arguments for including a module in core
8+
9+
1. The module provides functionality that is standardized (such as a
10+
[Web API][]) and overlaps with existing functionality.
11+
2. The module can only be implemented in core.
12+
3. The module can only be implemented in a performant way in core.
13+
4. Developer experience is significantly improved if the module is in core.
14+
5. The module will be widely used, have cross platform native code, and being in
15+
core will avoid the need for an end-user compilation chain.
16+
6. Part or all of the module will also be re-used or duplicated in core.
17+
18+
## Strong arguments against including a module in core
19+
20+
1. None of the arguments list in the previous section apply.
21+
22+
## Benefits and challenges
23+
24+
When it is unclear whether a module should be included in core, it might be
25+
helpful to consider these additional factors.
26+
27+
### Benefits
28+
29+
1. The module will receive more frequent testing with Node.js CI and CITGM.
30+
2. The module will be integrated into the LTS workflow.
31+
3. Documentation will be integrated with core.
32+
4. There is no dependency on npm.
33+
34+
### Challenges
35+
36+
1. Inclusion in core is likely to reduce code merging velocity as the Node.js
37+
process for code review and merging is more time-consuming than that of most
38+
individual modules.
39+
2. By being bound to the Node.js release cycle, it is harder and slower to
40+
publish patches.
41+
3. Less flexibility for end users. They can't update the module when they choose
42+
without also updating Node.js.
43+
44+
[Web API]: https://developer.mozilla.org/en-US/docs/Web/API

0 commit comments

Comments
 (0)