Skip to content

Upgrade svgo to version 2.3.0#846

Closed
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/npm/svgo-2.3.0
Closed

Upgrade svgo to version 2.3.0#846
depfu[bot] wants to merge 1 commit intomasterfrom
depfu/update/npm/svgo-2.3.0

Conversation

@depfu
Copy link
Contributor

@depfu depfu bot commented Mar 29, 2021

Here is everything you need to know about this upgrade. Please take a good look at what changed and the test results before merging this pull request.

What changed?

✳️ svgo (^1.0.5 → ^2.3.0) · Repo · Changelog

Release Notes

2.3.0

Hey, everybody! We have a big release here.

  • The new plugin is added for merging style elements into one. See #1381

Before:

<svg>
  <style media="print">
    .st0{ fill:red; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; }
  </style>
  <style>
    .test { background: red; }
  </style>
</svg>

After:

<svg>
  <style>
    @media print{
      .st0{ fill:red; padding-top: 1em; padding-right: 1em; padding-bottom: 1em; padding-left: 1em; }
    }
    .test { background: red; }
  </style>
</svg>
  • CLI got new --exclude flag which uses regexps to exclude some files from --folder. See #1409
svgo --folder=svgs --exclude "invalid-icon" "bad-.+"
  • Internal AST is migrated to XAST. This spec makes maintaining plugins easier and may be used as interop with other tools like SVGR.

  • The new visitor plugin type combines features of "full", "perItem" and "perItemReverse" plugins without loosing simplicity. Eventually only visitor api will be supported. See #1454

Also small fixes

  • override default floatPrecision in plugins with globally specified one (7389bcd)
  • fix rendering -0 in path data (3d4adb6)
  • make browser bundle 30% smaller (2799622)
  • simplified convertPathData plugin (a04b27a and 6165743)
  • prepared for more regression tests (d89d36e)

Thanks to @chambo-e, @strarsis, @XhmikosR, @omgovich and @TrySound

Does any of this look wrong? Please let us know.

Commits

See the full diff on Github. The new version differs by 54 commits:


Depfu Status

Depfu will automatically keep this PR conflict-free, as long as you don't add any commits to this branch yourself. You can also trigger a rebase manually by commenting with @depfu rebase.

All Depfu comment commands
@​depfu rebase
Rebases against your default branch and redoes this update
@​depfu recreate
Recreates this PR, overwriting any edits that you've made to it
@​depfu merge
Merges this PR once your tests are passing and conflicts are resolved
@​depfu close
Closes this PR and deletes the branch
@​depfu reopen
Restores the branch and reopens this PR (if it's closed)
@​depfu pause
Ignores all future updates for this dependency and closes this PR
@​depfu pause [minor|major]
Ignores all future minor/major updates for this dependency and closes this PR
@​depfu resume
Future versions of this dependency will create PRs again (leaves this PR as is)

@depfu depfu bot added the depfu label Mar 29, 2021
@depfu depfu bot mentioned this pull request Mar 29, 2021
@depfu
Copy link
Contributor Author

depfu bot commented Jun 27, 2021

Closed in favor of #875.

@depfu depfu bot closed this Jun 27, 2021
@depfu depfu bot deleted the depfu/update/npm/svgo-2.3.0 branch June 27, 2021 11:25
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants