diff --git a/docs/install.md b/docs/install.md index b170f2092..503feda65 100644 --- a/docs/install.md +++ b/docs/install.md @@ -92,7 +92,7 @@ Use the [supportedArchitectures](https://pnpm.io/package_json#pnpmsupportedarchi ## Custom libvips To use a custom, globally-installed version of libvips instead of the provided binaries, -make sure it is at least the version listed under `engines.libvips` in the `package.json` file +make sure it is at least the version listed under `config.libvips` in the `package.json` file and that it can be located using `pkg-config --modversion vips-cpp`. For help compiling libvips and its dependencies, please see diff --git a/lib/libvips.js b/lib/libvips.js index d509650dc..c9927e7a9 100644 --- a/lib/libvips.js +++ b/lib/libvips.js @@ -10,10 +10,10 @@ const semverGreaterThanOrEqualTo = require('semver/functions/gte'); const semverSatisfies = require('semver/functions/satisfies'); const detectLibc = require('detect-libc'); -const { engines, optionalDependencies } = require('../package.json'); +const { config, engines, optionalDependencies } = require('../package.json'); const minimumLibvipsVersionLabelled = process.env.npm_package_config_libvips || /* istanbul ignore next */ - engines.libvips; + config.libvips; const minimumLibvipsVersion = semverCoerce(minimumLibvipsVersionLabelled).version; const prebuiltPlatforms = [ diff --git a/lib/sharp.js b/lib/sharp.js index 44c7463a1..5b5ef3889 100644 --- a/lib/sharp.js +++ b/lib/sharp.js @@ -73,9 +73,9 @@ if (sharp) { } if (isLinux && /(symbol not found|CXXABI_)/i.test(messages)) { try { - const { engines } = require(`@img/sharp-libvips-${runtimePlatform}/package`); + const { config } = require(`@img/sharp-libvips-${runtimePlatform}/package`); const libcFound = `${familySync()} ${versionSync()}`; - const libcRequires = `${engines.musl ? 'musl' : 'glibc'} ${engines.musl || engines.glibc}`; + const libcRequires = `${config.musl ? 'musl' : 'glibc'} ${config.musl || config.glibc}`; help.push( '- Update your OS:', ` Found ${libcFound}`, diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index 3705505f1..ce3e2168b 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -29,11 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", - "glibc": ">=2.26" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "os": [ "darwin" diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index cefd0db43..4f07715e3 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -29,11 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", - "glibc": ">=2.26" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "os": [ "darwin" diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index ec9959c98..2425ed9a9 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/package.json @@ -29,11 +29,10 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", - "glibc": ">=2.28" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "config": { + "glibc": ">=2.31" }, "os": [ "linux" diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index ad3bfede0..de23630bd 100644 --- a/npm/linux-arm64/package.json +++ b/npm/linux-arm64/package.json @@ -29,10 +29,9 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "config": { "glibc": ">=2.26" }, "os": [ diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index ed5a0ea7c..383b8baff 100644 --- a/npm/linux-s390x/package.json +++ b/npm/linux-s390x/package.json @@ -29,10 +29,9 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "config": { "glibc": ">=2.31" }, "os": [ diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index 658947f8a..a590f0a62 100644 --- a/npm/linux-x64/package.json +++ b/npm/linux-x64/package.json @@ -29,10 +29,9 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "config": { "glibc": ">=2.26" }, "os": [ diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index f5843a47d..ea91509ad 100644 --- a/npm/linuxmusl-arm64/package.json +++ b/npm/linuxmusl-arm64/package.json @@ -29,10 +29,9 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "config": { "musl": ">=1.2.2" }, "os": [ diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index 705d4c2ff..f0e450f28 100644 --- a/npm/linuxmusl-x64/package.json +++ b/npm/linuxmusl-x64/package.json @@ -29,10 +29,9 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "config": { "musl": ">=1.2.2" }, "os": [ diff --git a/npm/wasm32/package.json b/npm/wasm32/package.json index 6414f3f36..ff94af67a 100644 --- a/npm/wasm32/package.json +++ b/npm/wasm32/package.json @@ -28,10 +28,7 @@ "./versions": "./versions.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "dependencies": { "@emnapi/runtime": "^1.2.0" diff --git a/npm/win32-ia32/package.json b/npm/win32-ia32/package.json index 2eb64a847..5c25d329f 100644 --- a/npm/win32-ia32/package.json +++ b/npm/win32-ia32/package.json @@ -28,10 +28,7 @@ "./versions": "./versions.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "os": [ "win32" diff --git a/npm/win32-x64/package.json b/npm/win32-x64/package.json index e6018639c..2e8a56811 100644 --- a/npm/win32-x64/package.json +++ b/npm/win32-x64/package.json @@ -28,10 +28,7 @@ "./versions": "./versions.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", - "npm": ">=9.6.5", - "yarn": ">=3.2.0", - "pnpm": ">=7.1.0" + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "os": [ "win32" diff --git a/package.json b/package.json index 3ea1b0737..39f2e75f6 100644 --- a/package.json +++ b/package.json @@ -187,7 +187,9 @@ }, "license": "Apache-2.0", "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0", + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "config": { "libvips": ">=8.15.3" }, "funding": {