Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
options.maxConcurrency || Math.max(1, cpus.length - 1)
);
let cacheDir = null;
let imageminVersion = null;
let packageVersion = null;
if (options.cache) {
cacheDir =
options.cache === true
? findCacheDir({ name: "imagemin-webpack" }) || os.tmpdir()
: options.cache;
try {
// eslint-disable-next-line global-require
imageminVersion = require("imagemin/package.json").version;
} catch (ignoreError) {
/* istanbul ignore next */
imageminVersion = "unknown";
// Nothing
}
try {
// eslint-disable-next-line global-require
packageVersion = require("../package.json").version;
} catch (ignoreError) {
/* istanbul ignore next */
packageVersion = "unknown";
// Nothing
}
}