Update dependency mermaid to v10 - autoclosed
This MR contains the following updates:
Package | Change | Age | Adoption | Passing | Confidence |
---|---|---|---|---|---|
mermaid | 9.3.0 -> 10.0.2 |
Release Notes
mermaid-js/mermaid
v10.0.2
: 10.0.2
Release Notes
Bugfixes
- fix: dayjs import extension @sidharthv96
v10.0.1
: 10.0.1
Release Notes
Features
- Added grammar to skip comment in attribute block (#4128) @kshitijsaksena
- feat: Add support for classDiagram labels (#4086) @sidharthv96
-
💄 section width now covers all tasks (#4074) @l2fprod -
💄 section width now covers all tasks - Timeline (#4126) @sidharthv96
Bugfixes
- Fix(#4140): Async bug in mermaid.run (#4142) @sidharthv96
- fix #4157: Inject only fontFamily without replacing themeVariables (#4160) @sidharthv96
- fix: Detector order (#4124) @sidharthv96
- fix: fix exports (#4135) @Mister-Hope
- fix #4157: Inject only fontFamily without replacing themeVariables by @sidharthv96
- Elk layout for flowcharts: Incorrect placement of edges when using diamonds in subgraphs by @knsv
Documentation
- Adding app (Deepdwn) to integrations list (#4127) @Billiam
- Doc (typo): remove duplicate "be" (#4133) @Julez404
- docs(flowchart): duplicated hexagon node example by @Oliboy50
- add links to NiceGUI integration by @rodja
- Adding app (Deepdwn) to integrations list by @Billiam
Chores
- chore: dagre-d3-es@7.0.9 (#4147) @sidharthv96
- Replace
moment-mini
/moment
date library withdayjs
(#4153) @aloisklink
New Contributors
- @Oliboy50 made their first contribution in https://github.com/mermaid-js/mermaid/pull/4105
- @rodja made their first contribution in https://github.com/mermaid-js/mermaid/pull/4107
- @Julez404 made their first contribution in https://github.com/mermaid-js/mermaid/pull/4133
- @l2fprod made their first contribution in https://github.com/mermaid-js/mermaid/pull/4074
- @kshitijsaksena made their first contribution in https://github.com/mermaid-js/mermaid/pull/4128
Full Changelog: https://github.com/mermaid-js/mermaid/compare/v10.0.0...v10.0.1
v10.0.0
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>
mermaid.render is async and doesn't accept callbacks
// < v10
mermaid.render('id', 'graph TD;\nA-->B', (svg, bindFunctions) => {
element.innerHTML = svg;
if (bindFunctions) {
bindFunctions(element);
}
});
// Shorter syntax
if (bindFunctions) {
bindFunctions(element);
}
// can be replaced with the `?.` shorthand
bindFunctions?.(element);
// >= v10 with async/await
const { svg, bindFunctions } = await mermaid.render('id', 'graph TD;\nA-->B');
element.innerHTML = svg;
bindFunctions?.(element);
// >= v10 with promise.then
mermaid.render('id', 'graph TD;A-->B').then(({ svg, bindFunctions }) => {
element.innerHTML = svg;
bindFunctions?.(element);
});
mermaid.parse is async and ParseError is removed
// < v10
mermaid.parse(text, parseError);
//>= v10
await mermaid.parse(text).catch(parseError);
// or
try {
await mermaid.parse(text);
} catch (err) {
parseError(err);
}
Init deprecated and InitThrowsErrors removed
The config passed to init
was not being used eariler.
It will now be used.
The init
function is deprecated and will be removed in the next major release.
init currently works as a wrapper to initialize
and run
.
// < v10
mermaid.init(config, selector, cb);
//>= v10
mermaid.initialize(config);
mermaid.run({
querySelector: selector,
postRenderCallback: cb,
suppressErrors: true,
});
// < v10
mermaid.initThrowsErrors(config, selector, cb);
//>= v10
mermaid.initialize(config);
mermaid.run({
querySelector: selector,
postRenderCallback: cb,
suppressErrors: false,
});
// TODO: Populate changelog pre v10
- Config has a lot of changes
- globalReset resets to
defaultConfig
instead of current config. Usereset
instead.
v9.4.0
What's Changed
Features
- Timeline Diagram by @ashishjain0512 in https://github.com/mermaid-js/mermaid/pull/4014
- feat: Flowchart layout using elkjs by @knsv in https://github.com/mermaid-js/mermaid/pull/3984
- Layout v3 continued by @knsv in https://github.com/mermaid-js/mermaid/pull/3938
- feat(er): add unique key by @tomperr in https://github.com/mermaid-js/mermaid/pull/3917
- feat: Set svg role to 'graphics-document document' by @weedySeaDragon in https://github.com/mermaid-js/mermaid/pull/3897
- feat: Wait for rendering to finish before taking image snapshots by @sidharthv96 in https://github.com/mermaid-js/mermaid/pull/3995
- feat(er): add multiple key constraints by @tomperr in https://github.com/mermaid-js/mermaid/pull/4030
- Add support for YAML frontmatter in Markdown docs (used for Vitepress config) by @aloisklink in https://github.com/mermaid-js/mermaid/pull/3962
- feat(er): allow leading underscore for attributes name by @tomperr in https://github.com/mermaid-js/mermaid/pull/4033
- Add links to theme listing by @BD103 in https://github.com/mermaid-js/mermaid/pull/3890
- Adding support for parenthesis in the er diagram attribute types. by @mahomedalid in https://github.com/mermaid-js/mermaid/pull/3892
- Support parsing indented mermaid/YAML only from HTML by @aloisklink in https://github.com/mermaid-js/mermaid/pull/3859
- Parse style string and number font size values from configuration inputs by @jonabc in https://github.com/mermaid-js/mermaid/pull/3993
- Mindmaps: differentiate the colors between the root node and the first section #4017 by @knsv in https://github.com/mermaid-js/mermaid/pull/4018
- Add Box support in Sequence Diagrams by @oleveau in https://github.com/mermaid-js/mermaid/pull/3965
Breaking changes
- Mind map and timeline diagrams are lazy loaded by mermaid. In order to use these diagrams you need to use the renderAsync method of rendering. The @mermaid-js/mermaid-mindmap package is deprecated by this.
Documentation
- doc: remove links from atom.io; add note Atom has been archived by @weedySeaDragon in https://github.com/mermaid-js/mermaid/pull/3899
- docs(README.zh-CN): fix book image src by @aloisklink in https://github.com/mermaid-js/mermaid/pull/3920
- docs: fix typo by @Foo-x in https://github.com/mermaid-js/mermaid/pull/3925
- docs: update navbar by @huynhicode in https://github.com/mermaid-js/mermaid/pull/3906
- docs: fix text overflow by @huynhicode in https://github.com/mermaid-js/mermaid/pull/3907
- docs: Remove duplicate example in ER-diagram documentation by @guilhermgonzaga in https://github.com/mermaid-js/mermaid/pull/3964
- Docs: Too many
primaryBorderColor
field by @LiHowe in https://github.com/mermaid-js/mermaid/pull/3986 - docs(sequenceDiagram): subvert prettification of arrow types by @cakemanny in https://github.com/mermaid-js/mermaid/pull/3988
- Add Swimm to the list of integrations by @Omerr in https://github.com/mermaid-js/mermaid/pull/3936
- Website/homepage updates by @huynhicode in https://github.com/mermaid-js/mermaid/pull/3945
- Update sequenceDiagram.md to include line break by @Odogwudozilla in https://github.com/mermaid-js/mermaid/pull/3960
- Support GitHub Flavored Markdown in markdown documentation by @aloisklink in https://github.com/mermaid-js/mermaid/pull/3954
- Update integrations.md by @Barry1 in https://github.com/mermaid-js/mermaid/pull/4011
- docs(readme): update broken twitter badge by @LeoDog896 in https://github.com/mermaid-js/mermaid/pull/4032
- Update mindmap.md by @GavinPen in https://github.com/mermaid-js/mermaid/pull/4042
- Showcase section to the docs - keepings docs up to date by @Omerr in https://github.com/mermaid-js/mermaid/pull/4055
Bug Fixes
- fix(docs): remove duplicate section by @Joxtacy in https://github.com/mermaid-js/mermaid/pull/3908
- fix: Typescript error in usage by @tommoor in https://github.com/mermaid-js/mermaid/pull/3914
- fix: dev server watch mode by @huynhicode in https://github.com/mermaid-js/mermaid/pull/3904
- fix(er): switch to deterministic UUIDs in ER by @aloisklink in https://github.com/mermaid-js/mermaid/pull/3916
- fixed Composition arrow by @Frank-Mayer in https://github.com/mermaid-js/mermaid/pull/3930
- fix(generic): fix generic type detection by @tomperr in https://github.com/mermaid-js/mermaid/pull/3921
- fix typos accessing techn property in drawC4Shape function by @nekikara in https://github.com/mermaid-js/mermaid/pull/3943
- fix(deps): update dependency dompurify to v2.4.3 by @renovate in https://github.com/mermaid-js/mermaid/pull/3977
- Fix nonstandard syntax by @atmikeguo in https://github.com/mermaid-js/mermaid/pull/3972
- Fix failing tests due to semantic merge conflict by @aloisklink in https://github.com/mermaid-js/mermaid/pull/3985
- fix(deps): update dependency dagre-d3-es to v7.0.6 by @renovate in https://github.com/mermaid-js/mermaid/pull/3996
- fix(#4003): Remove unhandled promises by @sidharthv96 in https://github.com/mermaid-js/mermaid/pull/4004
- Bug/3858 [state] trailing whitespace in ids for named state container by @weedySeaDragon in https://github.com/mermaid-js/mermaid/pull/3902
- fix: moment-mini default exporter by @emersonbottero in https://github.com/mermaid-js/mermaid/pull/4034
- fix(deps): update dependency dagre-d3-es to v7.0.8 by @renovate in https://github.com/mermaid-js/mermaid/pull/4058
- bugfix: add missing d3 curves to flowchart and docs by @natasha-jarus in https://github.com/mermaid-js/mermaid/pull/4038
- Bug/3865 C4Context: $borderColor has no effect by @nekikara in https://github.com/mermaid-js/mermaid/pull/3947
- Mindmaps: Handling rows with only spaces in them (#4012) by @knsv in https://github.com/mermaid-js/mermaid/pull/4013
Chores
- ci: disable checking twitter links by @aloisklink in https://github.com/mermaid-js/mermaid/pull/3973
- chore(deps): update all non-major dependencies (minor) by @renovate in https://github.com/mermaid-js/mermaid/pull/3905
- chore(deps): update pnpm to v7.18.2 by @renovate in https://github.com/mermaid-js/mermaid/pull/3929
- chore(pr): add documentation task in MR template by @tomperr in https://github.com/mermaid-js/mermaid/pull/3935
- (chore) Docs: add tag to produce only a diagram, not code example by @weedySeaDragon in https://github.com/mermaid-js/mermaid/pull/3946
- chore(deps): update all non-major dependencies (minor) by @renovate in https://github.com/mermaid-js/mermaid/pull/3944
- chore(deps): update all non-major dependencies (minor) by @renovate in https://github.com/mermaid-js/mermaid/pull/3997
- chore(deps): update pnpm to v7.25.1 by @renovate in https://github.com/mermaid-js/mermaid/pull/4024
- build(lint): cache prettier on
pnpm run lint
by @aloisklink in https://github.com/mermaid-js/mermaid/pull/4035 - Cache
eslint
in pre-commit script (makesgit commit
5x faster) by @aloisklink in https://github.com/mermaid-js/mermaid/pull/4057
New Contributors
- @Joxtacy made their first contribution in https://github.com/mermaid-js/mermaid/pull/3908
- @BD103 made their first contribution in https://github.com/mermaid-js/mermaid/pull/3890
- @mahomedalid made their first contribution in https://github.com/mermaid-js/mermaid/pull/3892
- @tomperr made their first contribution in https://github.com/mermaid-js/mermaid/pull/3917
- @Foo-x made their first contribution in https://github.com/mermaid-js/mermaid/pull/3925
- @Frank-Mayer made their first contribution in https://github.com/mermaid-js/mermaid/pull/3930
- @Omerr made their first contribution in https://github.com/mermaid-js/mermaid/pull/3936
- @nekikara made their first contribution in https://github.com/mermaid-js/mermaid/pull/3943
- @guilhermgonzaga made their first contribution in https://github.com/mermaid-js/mermaid/pull/3964
- @Odogwudozilla made their first contribution in https://github.com/mermaid-js/mermaid/pull/3960
- @atmikeguo made their first contribution in https://github.com/mermaid-js/mermaid/pull/3972
- @LiHowe made their first contribution in https://github.com/mermaid-js/mermaid/pull/3986
- @cakemanny made their first contribution in https://github.com/mermaid-js/mermaid/pull/3988
- @jonabc made their first contribution in https://github.com/mermaid-js/mermaid/pull/3993
- @MermaidChart made their first contribution in https://github.com/mermaid-js/mermaid/pull/4013
- @Barry1 made their first contribution in https://github.com/mermaid-js/mermaid/pull/4011
- @LeoDog896 made their first contribution in https://github.com/mermaid-js/mermaid/pull/4032
- @GavinPen made their first contribution in https://github.com/mermaid-js/mermaid/pull/4042
- @oleveau made their first contribution in https://github.com/mermaid-js/mermaid/pull/3965
- @natasha-jarus made their first contribution in https://github.com/mermaid-js/mermaid/pull/4038
Full Changelog: https://github.com/mermaid-js/mermaid/compare/v9.3.0...v9.4.0
Configuration
-
If you want to rebase/retry this MR, check this box
This MR has been generated by Renovate Bot.