Skip to content

Conversation

@dwelle
Copy link
Member

@dwelle dwelle commented Feb 12, 2025

structuredClone is not universally supported yet.

While stringifying and parsing JSON as a polyfill isn't quite correct, in the context we're using it for it suffices (until it won't and all hell will break lose, alas).

fix https://excalidraw.sentry.io/issues/6291795739/events/b61abd6a973244b9909afbe62dfdc6e0/

@vercel
Copy link

vercel bot commented Feb 12, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Updated (UTC)
excalidraw ✅ Ready (Inspect) Visit Preview Feb 12, 2025 0:00am
excalidraw-package-example ✅ Ready (Inspect) Visit Preview Feb 12, 2025 0:00am
excalidraw-package-example-with-nextjs ✅ Ready (Inspect) Visit Preview Feb 12, 2025 0:00am
1 Skipped Deployment
Name Status Preview Updated (UTC)
docs ⬜️ Ignored (Inspect) Visit Preview Feb 12, 2025 0:00am

@github-actions
Copy link

github-actions bot commented Feb 12, 2025

Coverage Report

Status Category Percentage Covered / Total
🟢 Lines 66.89% (🎯 60%) 68801 / 102843
🟢 Statements 66.89% (🎯 60%) 68801 / 102843
🟢 Functions 63.72% (🎯 63%) 1964 / 3082
🟢 Branches 79.78% (🎯 70%) 8316 / 10423
File Coverage
File Stmts Branches Functions Lines Uncovered Lines
Changed Files
packages/excalidraw/element/elbowArrow.ts 70.23% 84.93% 93.33% 70.23% 130-162, 178-216, 226-245, 272-440, 464, 466-467, 493, 495-512, 519, 521-538, 569, 574, 593-602, 608-617, 621-643, 647-666, 687-864, 995, 997-998, 1027-1028, 1043-1046, 1048-1069, 1182, 1221, 1229-1233, 1240, 1245-1249, 1335-1336, 1339-1340, 1367-1369, 1417-1419, 1466, 1470-1471, 1506-1508, 1543-1544, 1619-1638, 1655-1659, 1671-1675, 1801-1802, 1843-1844, 1856-1857, 1887-1888, 1900-1901, 2027-2029
packages/excalidraw/element/types.ts 0% 0% 0% 0% 1-412
Generated in workflow #4298 for commit 20ea2a9 by the Vitest Coverage Report Action

@dwelle dwelle requested a review from mtolmacs February 12, 2025 10:27
@dwelle dwelle force-pushed the dwelle/fix-structuredClone branch from edd9b7e to 20ea2a9 Compare February 12, 2025 11:57
@dwelle dwelle changed the title fix: use cloneJSON instead of structuredClone directly fix: stop using structuredClone Feb 12, 2025
@dwelle dwelle changed the title fix: stop using structuredClone fix: stop using structuredClone Feb 12, 2025
@dwelle dwelle merged commit 26f02be into master Feb 12, 2025
11 of 14 checks passed
@dwelle dwelle deleted the dwelle/fix-structuredClone branch February 12, 2025 12:02
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