v10.0.0
版本发布时间: 2023-02-21 18:59:04
mermaid-js/mermaid最新发布版本:mermaid@11.2.1(2024-09-17 00:41:38)
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 https://github.com/mermaid-js/mermaid/pull/4101
- splitDiagrams by @sidharthv96 in https://github.com/mermaid-js/mermaid/pull/4110
- Adding the ability to use invisible edges by @knsv in https://github.com/mermaid-js/mermaid/pull/4113
Docs
- Add logo to readme by @sidharthv96 in https://github.com/mermaid-js/mermaid/pull/4076
- docs: minor fix on markdown by @Jeff-Tian in https://github.com/mermaid-js/mermaid/pull/4015
- Fix typos by @fkohrt in https://github.com/mermaid-js/mermaid/pull/4118
Chores
- chore(deps): update all non-major dependencies (minor) by @renovate in https://github.com/mermaid-js/mermaid/pull/4044
- chore(deps): update dependency @types/uuid to v9 by @renovate in https://github.com/mermaid-js/mermaid/pull/4067
- build(lint:fix): cache eslint in pnpm run lint:fix by @aloisklink in https://github.com/mermaid-js/mermaid/pull/4073
- chore(deps): update dependency rimraf to v4 by @renovate in https://github.com/mermaid-js/mermaid/pull/4070
- chore(deps): update dependency jsdom to v21 by @renovate in https://github.com/mermaid-js/mermaid/pull/4069
- chore(deps): update timonvs/pr-labeler-action action to v4 by @renovate in https://github.com/mermaid-js/mermaid/pull/4072
- chore(deps): update actions/configure-pages action to v3 by @renovate in https://github.com/mermaid-js/mermaid/pull/4065
- chore(deps): update actions/dependency-review-action action to v3 by @renovate in https://github.com/mermaid-js/mermaid/pull/4066
- chore(deps): update dependency vite to v4 by @renovate in https://github.com/mermaid-js/mermaid/pull/4071
- chore(deps): update dependency cypress to v12 by @renovate in https://github.com/mermaid-js/mermaid/pull/4068
New Contributors
- @Jeff-Tian made their first contribution in https://github.com/mermaid-js/mermaid/pull/4015
- @AielloChan made their first contribution in https://github.com/mermaid-js/mermaid/pull/4101
- @fkohrt made their first contribution in https://github.com/mermaid-js/mermaid/pull/4118
Full Changelog: https://github.com/mermaid-js/mermaid/compare/v9.4.0...v10.0.0