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

chore!: Simplify SVG validation #2475

Merged
merged 5 commits into from
Jun 12, 2024
Merged

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Jun 11, 2024

Simplifies SVG validation as we don't need to be as strict as we currently are. This PR moves usage of fast-xml-parser to snaps-utils, making Snap bundles smaller and replaces the svg validation struct with a simpler version that doesn't fully parse the SVG.

This PR also changes the Image struct to use the svg struct to validate its input.

Breaking: This removes exported SVG utilities from snaps-sdk

@FrederikBolding FrederikBolding requested a review from a team as a code owner June 11, 2024 14:01
@FrederikBolding FrederikBolding changed the title chore: Simplify SVG validation chore!: Simplify SVG validation Jun 11, 2024
@FrederikBolding
Copy link
Member Author

@metamaskbot update-pr

Copy link

codecov bot commented Jun 11, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 94.34%. Comparing base (e717139) to head (afc7e0d).

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #2475   +/-   ##
=======================================
  Coverage   94.34%   94.34%           
=======================================
  Files         438      439    +1     
  Lines        9054     9055    +1     
  Branches     1392     1392           
=======================================
+ Hits         8542     8543    +1     
  Misses        512      512           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@FrederikBolding FrederikBolding merged commit 0987842 into main Jun 12, 2024
153 checks passed
@FrederikBolding FrederikBolding deleted the fb/simplify-svg-validation branch June 12, 2024 08:53
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