question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Deprecate mermaid.cli or @mermaid-js/mermaid-cli?

See original GitHub issue

Maybe the website is using https://www.npmjs.com/package/mermaid.cli instead of https://www.npmjs.com/package/@mermaid-js/mermaid-cli?

If anyone has access to that NPM package, maybe they can do an npm deprecate on it, something like:

npm deprecate mermaid.cli "Development has moved to the '@mermaid-js/mermaid-cli' package"

Ideally we’d also close all the open issues/PRs in https://github.com/mermaidjs/mermaid.cli and archive that repo since it looks like there are still people reporting bugs there.

Maybe with a message that says:

Development on this project has moved to https://github.com/mermaid-js/mermaid-cli

If this issue/PR is still valid, please re-create this issue in the new repository and add a link to this issue/PR.

A script like https://gist.github.com/mauritsvanrees/f0dc7d829a1957a1771adbf0e86057c5 might help, but then again, there are only ~60 or so open issues/PRs, so it might be faster to manually close every issue.

_Originally posted by @aloisklink in https://github.com/mermaid-js/mermaid-cli/issues/432#issuecomment-1325788390_


Yes, We should archive the GitHub repo, but the mermaid.cli package name seems too good to throw away.

npm i mermaid.cli
npm i @mermaid-js/mermaid-cli

IMHO, The first one looks better, and is in line with mermaid.live

Wonder what’s keeping us from going back to that package with a new major release?

Issue Analytics

  • State:open
  • Created 10 months ago
  • Comments:11 (5 by maintainers)

github_iconTop GitHub Comments

2reactions
sidharthv96commented, Nov 25, 2022

I’m not even sure if it’s possible to move ownership of a normal NPM package to an NPM @mermaid-js organization account.

I think this should allow access to publish.

npm access grant read-write mermaid-js:developers mermaid.cli

Then, if we add an mmdc alias to the package, people would be able to run both npx mermaid.cli ... and mmdc ... if they install globally.

1reaction
aloisklinkcommented, Nov 24, 2022

Wonder what’s keeping us from going back to that package [npm install mermaid.cli] with a new major release?

I think it’s mainly for permissions. Most projects are instead moving to @org/package because that way it’s much easier to manage project permissions, see https://docs.npmjs.com/organizations

It looks like the owner of mermaid.cli is @tylerlong

user@computer:~$ npm owner ls mermaid.cli
tylerlong <tyler4long@gmail.com>

It’s probably easier to just ask them to run npm deprecate mermaid.cli "Development has moved to the '@mermaid-js/mermaid-cli' package" then to ask them to mess with NPM permissions 😃

I’m not even sure if it’s possible to move ownership of a normal NPM package to an NPM @mermaid-js organization account.


ooc, i don’t see any changes in the 9.2.2 release notes that affect rendering. is the release notes only a subset of changes?

It’s part of updating the Mermaid back-end, but it’s a bit hidden, see below:

🧰 Maintenance

_From https://github.com/mermaid-js/mermaid-cli/releases/tag/9.2.2_

Maybe we should make that more prominent? Recommendations are welcome 😃 We could make the first line of the release notes something like This version of mermaid-cli is bundled with v9.x.x of mermaid, see [Mermaid v9.x.x release notes][link].

We could also add it to the mmdc --version, so maybe it logs something like: 9.2.2+mermaid-version.9.2.2. Normally, we try to keep the mermaid-cli version identical to the bundled mermaid version, but very occasionally, they do drift slightly.


Playwright can install dependencies upon first run on user machines, so you don’t have to bundle them with the package. no more chromium dependency

I prefer how puppeteer does it. It installs chromium automatically when running npm install, so that way you can use mermaid-cli offline after the first install.

There’s also some docs on how to use a pre-downloaded chromium version for puppeteer (e.g. https://github.com/mermaid-js/mermaid-cli/issues/331), which is used by the Mermaid docker image and people that have strict corporate security rules. If we switch to using playwright, all of those instructions will also need to be updated (maybe even make it impossible since I believe playwright uses forked versions of browsers).

do you think it’s worth switching?

I think the developer experience with playwright is much nicer (especially when writing tests), but the mermaid-cli use case is really basic, so I don’t see much reason to switch 😃

Ideally, the main mermaid project will add server-side rendering, so that we can completely remove chromium (see https://github.com/mermaid-js/mermaid/issues/3650), but who knows if that is even possible!

Read more comments on GitHub >

github_iconTop Results From Across the Web

Issues · mermaid-js/mermaid-cli - GitHub
Command line tool for the Mermaid library. Contribute to mermaid-js/mermaid-cli development by creating an account on GitHub.
Read more >
mermaid-cli - npm
This package has been deprecated​​ Author message: mermaid-cli is now part of mermaid core. please > contextify@0.1.11 install /usr/local/lib/ ...
Read more >
mermaid-cli dashboard | Percy
Welcome to Percy! Sign in to approve snapshots or create an account to start visual testing for free. Sign up with BrowserStack ·...
Read more >
mermaid - Generation of diagrams and flowcharts from text in ...
Configuration. Is it possible to adjust the margins for rendering the sequence diagram. This is done by defining mermaid.sequenceConfig or by the CLI...
Read more >
matthewfeickert/mermaid-cli - Docker Image
This Docker image is deprecated in favor of the mermaid project supported tool mermaid-js/mermaid-cli and its Docker image. To get the mermaid-js/mermaid-cli ......
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found