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-10-21.
8 breaking4 new APIs and options5 behavior and defaults1 tooling2 fixes and other
See which of these apply to your code, ranked, in your agent:
npx @unstale/cli init@mermaid-js/mermaid-cli 1217 changes
Breaking changes 8
Upgrading to Mermaid v12.0.0 changes the default diagram themes and layouts.
Replaced by the improved
--sizeoption.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.
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 4
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.
Fixes and other changes 1
Corrects background colours in PDF exports.
@mermaid-js/mermaid-cli 113 changes
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 1
Adds support for Puppeteer v25.