-
-
Notifications
You must be signed in to change notification settings - Fork 6.8k
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: patch lodash to not use Function
calls
#5408
base: develop
Are you sure you want to change the base?
Conversation
✅ Deploy Preview for mermaid-js ready!
To edit notification comments on pull requests, go to your Netlify site configuration. |
Codecov ReportAll modified and coverable lines are covered by tests ✅
Additional details and impacted files@@ Coverage Diff @@
## develop #5408 +/- ##
=======================================
Coverage 5.72% 5.72%
=======================================
Files 277 277
Lines 41896 41896
Branches 27 27
=======================================
Hits 2400 2400
Misses 39495 39495
Partials 1 1
Flags with carried forward coverage won't be shown. Click here to find out more. |
@Yash-Singh1 sure, can you point me to the |
Sure, here is a link to the LMK if you need anything else to get it working. |
It works in Firefox. Is this PR on top of v10.9.0? Because it works in Chrome too, meaning the other issue reported here #5383 about the character encoding seems to be resolved too. |
Yes, this PR is on top of v10.9.0.
Interesting, there must have been a commit between now and the 10.9.0 release that removed the latin characters issue then. |
Nice work @Yash-Singh1! |
Yeah, I think that would make sense. |
📑 Summary
Patch
lodash-es
andcytoscape
(has lodash bundled in it) to avoid usingFunction
calls.Resolves #5378
📏 Design Decisions
I patched
lodash-es
to use a globalThis polyfill and forcytoscape
I just usedwindow
becausecytoscape
only runs in browser afaik.This won't fix CSP violations when running Mermaid.js without the bundles (directly importing the ESM
mermaid.core.mjs
), but it would patch theFunction
calls in the bundles.📋 Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch