Comparing version 0.7.2 to 0.8.0
{ | ||
"name": "impro", | ||
"version": "0.7.2", | ||
"version": "0.8.0", | ||
"description": "Image processing engine", | ||
@@ -24,3 +24,4 @@ "author": "Andreas Lind <andreaslindpetersen@gmail.com>", | ||
"clean": "rm -rf lib coverage .nyc_output", | ||
"travis": "npm run lint && npm run coverage" | ||
"travis": "npm run lint && npm run coverage", | ||
"version": "offline-github-changelog --next=${npm_package_version} > CHANGELOG.md && git add CHANGELOG.md" | ||
}, | ||
@@ -42,3 +43,3 @@ "devDependencies": { | ||
"gm-papandreou": "1.23.0-patch1", | ||
"inkscape": "1.1.0", | ||
"inkscape": "3.0.0", | ||
"jpegtran": "1.0.6", | ||
@@ -49,2 +50,3 @@ "jsdom": "^15.1.1", | ||
"nyc": "^14.1.1", | ||
"offline-github-changelog": "^1.7.0", | ||
"optipng": "2.1.0", | ||
@@ -54,3 +56,3 @@ "pngcrush": "2.0.1", | ||
"prettier": "~1.19.0", | ||
"sharp": "~0.23.0", | ||
"sharp": "~0.26.0", | ||
"sinon": "1.17.7", | ||
@@ -57,0 +59,0 @@ "svgfilter": "3.0.0", |
@@ -18,13 +18,9 @@ const requireOr = require('require-or'); | ||
(operations[0] && operations[0].commandLineArgs) || []; | ||
if (outputFormat === 'pdf') { | ||
commandLineArgs.push('--export-pdf'); | ||
} else if (outputFormat === 'eps') { | ||
commandLineArgs.push('--export-eps'); | ||
} else if (!outputFormat || outputFormat === 'png') { | ||
if (!outputFormat || outputFormat === 'png') { | ||
pipeline.targetType = 'png'; | ||
pipeline.targetContentType = 'image/png'; | ||
commandLineArgs.push('--export-png'); | ||
} | ||
commandLineArgs.push(`--export-type=${outputFormat}`); | ||
pipeline._attach(new Inkscape(commandLineArgs)); | ||
} | ||
}; |
@@ -41,2 +41,3 @@ const requireOr = require('require-or'); | ||
name: 'sharp', | ||
library: sharp, | ||
unavailable: !sharp, | ||
@@ -283,12 +284,11 @@ operations: [ | ||
let sharpInstance = sharp(undefined, options); | ||
// ensure at least one option is present | ||
options = { failOnError: true, ...options }; | ||
if (pipeline.options.maxInputPixels) { | ||
sharpInstance = sharpInstance.limitInputPixels( | ||
pipeline.options.maxInputPixels | ||
); | ||
options.limitInputPixels = pipeline.options.maxInputPixels; | ||
} | ||
if (options.sequentialRead) { | ||
sharpInstance = sharpInstance.sequentialRead(); | ||
} | ||
const sharpInstance = module.exports.library(options); | ||
operationsForExecution.map(({ name, args }) => | ||
@@ -295,0 +295,0 @@ sharpInstance[name](...args) |
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
79913
21
34
1788