Package Manager
Last modified by Manuel Leduc on 2023/11/10 17:06
Options
Package managers
Options
- npm
- yarn
- pnpm
- bolt seems unmaintained, advertised as an alternative to yarn
Comparison Matrix
Package Manager | Native Support for workspaces | Disk space usage/Bandwidth use |
---|---|---|
npm | Yes | Baseline |
yarn | Yes | Faster |
pnpm | Yes | Faster |
Monorepo manager
Choices
Comparison Matrix
Option | Successfully integrated with pnpm | Github link | Licence |
---|---|---|---|
lerna | no | https://github.com/lerna/lerna | MIT |
nx | yes | https://github.com/nrwl/nx (20.1k stars) A lot of contributors | MIT |
rush | no | https://github.com/microsoft/rushstack | MIT |
turbo | yes | https://github.com/vercel/turbo (23.4k stars)
| MPL-2.0 |
Resources
Notes
- lerna allows for two versioning modes
- common version: when lerna version is called, all the modules are upgraded to a common version. Some modules are released even if they did not change since the latest release, but it's easy to know what's working together (that's what XWiki Standard is doing)
- independent version: when lerna version is called, the modules are scanned for changes since the latest release. Only modules that have changed, and module that have a changed dependency, have a new version. Only the minimal set of modules is bumped to a new version. This mean less code to upgrade, but on the other head, this means to be very careful when performing lerna version as each changed module needs to be defined with a new version and the release manager needs to carefully respect semantic versioning.
Criteria
We aim at being monorepo for the following advantages:
- easier PR review if spanning across several modules
- ideally avoid duplication of dependency version declaration
- faster installation as a single node_module directory is initialized for whole project, avoiding duplication.