mermaid-js / mermaid-cli

Command line tool for the Mermaid library
MIT License
2.31k stars 223 forks source link

Does the version of project mermaid-cli correspond to that of mermaid ? #601

Closed SealinGp closed 11 months ago

SealinGp commented 11 months ago

Help us help you!

my target: i just want mermaid-cli can use mermaid v10.4.0

one ways to use mermaid v10.4.0 i can think of

  1. i clone this project and change package.json mermaid to 10.4.0 localy and use it
    npm i
    node src/cli.js

Is there other ways ?

aloisklink commented 11 months ago

Hi, the pre-built of mermaid-cli published to NPM at https://www.npmjs.com/package/@mermaid-js/mermaid-cli (e.g. if you do npm install @mermaid-js/mermaid-cli) do follow Mermaid's versioning, at least for the MAJOR and MINOR versions. E.g. v10.4.x of the mermaid-cli project will match with v10.4.y of the mermaid project.

We do have a message in the README.md about this, but maybe it could be made more clear? We'd love to hear suggestions!

If you clone this project locally and use yarn install, it will pick v10.4.0 for you, since that's the version in our yarn.lock file:

https://github.com/mermaid-js/mermaid-cli/blob/d236fc2e1d393a3f134f2e8ef9f4c55e0d3bc96a/yarn.lock#L3992-L3993

We currently rely on @dependabot to automatically update this file for us, but we could probably set it to automatically update the package.json file at the same time, using the versioning-strategy increase option.