mermaid-cli
mermaid-cli copied to clipboard
Using NPM instead of Yarn v1 for mermaid-cli development
Currently, the mermaid-cli
project is use Yarn v1 (also known as Classic Yarn) for managing development dependencies.
Yarn v1 is currently barely developed, since Yarn v2 has been out since January 2020 and even Yarn v3 has been out since July 2021.
I'd like to propose instead changing to use the default NPM, as it now has pretty much all the features that Yarn v1 had, and it comes with most Node.JS installations.
Changes
- All
yarn ...
commands would switch tonpm ...
commands. - The
yarn.lock
file will be replaced with apackage-lock.json
file. -
No changes to users of
mermaid-cli
, this change only affectsmermaid-cli
developers
Benefits
- Allows us to use newer features of NPM, like:
- https://github.blog/2023-04-19-introducing-npm-package-provenance/
- NPM is now more common in the JavaScript eco-system.
- NPM is better maintained.
- The
mermaid-cli
project is already partly using NPM, i.e. in GitHub Actions scripts: https://github.com/mermaid-js/mermaid-cli/blob/69499c828b40ec78032c9f1b2e7889b2b633ed84/.github/workflows/release-publish.yml#L47, so it would be more consistent to use a single package manager everywhere.
Go for it if you find the time! ❤️