diff --git a/docs/install.md b/docs/install.md index 317895d32..45e19ae66 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 bc4d41fa1..cfd190282 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 e0ba7d3e5..014a971d4 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 4f6b6901b..3e01f2558 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/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.28" }, "os": [ diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index 8b7de50ef..9eb2092d4 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 dd0869a20..1e03f2f8d 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 66ac40fac..b2eb85941 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 c04ecd1f0..5f28b5710 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 4080277dd..2ddc03842 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 a58fc4edc..cb45b79b1 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.2" }, "funding": {