-
Notifications
You must be signed in to change notification settings - Fork 251
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
mermaid-cli v11 breaking changes #701
Conversation
Discussed a bit more. we can have that in subsequent PR's |
This will be required by Vite v5.
This is used by corepack.
Node.JS v18.19 is the version of Node.JS that is available in Debian 12 and Ubuntu 24.04, so it's a good minumum version for us to support to. BREAKING CHANGE: The minimum required Node.JS version is now 18.19. Support for Node.JS v14, v15, v16, v17, and v19 have been dropped.
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD will be removed in Puppeteer v20.
BREAKING CHANGE: FontAwesome v6 shouldn't have many breaking changes, but please see https://fontawesome.com/changelog for a full list of breaking changes.
Make `puppeteer` a `peerDependency` so that users can pick which versions of Puppeteer they want to install. I've specified that the allowable versions are: `^19 || ^20 || ^21 || ^22`. I've also upgraded our tests to run with Puppeteer v22. BREAKING CHANGE: Puppeteer is now a `peerDependency` instead of a `dependency`. This means you may need to manually install your own version of Puppeteer.
`headless: 'shell'` uses the old chrome headless mode, and is much faster than the default new headless mode, see https://pptr.dev/guides/headless-modes/
In Puppeteer v22, using `headless: 'shell'` is much faster than the new headless mode. It also works in Puppeteer v19, v20, and v21 (although it prints a warning).
BREAKING CHANGE: The deprecated `parseMMD` function has been removed. Please use the `data` property returned from `renderMermaid()`.
Commander v12 drops Node.JS v16 support.
Mermaid v11 has a new `@mermaid-js/layout-elk` package that needs to be setup for old `flowchart-elk` diagrams to continue to work. BREAKING CHANGE: Mermaid v11 has some breaking changes, see https://github.com/mermaid-js/mermaid/releases/tag/v11.0.0 Co-authored-by: Alois Klink <alois@aloisklink.com>
Upgrade to Puppeteer v23 and drop support for previous Puppeteer versions. BREAKING CHANGE: The minimum supported version of Puppeteer is now v23. BREAKING CHANGE: The `renderMermaid()` function now returns a `Uint8Array` instead of a `Buffer`, as Puppeteer v23 now returns a `Uint8Array`.
Yarn v1 is quite outdated and newer versions of npm have similar features now.
Mermaid v11.0.2 no longer allows the invalid comments in git graphs with only one `%` character. You now need `%%`.
Rebased to fix merge conflicts. @MindaugasLaganeckas, if you have time, would you mind reviewing and, if everything looks good, making a release (please copy the above list of BREAKING CHANGES into the release notes)? I still unfortunately don't know the release process! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for this awesome contribution!
📑 Summary
Upgrade
mermaid-cli
to support Mermaid v11.While I was at it, I've also taken the opportunity to make some breaking changes, now that we'll have a major version bump.
BREAKING CHANGES
Make
puppeteer
apeerDependency
so that users can pick which versions of Puppeteer they want to install.I've specified that the allowable versions are:
^23
, but in the future, we can make it^23 || ^24
. I've also upgraded our tests to run with Puppeteer v23.Most package managers will automatically pick a version of
puppeteer
for users to install, but users will be able to override this.Resolves Upgrade puppeteer #627
renderMermaid()
function now returns aUint8Array
instead of aBuffer
. This is because Puppeteer v23 now returns aUint8Array
instead of aBuffer
.📏 Design Decisions
I've also changed our package manger from
yarn
tonpm
(closes #529). Yarn v1 is quite outdated and newer versions of npm have similar features now. The latest versions of npm also support generating provenance statements, see https://docs.npmjs.com/generating-provenance-statements.I know this is quite a big PR! @MindaugasLaganeckas, please let me know if you'd prefer me to break this up into smaller PRs! I was just a bit lazy and didn't want to have to constantly rebase my PRs to fix merge conflicts!
Thanks to @saurabhg772244 for helping me with upgrading to Mermaid v11 and using the new
@mermaid-js/layout-elk
package!📋 Tasks
Make sure you
master
branch