Skip to content

Releases: svg/svgo

1.0.0 / 30.10.2017

30 Oct 19:37
Compare
Choose a tag to compare
  • SVGO now requires Node 4 or higher.
  • Changed CLI syntax to treat filenames as input, thus allowing svgo *.svg syntax.
  • SVGO.optimize() now returns Promise.
  • Added datauri option to JS API.
  • Added support for SVG 2 href attribute.
  • cleanupIDs now don't removes IDs if an image consists only of defs.
  • New plugin inlineStyles for converting styles from <style> element to attributes if possible (by @strarsis).
  • cleanupNumericValues now rounds values in viewBox (by @caub).
  • New plugin: removeScriptElement (disabled by default) to align with removeStyleElement (by @pklingem).
  • minifyStyles now removes styles based on usage with controlling options (by @lahmatiy).
  • New option except in cleanupIDs to keep IDs (by @Velenir).
  • New option force in cleanupIDs to work even if SVG contains style or script elements (by @Velenir).
  • Fixed arcs transforming with different signed scale parameters (by @JoshyPHP).
  • Fixed removeUselessStrokeAndFill to check for style or script elements per file (by @caub).
  • New option keepAriaAttrs in removeUnknownsAndDefaults (by @davidtheclark).
  • Corrected parsing in cleanupIDs to account animation syntax (by @caub).
  • #ff0000 now converts to red 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 per elemSeparator option (by @mikestreety).
  • addAttributesToSVGElement now can add values to attributes.

0.7.2 / 29.01.2017

29 Jan 18:03
Compare
Choose a tag to compare
  • 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

27 Sep 08:43
Compare
Choose a tag to compare
  • 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

25 Aug 20:23
Compare
Choose a tag to compare
  • 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

25 Apr 11:29
Compare
Choose a tag to compare
  • Corrected CSSO API usage

0.6.5 / 25.04.2016

25 Apr 11:21
Compare
Choose a tag to compare
  • 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 to g content if it's referenced (has an id).
  • collapseGroups now don't collapse a group if it has an animated attribute (SMIL).

0.6.4 / 05.04.2016

05 Apr 15:14
Compare
Choose a tag to compare
  • 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 to convertColors plugin for converting values like fill and stroke to currentColor (by @scurker).
  • Bumped CSSO to the current version and used its new shiny API (thanks to @lahmatiy).

0.6.3 / 20.03.2016

20 Mar 18:19
Compare
Choose a tag to compare
  • 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 name href, thus correctly working with another namespace prefix.
  • Fixed id removing with disabled plugins/convertStyleToAttrs.js.

0.6.2 / 08.03.2016

08 Mar 18:04
Compare
Choose a tag to compare
  • Better error handling and messaging improvements.
  • SVG files with XML entities (e.g. from Adobe Illustrator) are now correctly being parsed.
  • Fixed error on converting curves to arcs.
  • Corrected rounding in subsequent passes with --multipass option.
  • Data URI option now handles charset (by @holymonson)
  • Tranformations are no longer moved to group if there is a mask (plugins/moveElemsAttrsToGroup.js).
  • Fixed matrix decomposition losing sign in case like [1, 0, 0, -1, 0, 0] (scale(1 -1)).
  • Fixed crash on uppercased color name.
  • Paths with id and without stroke-width aren't being trasformed now since stroke-width may be applied later.

0.6.1 / 21.11.2015

21 Nov 11:06
Compare
Choose a tag to compare
  • Added option --quite to suppress output (by @phihag).
  • Removed lib-cov folder from the package, which was erroneously included before.
  • Fixed errors in “minifyStyles” when there are <style> elements with CDATA content or without content at all.
  • Amended transform functions parsing to prevent errors when there are no separators between numbers (which isn't allowed by syntax, but understood by browsers).