Download Latest Version v2.0.4 source code.zip (1.9 MB)
Email in envelope

Get an email when there's a new version of svg-sprite

Home / v2.0.0
Name Modified Size InfoDownloads / Week
Parent folder
README.md 2022-09-27 2.0 kB
v2.0.0.tar.gz 2022-09-27 1.8 MB
v2.0.0.zip 2022-09-27 1.9 MB
Totals: 3 Items   3.6 MB 0

Breaking changes

  • Drop Node.js < 12 support
  • Update svgo to v2.x

Changes

  • Add namespaceIDPrefix option
  • Add rel="noopener noreferrer" to all links in generated HTML pages.
  • Add compileAsync method
  • Add support for disabling root viewBox attribute in stack mode
  • Add ID references substitution in href attributes (earlier worked with xlink:href only)
  • Drop Node.js < 12 support
  • Remove the deprecated config.transform option
  • Add milliseconds in logger's output
  • Change SVG dimensions calculation from PhantomJS to resvg-js, drop PhantomJ direct dependency (replaced with resvg-js)
  • Fix a rare issue with valid SVG files marked as invalid
  • Fix a rare bug with checking if passed config.log option is an instance of winston.Logger
  • Fix missing shape names when adding input files with a relative path
  • Replace cssmin with csso
  • Reduce lodash and other direct dependencies; switch to native JS alternatives

Dev updates

  • Update all devDepedencies
  • Switch to xo for linting
  • Replace mocha, should and c8 with jest
  • Replace PhantomJS and image-diff with playwright and pixelmatch for regression tests
  • A lot of docs tweaks
  • A lot of code refactoring
    • Switch to ES6+ syntax and methods
    • Switch to async methods whenever possible
    • Switch to ES6 classes whenever possible
    • Fix JSDoc documentation
  • Massively improve tests
    • Add regression tests for SVGs without dimensions
    • Add regression tests for all modes
    • Add tests and coverage reports to CI (Linux, Windows support)

Full Changelog: https://github.com/svg-sprite/svg-sprite/compare/v1.5.4...v2.0.0?w=1

Source: README.md, updated 2022-09-27