From 34c39fa194e7b8179a405e779ea2d9b9c90e9a4e Mon Sep 17 00:00:00 2001 From: Lovell Fuller Date: Wed, 17 Dec 2025 13:26:51 +0000 Subject: [PATCH] Upgrade to libvips v8.18.0-rc.2 --- .github/workflows/ci.yml | 2 +- biome.json | 2 +- docs/src/content/docs/changelog/v0.35.0.md | 6 ++++ 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-riscv64/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 +- npm/wasm32/package.json | 2 +- package.json | 40 +++++++++++----------- src/common.h | 6 ++-- test/unit/libvips.js | 2 +- test/unit/png.js | 3 +- 18 files changed, 44 insertions(+), 39 deletions(-) create mode 100644 docs/src/content/docs/changelog/v0.35.0.md diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index cd683859..0f8bb90a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -291,7 +291,7 @@ jobs: needs: lint name: "build-wasm32 [package]" runs-on: ubuntu-24.04 - container: "emscripten/emsdk:4.0.18" + container: "emscripten/emsdk:4.0.21" steps: - uses: actions/checkout@v4 - name: Dependencies diff --git a/biome.json b/biome.json index 7946049c..21142e39 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.3.4/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.9/schema.json", "vcs": { "enabled": true, "clientKind": "git", diff --git a/docs/src/content/docs/changelog/v0.35.0.md b/docs/src/content/docs/changelog/v0.35.0.md new file mode 100644 index 00000000..7262ae14 --- /dev/null +++ b/docs/src/content/docs/changelog/v0.35.0.md @@ -0,0 +1,6 @@ +--- +title: v0.35.0 - TBC +slug: changelog/v0.35.0 +--- + +* Upgrade to libvips v8.18.0 for upstream bug fixes. diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index df6b34a9..dc539c05 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.2.4" + "@img/sharp-libvips-darwin-arm64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index 147d109d..8df6f925 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.2.4" + "@img/sharp-libvips-darwin-x64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index cd4d5a2b..db200ada 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.2.4" + "@img/sharp-libvips-linux-arm": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index b373bb92..c9254cdb 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.2.4" + "@img/sharp-libvips-linux-arm64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-ppc64/package.json b/npm/linux-ppc64/package.json index db2b62c0..488fbd4a 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.2.4" + "@img/sharp-libvips-linux-ppc64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-riscv64/package.json b/npm/linux-riscv64/package.json index 9f0e9520..98b0c3b7 100644 --- a/npm/linux-riscv64/package.json +++ b/npm/linux-riscv64/package.json @@ -15,7 +15,7 @@ }, "preferUnplugged": true, "optionalDependencies": { - "@img/sharp-libvips-linux-riscv64": "1.2.4" + "@img/sharp-libvips-linux-riscv64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index 423692ed..2bf9eb70 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.2.4" + "@img/sharp-libvips-linux-s390x": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index 95a8a035..a528c9aa 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.2.4" + "@img/sharp-libvips-linux-x64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index 5e214bf1..ce26f31b 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.2.4" + "@img/sharp-libvips-linuxmusl-arm64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index 8be92db0..c38bd238 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.2.4" + "@img/sharp-libvips-linuxmusl-x64": "1.3.0-rc.1" }, "files": [ "lib" diff --git a/npm/wasm32/package.json b/npm/wasm32/package.json index d5775bec..4e3c01cc 100644 --- a/npm/wasm32/package.json +++ b/npm/wasm32/package.json @@ -31,7 +31,7 @@ "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "dependencies": { - "@emnapi/runtime": "^1.7.0" + "@emnapi/runtime": "^1.7.1" }, "cpu": [ "wasm32" diff --git a/package.json b/package.json index 0c0d0098..6e06bf54 100644 --- a/package.json +++ b/package.json @@ -146,16 +146,16 @@ "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.5", "@img/sharp-darwin-x64": "0.34.5", - "@img/sharp-libvips-darwin-arm64": "1.2.4", - "@img/sharp-libvips-darwin-x64": "1.2.4", - "@img/sharp-libvips-linux-arm": "1.2.4", - "@img/sharp-libvips-linux-arm64": "1.2.4", - "@img/sharp-libvips-linux-ppc64": "1.2.4", - "@img/sharp-libvips-linux-riscv64": "1.2.4", - "@img/sharp-libvips-linux-s390x": "1.2.4", - "@img/sharp-libvips-linux-x64": "1.2.4", - "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", - "@img/sharp-libvips-linuxmusl-x64": "1.2.4", + "@img/sharp-libvips-darwin-arm64": "1.3.0-rc.1", + "@img/sharp-libvips-darwin-x64": "1.3.0-rc.1", + "@img/sharp-libvips-linux-arm": "1.3.0-rc.1", + "@img/sharp-libvips-linux-arm64": "1.3.0-rc.1", + "@img/sharp-libvips-linux-ppc64": "1.3.0-rc.1", + "@img/sharp-libvips-linux-riscv64": "1.3.0-rc.1", + "@img/sharp-libvips-linux-s390x": "1.3.0-rc.1", + "@img/sharp-libvips-linux-x64": "1.3.0-rc.1", + "@img/sharp-libvips-linuxmusl-arm64": "1.3.0-rc.1", + "@img/sharp-libvips-linuxmusl-x64": "1.3.0-rc.1", "@img/sharp-linux-arm": "0.34.5", "@img/sharp-linux-arm64": "0.34.5", "@img/sharp-linux-ppc64": "0.34.5", @@ -170,17 +170,17 @@ "@img/sharp-win32-x64": "0.34.5" }, "devDependencies": { - "@biomejs/biome": "^2.3.4", + "@biomejs/biome": "^2.3.9", "@cpplint/cli": "^0.1.0", - "@emnapi/runtime": "^1.7.0", - "@img/sharp-libvips-dev": "1.2.4", - "@img/sharp-libvips-dev-wasm32": "1.2.4", - "@img/sharp-libvips-win32-arm64": "1.2.4", - "@img/sharp-libvips-win32-ia32": "1.2.4", - "@img/sharp-libvips-win32-x64": "1.2.4", + "@emnapi/runtime": "^1.7.1", + "@img/sharp-libvips-dev": "1.3.0-rc.1", + "@img/sharp-libvips-dev-wasm32": "1.3.0-rc.1", + "@img/sharp-libvips-win32-arm64": "1.3.0-rc.1", + "@img/sharp-libvips-win32-ia32": "1.3.0-rc.1", + "@img/sharp-libvips-win32-x64": "1.3.0-rc.1", "@types/node": "*", - "emnapi": "^1.7.0", - "exif-reader": "^2.0.2", + "emnapi": "^1.7.1", + "exif-reader": "^2.0.3", "extract-zip": "^2.0.1", "icc": "^3.0.0", "jsdoc-to-markdown": "^9.1.3", @@ -194,7 +194,7 @@ "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "config": { - "libvips": ">=8.17.3" + "libvips": ">=8.18.0" }, "funding": { "url": "https://opencollective.com/libvips" diff --git a/src/common.h b/src/common.h index c15755bb..32418dd4 100644 --- a/src/common.h +++ b/src/common.h @@ -18,9 +18,9 @@ // Verify platform and compiler compatibility #if (VIPS_MAJOR_VERSION < 8) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 17) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 3) -#error "libvips version 8.17.3+ is required - please see https://sharp.pixelplumbing.com/install" + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 18) || \ + (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 18 && VIPS_MICRO_VERSION < 0) +#error "libvips version 8.18.0+ is required - please see https://sharp.pixelplumbing.com/install" #endif #if defined(__has_include) diff --git a/test/unit/libvips.js b/test/unit/libvips.js index 8ed82245..8992b355 100644 --- a/test/unit/libvips.js +++ b/test/unit/libvips.js @@ -180,7 +180,7 @@ describe('libvips binaries', () => { process.env.npm_config_arch = 's390x'; process.env.npm_config_libc = ''; const locatorHash = libvips.yarnLocator(); - assert.strictEqual(locatorHash, '4ab19140fd'); + assert.strictEqual(locatorHash, '8cdba194cb'); delete process.env.npm_config_platform; delete process.env.npm_config_arch; delete process.env.npm_config_libc; diff --git a/test/unit/png.js b/test/unit/png.js index 81800e1a..38cbc4eb 100644 --- a/test/unit/png.js +++ b/test/unit/png.js @@ -226,12 +226,11 @@ describe('PNG', () => { .png({ colours: 2, palette: false }) .toBuffer(); - const { channels, isPalette, bitsPerSample, paletteBitDepth, size, space } = await sharp(data).metadata(); + const { channels, isPalette, bitsPerSample, paletteBitDepth, space } = await sharp(data).metadata(); assert.strictEqual(channels, 1); assert.strictEqual(isPalette, false); assert.strictEqual(bitsPerSample, 1); assert.strictEqual(paletteBitDepth, undefined); - assert.strictEqual(size, 89); assert.strictEqual(space, 'b-w'); });