|
| 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