Comparing version 0.13.0 to 0.13.1
{ | ||
"name": "impro", | ||
"version": "0.13.0", | ||
"version": "0.13.1", | ||
"description": "Image processing engine", | ||
@@ -24,3 +24,3 @@ "author": "Andreas Lind <andreaslindpetersen@gmail.com>", | ||
"clean": "rm -rf lib coverage .nyc_output", | ||
"version": "offline-github-changelog --next=${npm_package_version} > CHANGELOG.md && git add CHANGELOG.md" | ||
"version": "offline-github-changelog --next=${npm_new_version} > CHANGELOG.md && git add CHANGELOG.md" | ||
}, | ||
@@ -48,3 +48,3 @@ "devDependencies": { | ||
"optipng": "2.1.0", | ||
"pngcrush": "2.0.1", | ||
"pngcrush": "^3.0.0", | ||
"pngquant": "3.0.0", | ||
@@ -57,3 +57,2 @@ "prettier": "~2.2.1", | ||
"unexpected-dom": "^5.0.0", | ||
"unexpected-image": "^4.0.0", | ||
"unexpected-resemble": "^5.0.0", | ||
@@ -60,0 +59,0 @@ "unexpected-sinon": "^11.0.1" |
@@ -185,3 +185,4 @@ const Stream = require('stream'); | ||
}, | ||
execute: function (pipeline, operations) { | ||
execute: function (pipeline, operations, options) { | ||
options = options || {}; | ||
const gmOperations = createGmOperations(pipeline, operations); | ||
@@ -202,3 +203,6 @@ | ||
let hasEnded = false; | ||
const gmInstance = gm( | ||
const Gm = options.imageMagick | ||
? gm.subClass({ imageMagick: '7+' }) | ||
: gm; | ||
const gmInstance = Gm( | ||
readStream, | ||
@@ -205,0 +209,0 @@ pipeline.sourceType && `.${pipeline.sourceType}` |
@@ -14,4 +14,2 @@ const requireOr = require('../requireOr'); | ||
case 'brute': | ||
case 'noreduce': | ||
case 'reduce': | ||
return args.length === 0; | ||
@@ -18,0 +16,0 @@ case 'rem': |
@@ -228,7 +228,14 @@ const Stream = require('stream'); | ||
stream.once('error', (err) => { | ||
const engineName = this.usedEngines[i].name; | ||
let commandArgs; | ||
if ( | ||
(commandArgs = err.commandArgs || this.usedEngines[i].commandArgs) | ||
) { | ||
const engineName = this.usedEngines[i].name; | ||
if (!(err instanceof Error)) { | ||
const messageForNonError = `${engineName} emitted non-Error (stream index ${i})`; | ||
err = new Error(messageForNonError); | ||
commandArgs = null; | ||
} else if (err.commandArgs) { | ||
commandArgs = err.commandArgs; | ||
} else { | ||
commandArgs = this.usedEngines[i].commandArgs; | ||
} | ||
if (commandArgs) { | ||
err.commandLine = `${engineName} ${commandArgs.join(' ')}`; | ||
@@ -359,3 +366,3 @@ } | ||
this._attach(stream); | ||
this.usedEngines.push({ name: '_stream' }); | ||
this.usedEngines.push({ name: '_stream', commandArgs: null }); | ||
return this; | ||
@@ -362,0 +369,0 @@ } |
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
69497
30
1837