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

Bump Mermaid version to 10.0.0 #177

Closed
wants to merge 1 commit into from
Closed

Conversation

shtratos
Copy link
Contributor

Mermaid version 10.0.0 is the latest, but it has some breaking API changes.

I had to change the mermaid.render call as it no longer accepts a callback.
see https://github.com/mermaid-js/mermaid/blob/master/CHANGELOG.md#1000

N.B. I tested the rendering and it works for correct graph, but it does not render parsing errors.
I'm very new to node.js, so not sure if my changes are correct.
Any pointers on how to fix this would be appreciated.

Also:

  • I've bumped the version of css-loader to resolve the major version conflict with webpack.
  • I've added npm-run-all as a dev dependency to make vscode:prepublish task run on Windows correctly. (Powershell does not recognize ; as a command delimiter )

Copy link
Owner

@mjbvz mjbvz left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes we do need the parse errors so I can't merge this as is. Maybe someone else can help out with this?

Also can you please not include the package-lock change? I'll update this myself once the PR is merged

@shtratos
Copy link
Contributor Author

I've been seeing this issue in the logs, let's see if the fix helps
mermaid-js/mermaid#4140

@@ -20,7 +20,7 @@ export function renderMermaidBlocksInElement(root: HTMLElement) {
renderMermaidElement(mermaidContainer);

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You'll have to add an await here.

@shtratos
Copy link
Contributor Author

shtratos commented Mar 6, 2023

Closing in favour of #184

@shtratos shtratos closed this Mar 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants