🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Sign inDemoInstall
Socket

postcss-svgo

Package Overview
Dependencies
Maintainers
1
Versions
54
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

to
2.0.2

7

CHANGELOG.md

@@ -0,1 +1,8 @@

# 2.0.2
* Fixed an issue where the module was not handling exceptions from
decoding URLs.
* The module will now convert all SVG wrapping quotes to single quotes, which
is consistent with SVGO's output.
# 2.0.1

@@ -2,0 +9,0 @@

9

dist/index.js

@@ -27,3 +27,8 @@ 'use strict';

return new Promise(function (resolve, reject) {
var isUriEncoded = decode(decl.value) !== decl.value;
var isUriEncoded = undefined;
try {
isUriEncoded = decode(decl.value) !== decl.value;
} catch (err) {
isUriEncoded = false;
}
var minify = function minify(_, quote, svg, offset, str, cb) {

@@ -35,2 +40,4 @@ if (!dataURI.test(svg) || !(0, _isSvg2['default'])(svg)) {

quote = '';
} else if (quote === '"') {
quote = "'";
}

@@ -37,0 +44,0 @@ svgo.optimize(svg.replace(dataURI, ''), function (result) {

2

package.json
{
"name": "postcss-svgo",
"version": "2.0.1",
"version": "2.0.2",
"description": "Optimise inline SVG with PostCSS.",

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