Releases: svg/svgo
Releases · svg/svgo
1.0.2 / 03.11.2017
- Fixed a couple of errors related to
inlineStyles
plugin. - 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 *.svg
syntax. SVGO.optimize()
now returnsPromise
.- Added
datauri
option to JS API. - Added support for SVG 2
href
attribute. cleanupIDs
now don't removes IDs if an image consists only ofdefs
.- New plugin
inlineStyles
for converting styles from<style>
element to attributes if possible (by @strarsis). cleanupNumericValues
now rounds values inviewBox
(by @caub).- New plugin:
removeScriptElement
(disabled by default) to align withremoveStyleElement
(by @pklingem). minifyStyles
now removes styles based on usage with controlling options (by @lahmatiy).- New option
except
incleanupIDs
to keep IDs (by @Velenir). - New option
force
incleanupIDs
to work even if SVG containsstyle
orscript
elements (by @Velenir). - Fixed arcs transforming with different signed
scale
parameters (by @JoshyPHP). - Fixed
removeUselessStrokeAndFill
to check forstyle
orscript
elements per file (by @caub). - New option
keepAriaAttrs
inremoveUnknownsAndDefaults
(by @davidtheclark). - Corrected parsing in
cleanupIDs
to account animation syntax (by @caub). #ff0000
now converts tored
as 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
removeAttrs
now can be changed perelemSeparator
option (by @mikestreety). addAttributesToSVGElement
now can add values to attributes.
0.7.2 / 29.01.2017
- Extended
currentColor
match 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
addAttributesToSVGElement
to the default config to allow using it with--enable
option. - 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,
addAttributesToSVGElement
by @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
sortAttrs
by @darktrojan. addClassesToSVGElement
no more repeats classes (by @ricardobeat).
0.6.6 / 25.04.2016
- Corrected CSSO API usage
0.6.5 / 25.04.2016
- Extra content inserted by editors are now being removed within
<foreignObject>
as well thus fixing bug “Namespace prefix … is not defined“ after applying SVGO. - Doctype with entities declartion is now also being removed since SVGO correctly parses them starting from the version 0.6.2.
- Corrected
moveGroupAttrsToElems
not to move attributes tog
content if it's referenced (has anid
). collapseGroups
now don't collapse a group if it has an animated attribute (SMIL).
0.6.4 / 05.04.2016
- Fixed bug in “convertStyleToAttrs” plugin with converting styling properties to non-existent attributes (which are normally removed later by
removeUnknownsAndDefaults
). - Added
--indent
option to style pretty-printed SVG. (e.g.--indent 2
) (by @scurker). - Added
currentColor
param toconvertColors
plugin for converting values likefill
andstroke
tocurrentColor
(by @scurker). - Bumped CSSO to the current version and used its new shiny API (thanks to @lahmatiy).
0.6.3 / 20.03.2016
- Smart rounding (introduced in 0.4.5) now applies only when rounding is needed, thus making subsequent passes more stable.
- Fixed regression in converting curves to arcs.
xlink:href
references are now being checked by local namehref
, thus correctly working with another namespace prefix.- Fixed
id
removing with disabledplugins/convertStyleToAttrs.js
.