Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix(deps): update dependency mermaid to v10 #329

Merged
merged 1 commit into from
Feb 21, 2023
Merged

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Feb 21, 2023

Mend Renovate

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
mermaid ^9.1.7 -> ^10.0.0 age adoption passing confidence

Release Notes

mermaid-js/mermaid

v10.0.0

Compare Source

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. Use reset instead.

v9.4.0

Compare Source

What's Changed

Features
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
Bug Fixes
Chores

New Contributors

Full Changelog: mermaid-js/mermaid@v9.3.0...v9.4.0

v9.3.0

Compare Source

Significant Changes

  • 25% Smaller
  • New docs
  • Replaces the deprecated and vulnerable dagre-d3 with dagre-es

Release Notes

🎉 Thanks to all contributors helping with this release! 🎉

What's Changed

New Contributors

Full Changelog: mermaid-js/mermaid@v9.2.2...v9.3.0

v9.2.2: 9.2.2

Compare Source

What's Changed

Full Changelog: mermaid-js/mermaid@v9.2.1...v9.2.2

v9.2.1: 9.2.1

Compare Source

What's Changed

New Contributors

Full Changelog: mermaid-js/mermaid@v9.2.0...v9.2.1

v9.2.0: 9.2.0

Compare Source

What's Changed

Features
Fixes

Configuration

📅 Schedule: Branch creation - "after 10pm every weekday,before 5am every weekday,every weekend" in timezone America/Los_Angeles, Automerge - At any time (no schedule defined).

🚦 Automerge: Enabled.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR has been generated by Mend Renovate. View repository job log here.

@renovate renovate bot force-pushed the renovate/mermaid-10.x branch from ab2d8b7 to 1d4b34c Compare February 21, 2023 17:15
@renovate renovate bot changed the title Update dependency mermaid to v10 fix(deps): update dependency mermaid to v10 Feb 21, 2023
@renovate renovate bot merged commit a7160fd into main Feb 21, 2023
@renovate renovate bot deleted the renovate/mermaid-10.x branch February 21, 2023 21:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants