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

fix: add alias of removeScriptElement to removeScripts #2033

Merged
merged 1 commit into from
Jun 11, 2024

Conversation

SethFalco
Copy link
Member

@SethFalco SethFalco commented Jun 11, 2024

Adds an alias to convert removeScriptElement to removeScripts.

This makes it, so this is less likely to be a breaking change for downstream projects.

The changes to our default plugins are less of an issue because redundant overrides don't throw errors, and most downstream projects disabled removeTitle and removeViewBox already anyway, so that change isn't going to be breaking for them at all.

However, the rename of removeScriptElement would produce a fatal crash if an end-user had that in their config for a downstream project. So instead, let's alias it so projects like SVGR, ipx, Docusaurus etc, can upgrade to SVGO v4 without having to increment their major version.

@SethFalco SethFalco merged commit 65d0a52 into svg:main Jun 11, 2024
12 checks passed
@SethFalco SethFalco deleted the fix/remove-script-alias branch June 11, 2024 22:09
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