imagemin-mozjpeg
Advanced tools
Comparing version 8.0.0 to 9.0.0
16
index.js
@@ -6,8 +6,9 @@ 'use strict'; | ||
module.exports = options => buffer => { | ||
options = Object.assign({ | ||
module.exports = options => async buffer => { | ||
options = { | ||
trellis: true, | ||
trellisDC: true, | ||
overshoot: true | ||
}, options); | ||
overshoot: true, | ||
...options | ||
}; | ||
@@ -26,8 +27,11 @@ if (!Buffer.isBuffer(buffer)) { | ||
} | ||
if (options.maxmemory) { | ||
return Promise.reject(new Error('Option `maxmemory` was renamed to `maxMemory`')); | ||
} | ||
if (options.notrellis) { | ||
return Promise.reject(new Error('Option `notrellis` was renamed to `trellis` and inverted')); | ||
} | ||
if (options.noovershoot) { | ||
@@ -107,3 +111,3 @@ return Promise.reject(new Error('Option `noovershoot` was renamed to `overshoot` and inverted')); | ||
return execa.stdout(mozjpeg, args, { | ||
const {stdout} = await execa(mozjpeg, args, { | ||
encoding: null, | ||
@@ -113,2 +117,4 @@ input: buffer, | ||
}); | ||
return stdout; | ||
}; |
{ | ||
"name": "imagemin-mozjpeg", | ||
"version": "8.0.0", | ||
"version": "9.0.0", | ||
"description": "Imagemin plugin for mozjpeg", | ||
@@ -24,3 +24,3 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=10" | ||
}, | ||
@@ -45,12 +45,11 @@ "scripts": { | ||
"dependencies": { | ||
"execa": "^1.0.0", | ||
"execa": "^4.0.0", | ||
"is-jpg": "^2.0.0", | ||
"mozjpeg": "^6.0.0" | ||
"mozjpeg": "^7.0.0" | ||
}, | ||
"devDependencies": { | ||
"ava": "*", | ||
"ava": "^3.8.0", | ||
"is-progressive": "^3.0.0", | ||
"pify": "^4.0.0", | ||
"xo": "*" | ||
"xo": "^0.30.0" | ||
} | ||
} |
@@ -1,2 +0,2 @@ | ||
# imagemin-mozjpeg [![Build Status](https://travis-ci.org/imagemin/imagemin-mozjpeg.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-mozjpeg) [![Build status](https://ci.appveyor.com/api/projects/status/uuh7yi48erf4ykyo?svg=true)](https://ci.appveyor.com/project/ShinnosukeWatanabe/imagemin-mozjpeg) | ||
# imagemin-mozjpeg [![Build Status](https://travis-ci.org/imagemin/imagemin-mozjpeg.svg?branch=master)](https://travis-ci.org/imagemin/imagemin-mozjpeg) | ||
@@ -3,0 +3,0 @@ > [Imagemin](https://github.com/imagemin/imagemin) plugin for [mozjpeg](https://github.com/mozilla/mozjpeg) |
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
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
3
89
0
7357
+ Addedcross-spawn@7.0.6(transitive)
+ Addedexeca@4.1.0(transitive)
+ Addedget-stream@5.2.0(transitive)
+ Addedhuman-signals@1.1.1(transitive)
+ Addedis-stream@2.0.1(transitive)
+ Addedmerge-stream@2.0.0(transitive)
+ Addedmimic-fn@2.1.0(transitive)
+ Addedmozjpeg@7.1.1(transitive)
+ Addednpm-run-path@4.0.1(transitive)
+ Addedonetime@5.1.2(transitive)
+ Addedpath-key@3.1.1(transitive)
+ Addedshebang-command@2.0.0(transitive)
+ Addedshebang-regex@3.0.0(transitive)
+ Addedstrip-final-newline@2.0.0(transitive)
+ Addedwhich@2.0.2(transitive)
- Removedansi-regex@2.1.1(transitive)
- Removedansi-styles@2.2.1(transitive)
- Removedarray-find-index@1.0.2(transitive)
- Removedcamelcase@2.1.1(transitive)
- Removedcamelcase-keys@2.1.0(transitive)
- Removedchalk@1.1.3(transitive)
- Removedconsole-stream@0.1.1(transitive)
- Removedcurrently-unhandled@0.4.1(transitive)
- Removeddecamelize@1.2.0(transitive)
- Removederror-ex@1.3.2(transitive)
- Removedfigures@1.7.0(transitive)
- Removedfind-up@1.1.2(transitive)
- Removedfunction-bind@1.1.2(transitive)
- Removedget-stdin@4.0.1(transitive)
- Removedhas-ansi@2.0.0(transitive)
- Removedhasown@2.0.2(transitive)
- Removedhosted-git-info@2.8.9(transitive)
- Removedindent-string@2.1.0(transitive)
- Removedis-arrayish@0.2.1(transitive)
- Removedis-core-module@2.16.1(transitive)
- Removedis-finite@1.1.0(transitive)
- Removedis-utf8@0.2.1(transitive)
- Removedload-json-file@1.1.0(transitive)
- Removedlogalot@2.1.0(transitive)
- Removedlongest@1.0.1(transitive)
- Removedloud-rejection@1.6.0(transitive)
- Removedlpad-align@1.1.2(transitive)
- Removedmap-obj@1.0.1(transitive)
- Removedmeow@3.7.0(transitive)
- Removedminimist@1.2.8(transitive)
- Removedmozjpeg@6.0.1(transitive)
- Removednormalize-package-data@2.5.0(transitive)
- Removedparse-json@2.2.0(transitive)
- Removedpath-exists@2.1.0(transitive)
- Removedpath-parse@1.0.7(transitive)
- Removedpath-type@1.1.0(transitive)
- Removedread-pkg@1.1.0(transitive)
- Removedread-pkg-up@1.0.1(transitive)
- Removedredent@1.0.0(transitive)
- Removedrepeating@2.0.1(transitive)
- Removedresolve@1.22.10(transitive)
- Removedspdx-correct@3.2.0(transitive)
- Removedspdx-exceptions@2.5.0(transitive)
- Removedspdx-expression-parse@3.0.1(transitive)
- Removedspdx-license-ids@3.0.20(transitive)
- Removedsqueak@1.3.0(transitive)
- Removedstrip-ansi@3.0.1(transitive)
- Removedstrip-bom@2.0.0(transitive)
- Removedstrip-indent@1.0.1(transitive)
- Removedsupports-color@2.0.0(transitive)
- Removedsupports-preserve-symlinks-flag@1.0.0(transitive)
- Removedtrim-newlines@1.0.0(transitive)
- Removedvalidate-npm-package-license@3.0.4(transitive)
Updatedexeca@^4.0.0
Updatedmozjpeg@^7.0.0