Closed Yash-Singh1 closed 1 month ago
Name | Link |
---|---|
Latest commit | 00eaebeac8a960ebb640c4a5e35929dc3e078fe4 |
Latest deploy log | https://app.netlify.com/sites/mermaid-js/deploys/6644119193947100088ea8b7 |
Deploy Preview | https://deploy-preview-5468--mermaid-js.netlify.app |
Preview on mobile | Toggle QR Code...Use your smartphone camera to open QR code link. |
To edit notification comments on pull requests, go to your Netlify site configuration.
Attention: Patch coverage is 0.50251%
with 396 lines
in your changes are missing coverage. Please review.
Project coverage is 5.73%. Comparing base (
0326d89
) to head (00eaebe
).
@Yash-Singh1 were you able to fix the tests? Keeping this PR open for long will create more conflicts for you.
Hi @sidharthv96, sorry for the late reply, I was busy with exams. I just fixed the e2e tests.
No worries @Yash-Singh1! Hope they went well :) Let's wait for a review from someone else as well, as the size is big.
Merging this now, as both the review comments are non blockers, and can be done in a follow up PR.
@Yash-Singh1, Thank you for the contribution! You are now eligible for a year of Premium account on MermaidChart. Sign up with your GitHub account to activate.
:bookmark_tabs: Summary
Switches from objects to
Map
s in places where the keys accepted are user inputs.Resolves #5451
:straight_ruler: Design Decisions
Describe the way your implementation works or what design decisions you made if applicable.
This is a breaking change for v11 since it changes the structure of the databases and as such can break code that relies on the db, e.g.
https://github.com/excalidraw/mermaid-to-excalidraw/blob/d0b00dc63eeabd5e92ca3997650f47bf4901cb2c/src/parser/flowchart.ts#L226
Why?
The main reason for this change was so that we wouldn't have to validate for
constructor
and__proto__
(#5451) everytime we have to modify or get a property on the database objects. Another good reason would be that objects in JavaScript are generally designed to work like dynamic structs, where the JIT compiler would store the shape of the object and rereference that shape everytime that object is passed around. However, when we have a "map" with user-generated keys,Map
s work better because they are designed for that purpose.:clipboard: Tasks
Make sure you
MERMAID_RELEASE_VERSION
is used for all new features.develop
branch