What's Changed
Please refer the v10 changes section in CHANGELOG.md to see detailed migration steps.
Mermaid is ESM only!
We've dropped CJS support. So, you will have to update your import scripts as follows.
<script type="module">
import mermaid from 'https://cdn.jsdelivr.net/npm/mermaid@10/dist/mermaid.esm.min.mjs';
mermaid.initialize({ startOnLoad: true });
</script>
You can keep using v9 by adding the @9
in the CDN URL.
- <script src="https://cdn.jsdelivr.net/npm/mermaid/dist/mermaid.js"></script>
+ <script src="https://cdn.jsdelivr.net/npm/mermaid@9/dist/mermaid.js"></script>
Breaking changes in v10
- Switch to ESM only for v10? by @sidharthv96 #3590
- Break type of mermaid.render in v10 by @sidharthv96 #3577
- Improve init function and how selector and nodes are passed by @sidharthv96 #3394
- mermaid.init is not using the config that's passed by @sidharthv96 #3406
- Configurable HTML class for initialisation by @sidharthv96 #3055
Features
- fix(api): tree shaking package.json import by @AielloChan in #4101
- splitDiagrams by @sidharthv96 in #4110
- Adding the ability to use invisible edges by @knsv in #4113
Docs
- Add logo to readme by @sidharthv96 in #4076
- docs: minor fix on markdown by @Jeff-Tian in #4015
- Fix typos by @fkohrt in #4118
Chores
- chore(deps): update all non-major dependencies (minor) by @renovate in #4044
- chore(deps): update dependency @types/uuid to v9 by @renovate in #4067
- build(lint:fix): cache eslint in pnpm run lint:fix by @aloisklink in #4073
- chore(deps): update dependency rimraf to v4 by @renovate in #4070
- chore(deps): update dependency jsdom to v21 by @renovate in #4069
- chore(deps): update timonvs/pr-labeler-action action to v4 by @renovate in #4072
- chore(deps): update actions/configure-pages action to v3 by @renovate in #4065
- chore(deps): update actions/dependency-review-action action to v3 by @renovate in #4066
- chore(deps): update dependency vite to v4 by @renovate in #4071
- chore(deps): update dependency cypress to v12 by @renovate in #4068
New Contributors
- @Jeff-Tian made their first contribution in #4015
- @AielloChan made their first contribution in #4101
- @fkohrt made their first contribution in #4118
Full Changelog: v9.4.0...v10.0.0