Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

postcss-svgo

Package Overview
Dependencies
Maintainers
7
Versions
53
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

postcss-svgo - npm Package Compare versions

Comparing version 5.0.0-rc.2 to 5.0.0

8

CHANGELOG.md

@@ -6,2 +6,10 @@ # Change Log

# [5.0.0](https://github.com/cssnano/cssnano/compare/postcss-svgo@5.0.0-rc.2...postcss-svgo@5.0.0) (2021-04-06)
**Note:** Version bump only for package postcss-svgo
# [5.0.0-rc.2](https://github.com/cssnano/cssnano/compare/postcss-svgo@5.0.0-rc.1...postcss-svgo@5.0.0-rc.2) (2021-03-15)

@@ -8,0 +16,0 @@

24

dist/index.js

@@ -12,4 +12,2 @@ "use strict";

var _isSvg = _interopRequireDefault(require("is-svg"));
var _url = require("./lib/url");

@@ -23,3 +21,3 @@

function minify(decl, opts) {
function minify(decl, opts, postcssResult) {
const parsed = (0, _postcssValueParser.default)(decl.value);

@@ -44,2 +42,6 @@ decl.value = parsed.walk(node => {

} else {
if (!dataURI.test(value)) {
return;
}
let decodedUri;

@@ -64,6 +66,2 @@

if (!(0, _isSvg.default)(svg)) {
return;
}
let result;

@@ -75,6 +73,8 @@

if (result.error) {
throw new Error(`${PLUGIN}: ${result.error}`);
decl.warn(postcssResult, `${result.error}`);
return;
}
} catch (error) {
throw new Error(`${PLUGIN}: ${error}`);
decl.warn(postcssResult, `${error}`);
return;
}

@@ -113,3 +113,5 @@

OnceExit(css) {
OnceExit(css, {
result
}) {
css.walkDecls(decl => {

@@ -120,3 +122,3 @@ if (!dataURI.test(decl.value)) {

minify(decl, opts);
minify(decl, opts, result);
});

@@ -123,0 +125,0 @@ }

{
"name": "postcss-svgo",
"version": "5.0.0-rc.2",
"version": "5.0.0",
"description": "Optimise inline SVG with PostCSS.",

@@ -33,5 +33,4 @@ "main": "dist/index.js",

"dependencies": {
"is-svg": "^4.2.0",
"postcss-value-parser": "^4.1.0",
"svgo": "^2.2.2"
"svgo": "^2.3.0"
},

@@ -50,3 +49,3 @@ "bugs": {

},
"gitHead": "5ba19ca54892f76ba6b2b698b4d88adcabd4451b"
"gitHead": "0e2c3bf5835bafcdc8783bef66f730a24194c8f3"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc