From 99be893dd4908f72eb8d824a9a8184ae1416cb32 Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Thu, 12 Jun 2025 11:27:26 +0100 Subject: [PATCH] Upgrade to libvips v8.17.0 CI: Use more recent, non-deprecated Windows runners Bump devDeps --- .github/workflows/ci.yml | 12 +++++------ .github/workflows/npm.yml | 12 +++++------ docs/src/content/docs/changelog.md | 10 ++++++++- npm/darwin-arm64/package.json | 2 +- npm/darwin-x64/package.json | 2 +- npm/linux-arm/package.json | 2 +- npm/linux-arm64/package.json | 2 +- npm/linux-ppc64/package.json | 2 +- npm/linux-s390x/package.json | 2 +- npm/linux-x64/package.json | 2 +- npm/linuxmusl-arm64/package.json | 2 +- npm/linuxmusl-x64/package.json | 2 +- package.json | 34 +++++++++++++++--------------- src/common.h | 6 +++--- src/sharp.cc | 6 ++++-- test/unit/libvips.js | 2 +- 16 files changed, 55 insertions(+), 45 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 53b5e12d..a445d3fe 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -78,34 +78,34 @@ jobs: nodejs_version: "^22.9.0" nodejs_version_major: 22 platform: darwin-arm64 - - os: windows-2019 + - os: windows-2022 nodejs_arch: x86 nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10 nodejs_version_major: 18 platform: win32-ia32 prebuild: true - - os: windows-2019 + - os: windows-2022 nodejs_arch: x86 nodejs_version: "^20.3.0" nodejs_version_major: 20 platform: win32-ia32 - - os: windows-2019 + - os: windows-2022 nodejs_arch: x86 nodejs_version: "^22.9.0" nodejs_version_major: 22 platform: win32-ia32 - - os: windows-2019 + - os: windows-2022 nodejs_arch: x64 nodejs_version: "^18.17.0" nodejs_version_major: 18 platform: win32-x64 prebuild: true - - os: windows-2019 + - os: windows-2022 nodejs_arch: x64 nodejs_version: "^20.3.0" nodejs_version_major: 20 platform: win32-x64 - - os: windows-2019 + - os: windows-2022 nodejs_arch: x64 nodejs_version: "^22.9.0" nodejs_version_major: 22 diff --git a/.github/workflows/npm.yml b/.github/workflows/npm.yml index f7491671..25286b45 100644 --- a/.github/workflows/npm.yml +++ b/.github/workflows/npm.yml @@ -70,27 +70,27 @@ jobs: runtime: bun - name: win32-x64-node-npm - runs-on: windows-2019 + runs-on: windows-2022 runtime: node package-manager: npm - name: win32-x64-node-pnpm - runs-on: windows-2019 + runs-on: windows-2022 runtime: node package-manager: pnpm - name: win32-x64-node-yarn - runs-on: windows-2019 + runs-on: windows-2022 runtime: node package-manager: yarn - name: win32-x64-node-yarn-pnp - runs-on: windows-2019 + runs-on: windows-2022 runtime: node package-manager: yarn-pnp - name: win32-x64-node-yarn-v1 - runs-on: windows-2019 + runs-on: windows-2022 runtime: node package-manager: yarn-v1 - name: win32-x64-deno - runs-on: windows-2019 + runs-on: windows-2022 runtime: deno steps: diff --git a/docs/src/content/docs/changelog.md b/docs/src/content/docs/changelog.md index b9cbc7b6..191a0a72 100644 --- a/docs/src/content/docs/changelog.md +++ b/docs/src/content/docs/changelog.md @@ -4,7 +4,15 @@ title: Changelog ## v0.34 - *hat* -Requires libvips v8.16.1 +Requires libvips v8.17.0 + +### v0.34.3 - TBD + +* Upgrade to libvips v8.17.0 for upstream bug fixes. + +* Support composite operation with non-sRGB pipeline colourspace. + [#4412](https://github.com/lovell/sharp/pull/4412) + [@kleisauke](https://github.com/kleisauke) ### v0.34.2 - 20th May 2025 diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index 0132543e..e6bc6a35 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-darwin-arm64": "1.1.0" + "@img/sharp-libvips-darwin-arm64": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index 0161956a..307e4807 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-darwin-x64": "1.1.0" + "@img/sharp-libvips-darwin-x64": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index f0352510..ff69b01e 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-arm": "1.1.0" + "@img/sharp-libvips-linux-arm": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index 9142b138..a11592b6 100644 --- a/npm/linux-arm64/package.json +++ b/npm/linux-arm64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-arm64": "1.1.0" + "@img/sharp-libvips-linux-arm64": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-ppc64/package.json b/npm/linux-ppc64/package.json index 72fd443c..73b682de 100644 --- a/npm/linux-ppc64/package.json +++ b/npm/linux-ppc64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-ppc64": "1.1.0" + "@img/sharp-libvips-linux-ppc64": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index d4a88937..5f0f4a7f 100644 --- a/npm/linux-s390x/package.json +++ b/npm/linux-s390x/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-s390x": "1.1.0" + "@img/sharp-libvips-linux-s390x": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index 768a0f2f..df68dbfd 100644 --- a/npm/linux-x64/package.json +++ b/npm/linux-x64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-x64": "1.1.0" + "@img/sharp-libvips-linux-x64": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index 55ca0cf7..2b9997f0 100644 --- a/npm/linuxmusl-arm64/package.json +++ b/npm/linuxmusl-arm64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-arm64": "1.1.0" + "@img/sharp-libvips-linuxmusl-arm64": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index 9f591441..68be43ec 100644 --- a/npm/linuxmusl-x64/package.json +++ b/npm/linuxmusl-x64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linuxmusl-x64": "1.1.0" + "@img/sharp-libvips-linuxmusl-x64": "1.2.0-rc.1" }, "files": [ "lib" diff --git a/package.json b/package.json index 51a7069a..c3f6abf0 100644 --- a/package.json +++ b/package.json @@ -144,15 +144,15 @@ "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.2", "@img/sharp-darwin-x64": "0.34.2", - "@img/sharp-libvips-darwin-arm64": "1.1.0", - "@img/sharp-libvips-darwin-x64": "1.1.0", - "@img/sharp-libvips-linux-arm": "1.1.0", - "@img/sharp-libvips-linux-arm64": "1.1.0", - "@img/sharp-libvips-linux-ppc64": "1.1.0", - "@img/sharp-libvips-linux-s390x": "1.1.0", - "@img/sharp-libvips-linux-x64": "1.1.0", - "@img/sharp-libvips-linuxmusl-arm64": "1.1.0", - "@img/sharp-libvips-linuxmusl-x64": "1.1.0", + "@img/sharp-libvips-darwin-arm64": "1.2.0-rc.1", + "@img/sharp-libvips-darwin-x64": "1.2.0-rc.1", + "@img/sharp-libvips-linux-arm": "1.2.0-rc.1", + "@img/sharp-libvips-linux-arm64": "1.2.0-rc.1", + "@img/sharp-libvips-linux-ppc64": "1.2.0-rc.1", + "@img/sharp-libvips-linux-s390x": "1.2.0-rc.1", + "@img/sharp-libvips-linux-x64": "1.2.0-rc.1", + "@img/sharp-libvips-linuxmusl-arm64": "1.2.0-rc.1", + "@img/sharp-libvips-linuxmusl-x64": "1.2.0-rc.1", "@img/sharp-linux-arm": "0.34.2", "@img/sharp-linux-arm64": "0.34.2", "@img/sharp-linux-s390x": "0.34.2", @@ -166,11 +166,11 @@ }, "devDependencies": { "@emnapi/runtime": "^1.4.3", - "@img/sharp-libvips-dev": "1.1.0", - "@img/sharp-libvips-dev-wasm32": "1.1.0", - "@img/sharp-libvips-win32-arm64": "1.1.0", - "@img/sharp-libvips-win32-ia32": "1.1.0", - "@img/sharp-libvips-win32-x64": "1.1.0", + "@img/sharp-libvips-dev": "1.2.0-rc.1", + "@img/sharp-libvips-dev-wasm32": "1.2.0-rc.1", + "@img/sharp-libvips-win32-arm64": "1.2.0-rc.1", + "@img/sharp-libvips-win32-ia32": "1.2.0-rc.1", + "@img/sharp-libvips-win32-x64": "1.2.0-rc.1", "@types/node": "*", "cc": "^3.0.1", "emnapi": "^1.4.3", @@ -179,12 +179,12 @@ "icc": "^3.0.0", "jsdoc-to-markdown": "^9.1.1", "license-checker": "^25.0.1", - "mocha": "^11.4.0", + "mocha": "^11.6.0", "node-addon-api": "^8.3.1", "nyc": "^17.1.0", "prebuild": "^13.0.1", "semistandard": "^17.0.0", - "tar-fs": "^3.0.8", + "tar-fs": "^3.0.9", "tsd": "^0.32.0" }, "license": "Apache-2.0", @@ -192,7 +192,7 @@ "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "config": { - "libvips": ">=8.16.1" + "libvips": ">=8.17.0" }, "funding": { "url": "https://opencollective.com/libvips" diff --git a/src/common.h b/src/common.h index 1a61e47d..3031c629 100644 --- a/src/common.h +++ b/src/common.h @@ -15,9 +15,9 @@ // Verify platform and compiler compatibility #if (VIPS_MAJOR_VERSION < 8) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 16) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 16 && VIPS_MICRO_VERSION < 1) -#error "libvips version 8.16.1+ is required - please see https://sharp.pixelplumbing.com/install" + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 17) || \ + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 0) +#error "libvips version 8.17.0+ is required - please see https://sharp.pixelplumbing.com/install" #endif #if defined(__has_include) diff --git a/src/sharp.cc b/src/sharp.cc index ed54c501..f41ad14f 100644 --- a/src/sharp.cc +++ b/src/sharp.cc @@ -18,8 +18,10 @@ Napi::Object init(Napi::Env env, Napi::Object exports) { vips_init("sharp"); }); - g_log_set_handler("VIPS", static_cast(G_LOG_LEVEL_WARNING), - static_cast(sharp::VipsWarningCallback), nullptr); + for (auto domain : { "VIPS", "vips2tiff" }) { + g_log_set_handler(domain, static_cast(G_LOG_LEVEL_WARNING), + static_cast(sharp::VipsWarningCallback), nullptr); + } // Methods available to JavaScript exports.Set("metadata", Napi::Function::New(env, metadata)); diff --git a/test/unit/libvips.js b/test/unit/libvips.js index 5578ff42..d3c06079 100644 --- a/test/unit/libvips.js +++ b/test/unit/libvips.js @@ -179,7 +179,7 @@ describe('libvips binaries', function () { process.env.npm_config_arch = 's390x'; process.env.npm_config_libc = ''; const locatorHash = libvips.yarnLocator(); - assert.strictEqual(locatorHash, '9b2ea457de'); + assert.strictEqual(locatorHash, '3ee8908a2b'); delete process.env.npm_config_platform; delete process.env.npm_config_arch; delete process.env.npm_config_libc;