Comparing version 6.0.1 to 7.0.0
'use strict'; | ||
const os = require('os'); | ||
const path = require('path'); | ||
const binBuild = require('bin-build'); | ||
@@ -7,7 +8,7 @@ const log = require('logalot'); | ||
const cpuNum = os.cpus().length; | ||
const cpuNumber = os.cpus().length; | ||
bin.run(['-version']).then(() => { | ||
log.success('mozjpeg pre-build test passed successfully'); | ||
}).catch(error => { | ||
}).catch(async error => { | ||
log.warn(error.message); | ||
@@ -27,12 +28,17 @@ log.warn('mozjpeg pre-build test failed'); | ||
binBuild.url('https://github.com/mozilla/mozjpeg/releases/download/v3.2/mozjpeg-3.2-release-source.tar.gz', [ | ||
'autoreconf -fiv', | ||
cfg, | ||
`make -j${cpuNum}`, | ||
`make install -j${cpuNum}` | ||
]).then(() => { | ||
try { | ||
await binBuild.file(path.resolve(__dirname, '../vendor/source/mozjpeg.tar.gz'), [ | ||
'autoreconf -fiv', | ||
cfg, | ||
`make -j${cpuNumber}`, | ||
`make install -j${cpuNumber}` | ||
]); | ||
log.success('mozjpeg built successfully'); | ||
}).catch(error => { | ||
} catch (error) { | ||
log.error(error.stack); | ||
}); | ||
// eslint-disable-next-line unicorn/no-process-exit | ||
process.exit(1); | ||
} | ||
}); |
{ | ||
"name": "mozjpeg", | ||
"version": "6.0.1", | ||
"version": "7.0.0", | ||
"description": "mozjpeg wrapper that makes it seamlessly available as a local dependency", | ||
@@ -9,7 +9,7 @@ "license": "MIT", | ||
"engines": { | ||
"node": ">=6" | ||
"node": ">=10" | ||
}, | ||
"scripts": { | ||
"postinstall": "node lib/install.js", | ||
"test": "xo && ava", | ||
"test": "xo && ava --timeout=120s", | ||
"build-linux": "docker build --tag imagemin/mozjpeg docker && docker run --rm --volume $(pwd)/vendor/linux:/src/out imagemin/mozjpeg cp cjpeg /src/out" | ||
@@ -20,3 +20,4 @@ }, | ||
"cli.js", | ||
"lib" | ||
"lib", | ||
"vendor/source" | ||
], | ||
@@ -40,8 +41,8 @@ "keywords": [ | ||
"devDependencies": { | ||
"ava": "*", | ||
"ava": "^3.8.0", | ||
"bin-check": "^4.1.0", | ||
"compare-size": "^3.0.0", | ||
"execa": "^1.0.0", | ||
"tempy": "^0.2.1", | ||
"xo": "*" | ||
"execa": "^4.0.0", | ||
"tempy": "^0.5.0", | ||
"xo": "^0.30.0" | ||
}, | ||
@@ -48,0 +49,0 @@ "ava": { |
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
Native code
Supply chain riskContains native code (e.g., compiled binaries or shared libraries). Including native code can obscure malicious behavior.
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
1637964
8
55