Flight Icons pipeline / Fix svgo package (Part 1 / Code)#3720
Open
Flight Icons pipeline / Fix svgo package (Part 1 / Code)#3720
svgo package (Part 1 / Code)#3720Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
didoo
commented
Mar 18, 2026
| // touches the borders of the bounding box. The solution is to uncheck the "Clip content" flag in the Figma UI for that element. | ||
| // See: https://forum.figma.com/t/setting-an-explicit-svg-viewbox/2504/7 | ||
| const svgo = new SVGO({ | ||
| const svgoConfig = { |
Contributor
Author
There was a problem hiding this comment.
Note: in SVGO v4:
sortAttrsis part ofpreset-defaultviewBoxis preserved by default, so theremoveViewBoxoverride is now obsolete
2 tasks
…son` file of the `flight-icons` package before it was fixed in the pnpm overrides to `3.3.3` (see PR #3718)
Co-authored-by: didoo <686239+didoo@users.noreply.github.com> Co-authored-by: Cristiano Rastelli <public@didoo.net>
aabdf2a to
5432563
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📌 Summary
This is a follow up of #3718 where, after merging the PR in
main, we have realized that the major upgrade of thesvgopackage caused issues.In the previous code we had this comment:
And the package version was pinned to version
1.3.2in thepackage.jsonfile.In #3718 the version was overwritten using the pnpm overrides, but it was a major bump (to
3.3.3) and this broke theoptimizeAssetsSVGscript because SVGO changed its APIs.This PR intends to fix the problem, by upgrading SVGO to the latest version (
4.0.1). To avoid too much noise in it, the re-generation of the files/assets will be done in a separate PR (using the "Sync & Build Icons" GitHub Action, so we test that that one works as well).🛠️ Detailed description
In this PR I have:
SVGOdependency to4.0.1directly in the mainpackage.jsonfile of theflight-iconspackage (and removed the override introduced in Apply a set of overrides to address flagged secvuln #3718)@figma-export/transform-svg-with-svgoto its latest, to reduce the risk of possible conflictsoptimizeAssetsSVGscript (partially using Copilot)📸 Screenshots
Before:

After:

👀 Component checklist
💬 Please consider using conventional comments when reviewing this PR.
📋 PCI review checklist
Examples of changes to controls include access controls, encryption, logging, etc.
Examples include changes to operating systems, ports, protocols, services, cryptography-related components, PII processing code, etc.