svg/svgo
### [`v2.6.0`](https://togithub.com/svg/svgo/releases/v2.6.0)
[Compare Source](https://togithub.com/svg/svgo/compare/v2.5.0...v2.6.0)
We have some good stuff in this release
#### Better syntax errors ([https://github.com/svg/svgo/pull/1553](https://togithub.com/svg/svgo/pull/1553))
Before people struggled to figure out what and why happens with such cryptic error
Error: Error in parsing SVG: Unquoted attribute value
Line: 1
Column: 29
Char: 6
File: input.svg
This gives too little information when a lot of svgs are transformed.
New errors look like this, include context and point to exact location with the issue.
We hope this will solve many issues when dealing with bundlers and other tools integrations.
Error: SvgoParserError: input.svg:2:29: Unquoted attribute value
1 |
4 |
#### pefixIds plugin is now idempotent ([https://github.com/svg/svgo/pull/1561](https://togithub.com/svg/svgo/pull/1561))
To get better compression results SVGO uses multipass option. This option is used
to run prefixIds plugin only once to prefix ids and classes properly.
Though sometimes users run svgo manually a few times which leads to duplicated
prefixes and make code much bigger. To solves this prefixIds was redesigned
to add prefix only when it does not exit in ids and classes.
Eventually all plugins are planned to be determenistic and idempotent
so multipass option would not be necessary and single pass compression
could be as effective as possible.
#### New js2svg options ([https://github.com/svg/svgo/pull/1546](https://togithub.com/svg/svgo/pull/1546))
js2svg.eol: 'lf' | 'crlf'
Allows to customize end of line characters which is usually resolved by os.EOL in node.
finalNewline: boolean
Ensures SVG output has a final newline which is required for some tools like git.
#### Fixes and refactorings
Follwing plugins are migrated to the new visitor plugin api and covered with tsdoc
- reusePaths ([https://github.com/svg/svgo/pull/1551](https://togithub.com/svg/svgo/pull/1551))
- removeUselessStrokeAndFill ([https://github.com/svg/svgo/pull/1549](https://togithub.com/svg/svgo/pull/1549))
- minifyStyles ([https://github.com/svg/svgo/pull/1552](https://togithub.com/svg/svgo/pull/1552))
- cleanupIDs ([https://github.com/svg/svgo/pull/1556](https://togithub.com/svg/svgo/pull/1556))
- removeEditorsNSData ([https://github.com/svg/svgo/pull/1557](https://togithub.com/svg/svgo/pull/1557))
- removeUnusedNS ([https://github.com/svg/svgo/pull/1559](https://togithub.com/svg/svgo/pull/1559))
- prefixIds ([https://github.com/svg/svgo/pull/1561](https://togithub.com/svg/svgo/pull/1561))
- sortAttrs ([https://github.com/svg/svgo/pull/1564](https://togithub.com/svg/svgo/pull/1564))
Also fixed a few bugs
- add xmlns:xlink in reusePaths plugin when missing ([https://github.com/svg/svgo/pull/1555](https://togithub.com/svg/svgo/pull/1555))
- fixed removeNone param in removeUselessStrokeAndFill plugin ([https://github.com/svg/svgo/pull/1549](https://togithub.com/svg/svgo/pull/1549))
Thanks to [@XhmikosR](https://togithub.com/XhmikosR), [@matheus1lva](https://togithub.com/matheus1lva), [@deepsweet](https://togithub.com/deepsweet), [@omgovich](https://togithub.com/omgovich), [@adalinesimonian](https://togithub.com/adalinesimonian) and [@TrySound](https://togithub.com/TrySound)
Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
[ ] If you want to rebase/retry this PR, check this box.
This PR contains the following updates:
2.5.0
->2.6.0
Release Notes
svg/svgo
### [`v2.6.0`](https://togithub.com/svg/svgo/releases/v2.6.0) [Compare Source](https://togithub.com/svg/svgo/compare/v2.5.0...v2.6.0) We have some good stuff in this release #### Better syntax errors ([https://github.com/svg/svgo/pull/1553](https://togithub.com/svg/svgo/pull/1553)) Before people struggled to figure out what and why happens with such cryptic error Error: Error in parsing SVG: Unquoted attribute value Line: 1 Column: 29 Char: 6 File: input.svg This gives too little information when a lot of svgs are transformed. New errors look like this, include context and point to exact location with the issue. We hope this will solve many issues when dealing with bundlers and other tools integrations. Error: SvgoParserError: input.svg:2:29: Unquoted attribute value 1 | 4 | #### pefixIds plugin is now idempotent ([https://github.com/svg/svgo/pull/1561](https://togithub.com/svg/svgo/pull/1561)) To get better compression results SVGO uses multipass option. This option is used to run prefixIds plugin only once to prefix ids and classes properly. Though sometimes users run svgo manually a few times which leads to duplicated prefixes and make code much bigger. To solves this prefixIds was redesigned to add prefix only when it does not exit in ids and classes. Eventually all plugins are planned to be determenistic and idempotent so multipass option would not be necessary and single pass compression could be as effective as possible. #### New js2svg options ([https://github.com/svg/svgo/pull/1546](https://togithub.com/svg/svgo/pull/1546)) js2svg.eol: 'lf' | 'crlf' Allows to customize end of line characters which is usually resolved by os.EOL in node. finalNewline: boolean Ensures SVG output has a final newline which is required for some tools like git. #### Fixes and refactorings Follwing plugins are migrated to the new visitor plugin api and covered with tsdoc - reusePaths ([https://github.com/svg/svgo/pull/1551](https://togithub.com/svg/svgo/pull/1551)) - removeUselessStrokeAndFill ([https://github.com/svg/svgo/pull/1549](https://togithub.com/svg/svgo/pull/1549)) - minifyStyles ([https://github.com/svg/svgo/pull/1552](https://togithub.com/svg/svgo/pull/1552)) - cleanupIDs ([https://github.com/svg/svgo/pull/1556](https://togithub.com/svg/svgo/pull/1556)) - removeEditorsNSData ([https://github.com/svg/svgo/pull/1557](https://togithub.com/svg/svgo/pull/1557)) - removeUnusedNS ([https://github.com/svg/svgo/pull/1559](https://togithub.com/svg/svgo/pull/1559)) - prefixIds ([https://github.com/svg/svgo/pull/1561](https://togithub.com/svg/svgo/pull/1561)) - sortAttrs ([https://github.com/svg/svgo/pull/1564](https://togithub.com/svg/svgo/pull/1564)) Also fixed a few bugs - add xmlns:xlink in reusePaths plugin when missing ([https://github.com/svg/svgo/pull/1555](https://togithub.com/svg/svgo/pull/1555)) - fixed removeNone param in removeUselessStrokeAndFill plugin ([https://github.com/svg/svgo/pull/1549](https://togithub.com/svg/svgo/pull/1549)) Thanks to [@XhmikosR](https://togithub.com/XhmikosR), [@matheus1lva](https://togithub.com/matheus1lva), [@deepsweet](https://togithub.com/deepsweet), [@omgovich](https://togithub.com/omgovich), [@adalinesimonian](https://togithub.com/adalinesimonian) and [@TrySound](https://togithub.com/TrySound)Configuration
📅 Schedule: At any time (no schedule defined).
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
â™» Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR has been generated by WhiteSource Renovate. View repository job log here.