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(mermaid): fix Mermaid integration for v9.2 release #8282

Merged
merged 2 commits into from
Nov 10, 2022

Conversation

slorber
Copy link
Collaborator

@slorber slorber commented Nov 2, 2022

Upgrading for 9.1.7 to 9.2 makes the Mermaid theme compilation fails

Unfortunately users are upgraded automatically due to using the semver range ^9.1, and it also fails at runtime for these users that should force v9.1.7 (last version that works)

See:

Current PR is a draft, still unsolved 😅


Probably unrelated to the issue (according to my local tests) but the theme/client Mermaid apis were not compiled with the correct TS options (ie outputs CJS instead of ESM), so I'm also fixing that here.

@slorber slorber added pr: bug fix This PR fixes a bug in a past release. to backport This PR is planned to be backported to a stable version of Docusaurus labels Nov 2, 2022
@facebook-github-bot facebook-github-bot added the CLA Signed Signed Facebook CLA label Nov 2, 2022
@Stef-33560
Copy link

Hi,

A temporary workaround : using Yarn, adding resolutions in package.json makes it work :

, "resolutions": { "mermaid": "9.1.7" },

Thanks @Josh-Cena and @homotechsual on #help-and-questions ;)

@slorber slorber marked this pull request as ready for review November 10, 2022 14:21
@netlify
Copy link

netlify bot commented Nov 10, 2022

[V2]

Name Link
🔨 Latest commit ba777d8
🔍 Latest deploy log https://app.netlify.com/sites/docusaurus-2/deploys/636d07ea7e68f20010a46afd
😎 Deploy Preview https://deploy-preview-8282--docusaurus-2.netlify.app
📱 Preview on mobile
Toggle QR Code...

QR Code

Use your smartphone camera to open QR code link.

To edit notification comments on pull requests, go to your Netlify site settings.

@github-actions
Copy link

⚡️ Lighthouse report for the deploy preview of this PR

URL Performance Accessibility Best Practices SEO PWA Report
/ 🟠 77 🟢 97 🟢 100 🟢 100 🟢 90 Report
/docs/installation 🟠 76 🟢 100 🟢 100 🟢 100 🟢 90 Report

@slorber
Copy link
Collaborator Author

slorber commented Nov 10, 2022

The issue has been fixed in Mermaid 9.2.2 and everything seems to work fine again now

Had to change a bit the types to make it work again because new official types are not exactly the same as the DefinitivelyTyped ones

@slorber slorber changed the title fix(mermaid): try to fix Mermaid integration after 9.2 release fix(mermaid): fix Mermaid integration for v9.2 release Nov 10, 2022
@github-actions
Copy link

Size Change: +12.9 kB (+1%)

Total Size: 885 kB

Filename Size Change
website/.docusaurus/globalData.json 70.2 kB +3.19 kB (+5%) 🔍
website/build/assets/js/main.********.js 662 kB +9.71 kB (+1%)
ℹ️ View Unchanged
Filename Size Change
website/build/assets/css/styles.********.css 112 kB 0 B
website/build/index.html 40.9 kB +16 B (0%)

compressed-size-action

@slorber slorber merged commit 1d5afba into main Nov 10, 2022
@slorber slorber deleted the slorber/fix-mermaid-9.2 branch November 10, 2022 15:07
@slorber slorber added backported This PR has been backported to a stable version of Docusaurus and removed to backport This PR is planned to be backported to a stable version of Docusaurus labels Jan 27, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
backported This PR has been backported to a stable version of Docusaurus CLA Signed Signed Facebook CLA pr: bug fix This PR fixes a bug in a past release.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Mermaid 9.2 falls over in Docusaurus 2.2
3 participants