Skip to content

fix: upgrade svgo to latest version and make sure the comman uses recursive flag to traverse all files #3089

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

rahultyagidev
Copy link

Overview

We noticed that svgo was on a very old version and did not support the recursive(-r) flag and hence doing yarn run format was not doing anything. This PR updates the svgo version to the latest and removes the yml config in favor of the new config format.

PR Checklist

  • Related to designs:
  • Related to JIRA ticket: COPS-183
  • I have run this code to verify it works
  • This PR includes unit tests for the code change
  • This PR includes testing instructions tests for the code change
  • The alpha package of this PR is passing end-to-end tests in all relevant Codecademy repositories

Testing Instructions

We need to test the svgs are functioning correctly after this update

PR Links and Envs

Repository PR Link PR Env
Portal Portal Link Portal Env

@rahultyagidev rahultyagidev requested a review from a team as a code owner May 23, 2025 09:52
@CLAassistant
Copy link

CLAassistant commented May 23, 2025

CLA assistant check
All committers have signed the CLA.

Copy link

nx-cloud bot commented May 23, 2025

View your CI Pipeline Execution ↗ for commit 28a9f05.


☁️ Nx Cloud last updated this comment at 2025-05-30 08:43:05 UTC

@rahultyagidev rahultyagidev marked this pull request as draft May 23, 2025 09:58
@rahultyagidev rahultyagidev requested a review from jrood May 23, 2025 10:16
@rahultyagidev rahultyagidev marked this pull request as ready for review May 23, 2025 10:16
@codecademydev
Copy link
Collaborator

📬Published Alpha Packages:

@codecademy/[email protected]
@codecademy/[email protected]
@codecademy/[email protected]

@codecademydev
Copy link
Collaborator

🚀 Styleguide deploy preview ready!

https://68304baed22b8031a58cb68d--gamut-preview.netlify.app

Deploy Logs

@jrood jrood requested a review from dreamwasp May 23, 2025 11:19
Copy link
Contributor

@jrood jrood left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🚀

@@ -1,6 +1,6 @@
# EditorConfig is awesome: http://EditorConfig.org

root = true;
root = true
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Just to check — Is this intentional? Did a formatting script do this?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes this is intentional this was breaking for Neovim, lt looks like ; is not allowed on line ends

yarn.lock Outdated
@@ -13821,7 +13821,7 @@ svg-parser@^2.0.2, svg-parser@^2.0.4:
resolved "https://registry.npmjs.org/svg-parser/-/svg-parser-2.0.4.tgz#fdc2e29e13951736140b76cb122c8ee6630eb6b5"
integrity sha512-e4hG1hRwoOdRb37cIMSgzNsxyzKfayW6VOflrwvR+/bzrkyxY/31WkbgnQpgtrNp1SdpJvpUAGTa/ZoiPNDuRQ==

svgo@^1.2.2, svgo@^1.3.2:
svgo@^1.2.2:
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do you know if this Is this still necessary? Is it a dependency of some other package?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@LinKCoding I think it's coming from svgr/cli, but looking at the repo I don't think if we are using it anymore, will it be safe to remove this package?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks for doing this! i took a look at removing svgr/cli locally and it seems fine to remove. will ✅ once i've looked at the monorepo with that package removed just to be sure.

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.

6 participants