Packages

svgo

4.1.0 · 24 Aug 2026MIT52.3M / weekRepositoryHomepagenpmAtom feed

Your version

2.5.0

28 Aug 2021Where it was published

2.8.4 is the newest release of 2.x.

In short

2 fixed30 changed

Security

4 advisories affect 2.5.0; 2.8.4 fixes them

Release note

In this release we have a couple of fixes

  • Fixed removing transform-origin attribute (680e143)

  • Fixed applying transform to path arc with zero radius (ac8edba)

Visitor api now get parentNode in enter and exit callback

return {
  element: {
    enter: (node, parentNode) => {
    },
    exit: (node, parentNode) => {
    }
  }
}

And a lot of plugins are migrated to visitor api and covered them with tsdoc

  • addAttributesToSVGElement

  • addClassesToSVGElement

  • cleanupAttrs

  • cleanupEnableBackground

  • cleanupListOfValues

  • cleanupNumericValues

  • convertColors

  • convertEllipseToCircle

  • convertShapeToPath

  • convertTransform

  • mergePaths

  • removeAttributesBySelector

  • removeAttrs

  • removeComments

  • removeDesc

  • removeDoctype

  • removeElementsByAttr

  • removeEmptyText

  • removeMetadata

  • removeRasterImages

  • removeScriptElement

  • removeStyleElement

  • removeTitle

  • removeXMLProcInst

  • removeHiddenElems

  • removeViewBox

  • removeUselessDefs

  • removeOffCanvasPaths

  • removeUnknownsAndDefaults

  • sortDefsChildren

A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.