• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1# To be or not to be in core
2
3This document explains things to consider when deciding whether a component
4should be in core or not.
5
6A component may be included in core as a dependency, a module, or integrated
7into the code base. The same arguments for including/not including in core
8generally apply in all of these cases.
9
10## Strong arguments for including a component in core
11
121. The component provides functionality that is standardized (such as a
13   [Web API][]) and overlaps with existing functionality.
142. The component can only be implemented in core.
153. The component can only be implemented in a performant way in core.
164. Developer experience is significantly improved if the component is in core.
175. The component provides functionality that can be expected to solve at
18   least one common use case Node.js users face.
196. The component requires native bindings. Inclusion in core enables
20   utility across operating systems and architectures without requiring
21   users to have a native compilation toolchain.
227. Part or all of the component will also be re-used or duplicated in core.
23
24## Strong arguments against including a component in core
25
261. None of the arguments listed in the previous section apply.
272. The component has a license that prohibits Node.js from including it in core
28   without also changing its own license.
293. There is already similar functionality in core and adding the component will
30   provide a second API to do the same thing.
314. A component (or/and the standard it is based on) is deprecated and there is
32   a non-deprecated alternative.
335. The component is evolving quickly and inclusion in core will require frequent
34   API changes.
35
36## Benefits and challenges
37
38When it is unclear whether a component should be included in core, it might be
39helpful to consider these additional factors.
40
41### Benefits
42
431. The component will receive more frequent testing with Node.js CI and CITGM.
442. The component will be integrated into the LTS workflow.
453. Documentation will be integrated with core.
464. There is no dependency on npm.
47
48### Challenges
49
501. Inclusion in core, rather than as an ecosystem module, is likely to reduce
51   code merging velocity. The Node.js process for code review and merging is
52   more time-consuming than that of most separate modules.
532. By being bound to the Node.js release cycle, it is harder and slower to
54   publish patches.
553. Less flexibility for users. They can't update the component
56   when they choose without also updating Node.js.
57
58[Web API]: https://developer.mozilla.org/en-US/docs/Web/API
59