Upgrade to libvips v8.7.0

Drop Node 4 support
Add experimental musl prebuild for Node 8 and 10
This commit is contained in:
Lovell Fuller
2018-09-19 21:38:09 +01:00
parent 4cff62258c
commit c8ff7e11a9
25 changed files with 500 additions and 411 deletions

View File

@@ -44,10 +44,16 @@ const globalLibvipsVersion = function () {
const hasVendoredLibvips = function () {
const currentPlatformId = platform();
const vendorPath = path.join(__dirname, '..', 'vendor');
let vendorVersionId;
let vendorPlatformId;
try {
vendorPlatformId = require(path.join(__dirname, '..', 'vendor', 'platform.json'));
vendorVersionId = require(path.join(vendorPath, 'versions.json')).vips;
vendorPlatformId = require(path.join(vendorPath, 'platform.json'));
} catch (err) {}
if (vendorVersionId && vendorVersionId !== minimumLibvipsVersion) {
throw new Error(`Found vendored libvips v${vendorVersionId} but require v${minimumLibvipsVersion}. Please remove the 'node_modules/sharp/vendor' directory and run 'npm install'.`);
}
if (vendorPlatformId) {
if (currentPlatformId === vendorPlatformId) {
return true;