Comparing version 0.10.0 to 0.11.0
{ | ||
"name": "impro", | ||
"version": "0.10.0", | ||
"version": "0.11.0", | ||
"description": "Image processing engine", | ||
@@ -5,0 +5,0 @@ "author": "Andreas Lind <andreaslindpetersen@gmail.com>", |
@@ -161,2 +161,12 @@ const errors = require('../errors'); | ||
const cache = pipeline.options.sharpCache || options.cache; | ||
const failOnError = (() => { | ||
// TODO: Switch to using "Nullish coalescing operator (??)" once only Node.js 14 onwards are supported | ||
if (typeof pipeline.options.sharpFailOnError !== 'undefined') { | ||
return pipeline.options.sharpFailOnError; | ||
} else if (typeof options.failOnError !== 'undefined') { | ||
return options.failOnError; | ||
} else { | ||
return true; | ||
} | ||
})(); | ||
// Would make sense to move the _sharpCacheSet property to the type, but that breaks some test scenarios: | ||
@@ -284,3 +294,3 @@ if (cache !== 'undefined' && !impro._sharpCacheSet) { | ||
// ensure at least one option is present | ||
options = { failOnError: true, ...options }; | ||
options = { failOnError, ...options }; | ||
@@ -287,0 +297,0 @@ if (pipeline.options.maxInputPixels) { |
@@ -33,2 +33,3 @@ const Pipeline = require('./Pipeline'); | ||
'svgAssetPath', | ||
'sharpFailOnError', | ||
]; | ||
@@ -35,0 +36,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
83492
23
1816