mermaid-cli icon indicating copy to clipboard operation
mermaid-cli copied to clipboard

Using NPM instead of Yarn v1 for mermaid-cli development

Open aloisklink opened this issue 1 year ago • 1 comments

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 to npm ... commands.
  • The yarn.lock file will be replaced with a package-lock.json file.
  • No changes to users of mermaid-cli, this change only affects mermaid-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.

aloisklink avatar Apr 20 '23 18:04 aloisklink

Go for it if you find the time! ❤️

MindaugasLaganeckas avatar Apr 21 '23 07:04 MindaugasLaganeckas