# What changed in @mermaid-js/mermaid-cli

> 20 changes in @mermaid-js/mermaid-cli 11 to 12 from its official release notes, upgrade guides and advisories: 8 breaking, 4 new APIs and options. Each one cited. Sources checked 2026-10-21. HTML: https://unstale.sh/npm/@mermaid-js/mermaid-cli/

To see which of these apply to a repository, run `npx @unstale/cli init` in it.

## @mermaid-js/mermaid-cli 12

### Breaking changes

- Upgrading to Mermaid v12.0.0 changes the default diagram themes and layouts. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Replaced by the improved `--size` option. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Now only looks for locally installed NPM icon packs; use --iconPacksAndUrls with a full URL for CDN downloads. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Node.js v22.13 or later is required. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- The option has been removed; PDFs are now fitted by default. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Puppeteer v25 or later is required. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Replaces `--width` and `--height`, sets the Puppeteer viewport, and tries to produce PNG files at the given resolution. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Replaced by the improved `--size` option. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)

### New APIs and options

- Use this option with a full URL to dynamically download an icon pack from a CDN. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Disables embedding fonts into SVG files. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Use `--pdf-paper-format=Letter` to return to the old PDF fitting behaviour. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Recursive and OpenSans fonts are now supported. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)

### Behavior and default changes

- Now uses Mermaid's `themeCSS`. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Icons can now be loaded from `file://` URIs. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- Fonts are now embedded into SVG files by default, increasing SVG file size. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)
- PDFs are now fitted by default. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)

### Fixes and other changes

- Corrects background colours in PDF exports. (12.0.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/12.0.0)

## @mermaid-js/mermaid-cli 11

### Behavior and default changes

- Uses Puppeteer cooperative intercepts. (11.16.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/11.16.0)

### Tooling

- The Dockerfile adds mmdc to PATH, making the command available without specifying its full path. (11.17.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/11.17.0)

### Fixes and other changes

- Adds support for Puppeteer v25. (11.16.0) — [release notes](https://github.com/mermaid-js/mermaid-cli/releases/tag/11.16.0)
