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

Update Mermaid to 10.2.1 and fix mermaid.init() call #96

Closed

Conversation

martinschilliger
Copy link

This PR addresses or contains:

  • Fixed loading with Mermaid 9.3.0
  • Inserted random function instead of relying on Date().getTime()
  • removed unused config reading

This PR includes:

  • Tests (unit/integration)
  • CI build passed

Overtakes #94

Martin Schilliger added 2 commits January 15, 2023 00:07
* Inserted random function instead of relying on Date().getTime()
* removed unused config reading
@coderjoe coderjoe mentioned this pull request Jan 19, 2023
@gesinn-it-gea
Copy link
Member

for reference: mermaid-js RELEASE NOTES for 9.0.0 https://github.com/mermaid-js/mermaid/releases/tag/9.0.0

Copy link
Author

@martinschilliger martinschilliger left a comment

Choose a reason for hiding this comment

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

Update to 10.2.1

@martinschilliger martinschilliger changed the title Update Mermaid to 9.3.0 and fix mermaid.init() call Update Mermaid to 10.2.1 and fix mermaid.init() call Jun 2, 2023
@antibarbie
Copy link

antibarbie commented Jun 21, 2023

Hello, I tested your branch against mediawiki 1.35 ; and ... with 10.2.1 (also with others 10.x) firefox chokes on "SyntaxError: function statement requires a name" ; couldn't spot the exact problem on minified javascript, but the 10.x.x versions all seems to have the same symptoms. (and btw Chrome also shows the same error).

When editing your package.json to go back to mermaid 9.4.3 it runs fine.

Is there a requirement somewhere on yarn version (1.22.5) or other system tool maybe ?

sneakers-the-rat added a commit to sneakers-the-rat/SMW-Mermaid that referenced this pull request Jan 10, 2024
@sneakers-the-rat sneakers-the-rat mentioned this pull request Jan 10, 2024
2 tasks
@sneakers-the-rat
Copy link

@antibarbie the problem you're getting is probably from how the mediawiki resourceloader minifies everything, including already-minified vendored packages like this one. There is an install script that adds a /*@nomin*/ tag to the top of the file when you install it via composer, but that wouldn't get triggered if you just cloned it from git. added it manually in #102 , which works from a clone.

@martinschilliger
Copy link
Author

TBH right now I don't understand, if I could or should do anything else. Is there something needed from my side?

@martinschilliger
Copy link
Author

Ah, already surpassed: #102
Closing this one.

sneakers-the-rat added a commit to sneakers-the-rat/SMW-Mermaid that referenced this pull request Jul 29, 2024
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.

4 participants