Releases: svg/svgo
Releases · svg/svgo
1.1.0 / 16.09.2018
- Fixed
collapseGroupsplugin removing property with a child havinginheritvalue. versionattribute value is not more being rounded.- Fixed jsAPI
clonemethod with respect to the introduced CSS classes. - Fixed scaling strokes with
vector-effect="non-scaling-stroke"(by @alexjlockwood). - Fixed passing properties from groups in
collapseGroupsplugin if child have a filter (by @stristr). - Fixed arc path commands parsing without separators after flags, effectively producing a JS error.
- Fixed
viewBoxseparators parsing. - Fixed
removeNonInheritableGroupAttrsplugin to work as intended. - Fixed removing path segments without length in presence of
stroke-linecap. - Fixed
removeUnknownsAndDefaultsplugin removing attributes from elements withid. - Fixed converting to large arcs from nearly straight lines curves.
- Fixed
collapseGroupsplugin affecting<switch>and its subgroups. - Fixed
convertTransformplugin converting torotate()with wrong sign in some case. - Fixed
cleanupListOfValuesplugin not preserving non-numeric values. - Fixed
!importantbeing passed to attributes inconvertStyleToAttrsplugin. - Added option
keepImportanttoconvertStyleToAttrsplugin to preserve styles with!important. removeHiddenElemsplugin now also removes elements withvisibility="hidden"attribute (by @mikolaj92).- Added
forceAbsolutePathoption toconvertPathDataplugin to always use absolute coordinates (by @cool). - Added
keepRoleAttrforremoveUnknownsAndDefaultsplugin to preserverole-attributes (by @himedlooff). - Added
xmlnsorder option insortAttrsplugin (by @hellatan). - Added an option to
prefixIdsplugin to pass prefix as false or as a function that returns false (by @vzaidman). prefixIdsplugin now adds prefix to every class (by @vzaidman).- Updated and improved docs a bit (multiple authors).
1.0.5 / 26.02.2018
Fixed issue with prefixIDs plugin not replacing url() values correctly (by @harrisjose).
1.0.4 / 30.01.2018
- Fixed bug with removing groups that are direct child of
<switch>. - Fixed bug with shorthand path points counting (thanks @alexjlockwood for noticing).
- Fixed crash on parsing invalid transform, e.g. without close parenthesis.
1.0.3 / 08.11.2017
- Fixed
removeViewBoxplugin to check for zero start coordinates. - Removed extra info from STDOUT when it set to output.
1.0.2 / 03.11.2017
- Fixed a couple of errors related to
inlineStylesplugin. - Updated some lost details in documentation to reflect v1.0 changes.
1.0.1 / 31.10.2017
- Fixed error “Object.defineProperty called on non-object” in images with
<foreignObject/>.
1.0.0 / 30.10.2017
- SVGO now requires Node 4 or higher.
- Changed CLI syntax to treat filenames as input, thus allowing
svgo *.svgsyntax. SVGO.optimize()now returnsPromise.- Added
dataurioption to JS API. - Added support for SVG 2
hrefattribute. cleanupIDsnow don't removes IDs if an image consists only ofdefs.- New plugin
inlineStylesfor converting styles from<style>element to attributes if possible (by @strarsis). cleanupNumericValuesnow rounds values inviewBox(by @caub).- New plugin:
removeScriptElement(disabled by default) to align withremoveStyleElement(by @pklingem). minifyStylesnow removes styles based on usage with controlling options (by @lahmatiy).- New option
exceptincleanupIDsto keep IDs (by @Velenir). - New option
forceincleanupIDsto work even if SVG containsstyleorscriptelements (by @Velenir). - Fixed arcs transforming with different signed
scaleparameters (by @JoshyPHP). - Fixed
removeUselessStrokeAndFillto check forstyleorscriptelements per file (by @caub). - New option
keepAriaAttrsinremoveUnknownsAndDefaults(by @davidtheclark). - Corrected parsing in
cleanupIDsto account animation syntax (by @caub). #ff0000now converts toredas well as#f00(by @davidleston).- Added “gray” variation to colors list per CSS Color Module Level 4 (by @ydaniv).
- Fixed error on empty files.
- A separator character in
removeAttrsnow can be changed perelemSeparatoroption (by @mikestreety). addAttributesToSVGElementnow can add values to attributes.
0.7.2 / 29.01.2017
- Extended
currentColormatch conditions (string, rx, bool) (by @AlimovSV) - Fixed removing
<animate>in<stop>. - Fixed removing same transform in inner element in
removeUnknownsAndDefaults. - Fixed collapsing groups with same non-inheritable attribue.
- Corrected removing of leading zero in case of exponential notation.
0.7.1 / 27.09.2016
- Reverted the requirement of Node.js to version 0.10.
- Added
addAttributesToSVGElementto the default config to allow using it with--enableoption. - Added korean translation of “How it works” doc (by @Primeiros).
0.7.0 / 25.08.2016
- Required Node.js version has increased to 0.12.
- New plugins:
removeElementsByAttr(by IDs or classes) by @elidupuis,
addAttributesToSVGElementby @gjjones,
removeXMLNS(for SVG inlining) by @ricardobeat. - Tests now correctly pass in Windows with CRLF line endings. Pretty print now accounts system line endings.
- Fixed bugs with collapsing groups with masks and transforms in
collapseGroups. - Fixed bugs with erroneous removing IDs in
cleanupIDs. - Improved attributes sorting in
sortAttrsby @darktrojan. addClassesToSVGElementno more repeats classes (by @ricardobeat).