| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent ef1ace7 commit 6357ef1
1 file changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -0,0 +1,55 @@ | |||
| 1 | + # To be or not to be in core | ||
| 2 | + | ||
| 3 | + Should a module be in core? This question arises every so often. This document | ||
| 4 | + explains things to consider when deciding whether a module should be in core or | ||
| 5 | + 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 provides functionality that can be expected to solve at least one | ||
| 15 | + common use case Node.js users face. | ||
| 16 | + 6. The module requires native bindings. Inclusion in core enables utility across | ||
| 17 | + operating systems and architectures without requiring users to have a native | ||
| 18 | + compilation toolchain. | ||
| 19 | + 7. Part or all of the module will also be re-used or duplicated in core. | ||
| 20 | + | ||
| 21 | + ## Strong arguments against including a module in core | ||
| 22 | + | ||
| 23 | + 1. None of the arguments list in the previous section apply. | ||
| 24 | + 2. The module has a license that prohibits Node.js from including it in core | ||
| 25 | + without also changing its own license. | ||
| 26 | + 3. There is already similar functionality in core and adding the module will | ||
| 27 | + provide a second API to do the same thing. | ||
| 28 | + 4. A module (or/and the standard it is based on) is deprecated and there is | ||
| 29 | + a non-deprecated alternative. | ||
| 30 | + 5. The module is evolving quickly and inclusion in core will require frequent | ||
| 31 | + API changes. | ||
| 32 | + | ||
| 33 | + ## Benefits and challenges | ||
| 34 | + | ||
| 35 | + When it is unclear whether a module should be included in core, it might be | ||
| 36 | + helpful to consider these additional factors. | ||
| 37 | + | ||
| 38 | + ### Benefits | ||
| 39 | + | ||
| 40 | + 1. The module will receive more frequent testing with Node.js CI and CITGM. | ||
| 41 | + 2. The module will be integrated into the LTS workflow. | ||
| 42 | + 3. Documentation will be integrated with core. | ||
| 43 | + 4. There is no dependency on npm. | ||
| 44 | + | ||
| 45 | + ### Challenges | ||
| 46 | + | ||
| 47 | + 1. Inclusion in core is likely to reduce code merging velocity as the Node.js | ||
| 48 | + process for code review and merging is more time-consuming than that of most | ||
| 49 | + individual modules. | ||
| 50 | + 2. By being bound to the Node.js release cycle, it is harder and slower to | ||
| 51 | + publish patches. | ||
| 52 | + 3. Less flexibility for end users. They can't update the module when they choose | ||
| 53 | + without also updating Node.js. | ||
| 54 | + | ||
| 55 | + [Web API]: https://developer.mozilla.org/en-US/docs/Web/API | ||
| Back | FazBrowse Home | New Git URL |
0 commit comments