imagemin-svgo
Advanced tools
Comparing version 5.2.2 to 5.2.3
13
index.js
'use strict'; | ||
const bufferFrom = require('buffer-from'); | ||
const isSvg = require('is-svg'); | ||
@@ -18,12 +19,4 @@ const SVGO = require('svgo'); | ||
return new Promise((resolve, reject) => { | ||
svgo.optimize(buf, res => { | ||
if (res.error) { | ||
reject(new Error(res.error)); | ||
return; | ||
} | ||
resolve(new Buffer(res.data)); // eslint-disable-line unicorn/no-new-buffer | ||
}); | ||
}); | ||
// TODO: Use `Buffer.from` when targeting Node.js >=6 | ||
return svgo.optimize(buf).then(res => bufferFrom(res.data)); | ||
}; |
{ | ||
"name": "imagemin-svgo", | ||
"version": "5.2.2", | ||
"description": "SVGO imagemin plugin", | ||
"license": "MIT", | ||
"repository": "imagemin/imagemin-svgo", | ||
"author": { | ||
"name": "Kevin Mårtensson", | ||
"email": "kevinmartensson@gmail.com", | ||
"url": "github.com/kevva" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
{ | ||
"name": "Shinnosuke Watanabe", | ||
"url": "github.com/shinnn" | ||
} | ||
], | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"compress", | ||
"image", | ||
"imageminplugin", | ||
"img", | ||
"minify", | ||
"optimize", | ||
"svg", | ||
"svgo" | ||
], | ||
"dependencies": { | ||
"is-svg": "^2.0.0", | ||
"svgo": "^0.7.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
"name": "imagemin-svgo", | ||
"version": "5.2.3", | ||
"description": "SVGO imagemin plugin", | ||
"license": "MIT", | ||
"repository": "imagemin/imagemin-svgo", | ||
"author": { | ||
"name": "Kevin Mårtensson", | ||
"email": "kevinmartensson@gmail.com", | ||
"url": "github.com/kevva" | ||
}, | ||
"maintainers": [ | ||
{ | ||
"name": "Sindre Sorhus", | ||
"email": "sindresorhus@gmail.com", | ||
"url": "sindresorhus.com" | ||
}, | ||
{ | ||
"name": "Shinnosuke Watanabe", | ||
"url": "github.com/shinnn" | ||
} | ||
], | ||
"engines": { | ||
"node": ">=4" | ||
}, | ||
"scripts": { | ||
"test": "xo && ava" | ||
}, | ||
"files": [ | ||
"index.js" | ||
], | ||
"keywords": [ | ||
"compress", | ||
"image", | ||
"imageminplugin", | ||
"img", | ||
"minify", | ||
"optimize", | ||
"svg", | ||
"svgo" | ||
], | ||
"dependencies": { | ||
"buffer-from": "^0.1.1", | ||
"is-svg": "^2.0.0", | ||
"svgo": "^1.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"xo": "*" | ||
} | ||
} |
@@ -9,3 +9,3 @@ # imagemin-svgo [![Build Status](https://travis-ci.org/imagemin/imagemin-svgo.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-svgo) [![Build status](https://ci.appveyor.com/api/projects/status/esa7m3u8bcol1mtr/branch/master?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/imagemin-svgo/branch/master) | ||
``` | ||
$ npm install --save imagemin-svgo | ||
$ npm install imagemin-svgo | ||
``` | ||
@@ -12,0 +12,0 @@ |
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
3380
3
16
+ Addedbuffer-from@^0.1.1
+ Added@types/q@1.5.8(transitive)
+ Addedansi-styles@3.2.1(transitive)
+ Addedarray-buffer-byte-length@1.0.1(transitive)
+ Addedarray.prototype.reduce@1.0.7(transitive)
+ Addedarraybuffer.prototype.slice@1.0.3(transitive)
+ Addedavailable-typed-arrays@1.0.7(transitive)
+ Addedboolbase@1.0.0(transitive)
+ Addedbuffer-from@0.1.2(transitive)
+ Addedcall-bind@1.0.7(transitive)
+ Addedchalk@2.4.2(transitive)
+ Addedcoa@2.0.2(transitive)
+ Addedcolor-convert@1.9.3(transitive)
+ Addedcolor-name@1.1.3(transitive)
+ Addedcss-select@2.1.0(transitive)
+ Addedcss-select-base-adapter@0.1.1(transitive)
+ Addedcss-tree@1.0.0-alpha.371.1.3(transitive)
+ Addedcss-what@3.4.2(transitive)
+ Addedcsso@4.2.0(transitive)
+ Addeddata-view-buffer@1.0.1(transitive)
+ Addeddata-view-byte-length@1.0.1(transitive)
+ Addeddata-view-byte-offset@1.0.0(transitive)
+ Addeddefine-data-property@1.1.4(transitive)
+ Addeddefine-properties@1.2.1(transitive)
+ Addeddom-serializer@0.2.2(transitive)
+ Addeddomelementtype@1.3.12.3.0(transitive)
+ Addeddomutils@1.7.0(transitive)
+ Addedentities@2.2.0(transitive)
+ Addedes-abstract@1.23.5(transitive)
+ Addedes-array-method-boxes-properly@1.0.0(transitive)
+ Addedes-define-property@1.0.0(transitive)
+ Addedes-errors@1.3.0(transitive)
+ Addedes-object-atoms@1.0.0(transitive)
+ Addedes-set-tostringtag@2.0.3(transitive)
+ Addedes-to-primitive@1.2.1(transitive)
+ Addedesprima@4.0.1(transitive)
+ Addedfor-each@0.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedfunction.prototype.name@1.1.6(transitive)
+ Addedfunctions-have-names@1.2.3(transitive)
+ Addedget-intrinsic@1.2.4(transitive)
+ Addedget-symbol-description@1.0.2(transitive)
+ Addedglobalthis@1.0.4(transitive)
+ Addedgopd@1.0.1(transitive)
+ Addedhas-bigints@1.0.2(transitive)
+ Addedhas-flag@3.0.0(transitive)
+ Addedhas-property-descriptors@1.0.2(transitive)
+ Addedhas-proto@1.0.3(transitive)
+ Addedhas-symbols@1.0.3(transitive)
+ Addedhas-tostringtag@1.0.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedinternal-slot@1.0.7(transitive)
+ Addedis-array-buffer@3.0.4(transitive)
+ Addedis-bigint@1.0.4(transitive)
+ Addedis-boolean-object@1.1.2(transitive)
+ Addedis-callable@1.2.7(transitive)
+ Addedis-data-view@1.0.1(transitive)
+ Addedis-date-object@1.0.5(transitive)
+ Addedis-negative-zero@2.0.3(transitive)
+ Addedis-number-object@1.0.7(transitive)
+ Addedis-regex@1.1.4(transitive)
+ Addedis-shared-array-buffer@1.0.3(transitive)
+ Addedis-string@1.0.7(transitive)
+ Addedis-symbol@1.0.4(transitive)
+ Addedis-typed-array@1.1.13(transitive)
+ Addedis-weakref@1.0.2(transitive)
+ Addedisarray@2.0.5(transitive)
+ Addedjs-yaml@3.14.1(transitive)
+ Addedmdn-data@2.0.142.0.4(transitive)
+ Addednth-check@1.0.2(transitive)
+ Addedobject-inspect@1.13.3(transitive)
+ Addedobject-keys@1.1.1(transitive)
+ Addedobject.assign@4.1.5(transitive)
+ Addedobject.getownpropertydescriptors@2.1.8(transitive)
+ Addedobject.values@1.2.0(transitive)
+ Addedpossible-typed-array-names@1.0.0(transitive)
+ Addedregexp.prototype.flags@1.5.3(transitive)
+ Addedsafe-array-concat@1.1.2(transitive)
+ Addedsafe-regex-test@1.0.3(transitive)
+ Addedset-function-length@1.2.2(transitive)
+ Addedset-function-name@2.0.2(transitive)
+ Addedside-channel@1.0.6(transitive)
+ Addedsource-map@0.6.1(transitive)
+ Addedstable@0.1.8(transitive)
+ Addedstring.prototype.trim@1.2.9(transitive)
+ Addedstring.prototype.trimend@1.0.8(transitive)
+ Addedstring.prototype.trimstart@1.0.8(transitive)
+ Addedsupports-color@5.5.0(transitive)
+ Addedsvgo@1.3.2(transitive)
+ Addedtyped-array-buffer@1.0.2(transitive)
+ Addedtyped-array-byte-length@1.0.1(transitive)
+ Addedtyped-array-byte-offset@1.0.2(transitive)
+ Addedtyped-array-length@1.0.6(transitive)
+ Addedunbox-primitive@1.0.2(transitive)
+ Addedunquote@1.1.1(transitive)
+ Addedutil.promisify@1.0.1(transitive)
+ Addedwhich-boxed-primitive@1.0.2(transitive)
+ Addedwhich-typed-array@1.1.15(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedchalk@1.1.3(transitive)
- Removedclap@1.2.3(transitive)
- Removedcoa@1.0.4(transitive)
- Removedcolors@1.1.2(transitive)
- Removedcsso@2.3.2(transitive)
- Removedesprima@2.7.3(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedjs-yaml@3.7.0(transitive)
- Removedsource-map@0.5.7(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedsvgo@0.7.2(transitive)
- Removedwhet.extend@0.9.9(transitive)
Updatedsvgo@^1.0.0