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

deps: migrate to svgo v4 #966

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from
Draft

Conversation

SethFalco
Copy link

@SethFalco SethFalco commented Jun 9, 2024

Note: this PR should not be merged yet. SVGO v4 is still a release candidate for now. I just wanted to help with migrating, and to review the migration to SVGO v4 to see if there'd be any regressions downstream that we didn't spot in our testing.

Summary

Migrate to SVGO v4.

  • SVGO is now an ESM module. (Common JS is still supported.)
  • removeViewBox and removeTitle are no longer part of preset-default.
    • we disabled removeViewBox to preserve scalability (can be enabled via SVGO config)
    • we disabled removeTitle to preserve accessibility (can be enabled via SVGO config)
  • Renames removeScriptElement to removeScripts (in v4.0.0-rc.1, we internally rewrite the old name to the new one, so this shouldn't be a breaking change for you, even if users were using this plugin)
  • Introduces various bug fixes, optimizations, etc.

All recent release and changelogs can be seen in the repo: https://github.com/svg/svgo/releases

Changes

  • When testing the SVGO config, enables removeTitle instead of disabling it, so that it's different from the default settings.
  • Removes tests to disable removeViewBox as it's already disabled and the override.removeViewBox property is no longer part of the schema.

Copy link

vercel bot commented Jun 9, 2024

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

Name Status Preview Comments Updated (UTC)
svgr ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 9, 2024 5:51pm

@SethFalco SethFalco changed the title deps!: migrate to svgo v4 deps: migrate to svgo v4 Jun 11, 2024
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.

1 participant