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

Add a manifest warning when no icon is found and when icon is not 1:1 #2185

Merged
merged 20 commits into from
Feb 16, 2024

Conversation

FrederikBolding
Copy link
Member

@FrederikBolding FrederikBolding commented Feb 15, 2024

Adds a manifest warning when no icon is found and when the icon is not 1:1. Adding new utility functions for parsing SVGs and getting the dimensions of a parsed SVG.

This PR also replaces is-svg with our own SVG parsing using the same underlying library that is-svg was using before. We now exclusively rely on fast-xml-parser.

This PR also slightly changes the Webpack plugin to make the warning output less verbose.

Closes #1736

Copy link

socket-security bot commented Feb 15, 2024

New and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/[email protected] None +1 130 kB amitgupta

🚮 Removed packages: npm/[email protected]

View full report↗︎

@FrederikBolding FrederikBolding changed the title Add a manifest warning when no icon is found Add a manifest warning when no icon is found and when icon is not 1:1 Feb 15, 2024
@FrederikBolding FrederikBolding force-pushed the fb/add-warning-when-icon-not-specified branch from 22f1822 to 8da1716 Compare February 15, 2024 13:04
@FrederikBolding
Copy link
Member Author

@metamaskbot update-pr

@FrederikBolding FrederikBolding force-pushed the fb/add-warning-when-icon-not-specified branch from 43667aa to 71fee67 Compare February 15, 2024 15:35
@FrederikBolding
Copy link
Member Author

@metamaskbot update-pr

@FrederikBolding FrederikBolding marked this pull request as ready for review February 16, 2024 10:47
@FrederikBolding FrederikBolding requested a review from a team as a code owner February 16, 2024 10:47
@FrederikBolding FrederikBolding force-pushed the fb/add-warning-when-icon-not-specified branch from a99e9e5 to 5dea6e5 Compare February 16, 2024 11:06
@FrederikBolding
Copy link
Member Author

@metamaskbot update-pr

packages/snaps-utils/src/icon.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/icon.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/icon.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/icon.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/manifest/manifest.ts Outdated Show resolved Hide resolved
packages/snaps-utils/src/manifest/manifest.ts Outdated Show resolved Hide resolved
@FrederikBolding FrederikBolding force-pushed the fb/add-warning-when-icon-not-specified branch from 1534114 to d1bd116 Compare February 16, 2024 12:06
@FrederikBolding
Copy link
Member Author

@metamaskbot update-pr

Mrtenz
Mrtenz previously approved these changes Feb 16, 2024
Copy link

codecov bot commented Feb 16, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Comparison is base (a7b2fe6) 96.55% compared to head (f11eec6) 96.57%.
Report is 1 commits behind head on main.

Additional details and impacted files
@@            Coverage Diff             @@
##             main    #2185      +/-   ##
==========================================
+ Coverage   96.55%   96.57%   +0.01%     
==========================================
  Files         331      332       +1     
  Lines        7482     7525      +43     
  Branches     1152     1161       +9     
==========================================
+ Hits         7224     7267      +43     
  Misses        258      258              

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

@FrederikBolding FrederikBolding merged commit a783ef6 into main Feb 16, 2024
149 checks passed
@FrederikBolding FrederikBolding deleted the fb/add-warning-when-icon-not-specified branch February 16, 2024 12:27
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.

Snaps CLI should warn if the icon file is not 1:1 square
3 participants