npm / @mermaid-js/mermaid-cli
@mermaid-js/mermaid-cli
What changed in @mermaid-js/mermaid-cli 11 to 12, from its official release notes, upgrade guides and advisories. Sources checked 2026-12-05.
8 breaking1 security8 new APIs and options6 behavior and defaults2 tooling6 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@mermaid-js/mermaid-cli 1219 changes
Breaking changes 7
Upgrading to Mermaid v12.0.0 changes the default diagram themes and layouts.
Now only looks for locally installed NPM icon packs; use --iconPacksAndUrls with a full URL for CDN downloads.
Node.js v22.13 or later is required.
The option has been removed; PDFs are now fitted by default.
Puppeteer v25 or later is required.
Replaces
--widthand--height, sets the Puppeteer viewport, and tries to produce PNG files at the given resolution.Replaced by the improved
--sizeoption.
Security 1
Corrects the permission check for allowed directories.
New APIs and options 4
Use this option with a full URL to dynamically download an icon pack from a CDN.
Disables embedding fonts into SVG files.
Use
--pdf-paper-format=Letterto return to the old PDF fitting behaviour.Recursive and OpenSans fonts are now supported.
Behavior and default changes 5
Adds a description to the output displayed when the CLI is called with --help.
Now uses Mermaid's
themeCSS.Icons can now be loaded from
file://URIs.Fonts are now embedded into SVG files by default, increasing SVG file size.
PDFs are now fitted by default.
Tooling 1
Upgrades Mermaid to v12.2.0, changing the Mermaid version used by the CLI.
Fixes and other changes 1
Corrects background colours in PDF exports.
@mermaid-js/mermaid-cli 1112 changes
Breaking changes 1
Stops bundling FontAwesome and KaTeX CSS and fonts.
New APIs and options 4
Adds support for fractional scaling.
Adds a command-line option to limit parallel diagram renders.
Adds support for the @mermaid-js/layout-tidy-tree layout package.
Mermaid 11.14.0 adds support for Venn diagrams.
Behavior and default changes 1
Uses Puppeteer cooperative intercepts.
Tooling 1
The Dockerfile adds mmdc to PATH, making the command available without specifying its full path.
Fixes and other changes 5
Adds support for Puppeteer v25.
Fixes a race condition when writing the file through the Node.js run API.
Adds support for @mermaid-js/layout-elk v0.2.
Adds a require field for types and default in package.json.
Updates peerDependencies to support Puppeteer v24.