diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b337e0bd..cd683859 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.14" + container: "emscripten/emsdk:4.0.18" steps: - uses: actions/checkout@v4 - name: Dependencies diff --git a/biome.json b/biome.json index 2a79d5ed..a7d41490 100644 --- a/biome.json +++ b/biome.json @@ -1,5 +1,5 @@ { - "$schema": "https://biomejs.dev/schemas/2.2.6/schema.json", + "$schema": "https://biomejs.dev/schemas/2.3.2/schema.json", "vcs": { "enabled": true, "clientKind": "git", diff --git a/docs/src/content/docs/changelog/v0.34.5.md b/docs/src/content/docs/changelog/v0.34.5.md index 0c4a936a..8cfca9c9 100644 --- a/docs/src/content/docs/changelog/v0.34.5.md +++ b/docs/src/content/docs/changelog/v0.34.5.md @@ -3,6 +3,8 @@ title: v0.34.5 - TBD slug: changelog/v0.34.5 --- +* Upgrade to libvips v8.17.3 for upstream bug fixes. + * Add experimental support for prebuilt Linux RISC-V 64-bit binaries. * Support building from source with npm v12+, deprecate `--build-from-source` flag. diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index da5ee34b..f056b3bd 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.3" + "@img/sharp-libvips-darwin-arm64": "1.2.4" }, "files": [ "lib" diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index 835d80a0..cdf02fe0 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.3" + "@img/sharp-libvips-darwin-x64": "1.2.4" }, "files": [ "lib" diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index 4872f357..d32dc06b 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.3" + "@img/sharp-libvips-linux-arm": "1.2.4" }, "files": [ "lib" diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index 32076414..bd2c4587 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.3" + "@img/sharp-libvips-linux-arm64": "1.2.4" }, "files": [ "lib" diff --git a/npm/linux-ppc64/package.json b/npm/linux-ppc64/package.json index 7db2e1e7..8a2e183c 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.3" + "@img/sharp-libvips-linux-ppc64": "1.2.4" }, "files": [ "lib" diff --git a/npm/linux-riscv64/package.json b/npm/linux-riscv64/package.json index dc367735..076d2cdf 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.3" + "@img/sharp-libvips-linux-riscv64": "1.2.4" }, "files": [ "lib" diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index ff0f657d..6ba8a455 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.3" + "@img/sharp-libvips-linux-s390x": "1.2.4" }, "files": [ "lib" diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index 20996aab..e613ddfa 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.3" + "@img/sharp-libvips-linux-x64": "1.2.4" }, "files": [ "lib" diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index da27e8ad..3ab8537e 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.3" + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" }, "files": [ "lib" diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index 3d218061..83f7027d 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.3" + "@img/sharp-libvips-linuxmusl-x64": "1.2.4" }, "files": [ "lib" diff --git a/npm/wasm32/package.json b/npm/wasm32/package.json index f6a40247..f4fc25fd 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.5.0" + "@emnapi/runtime": "^1.6.0" }, "cpu": [ "wasm32" diff --git a/package.json b/package.json index 3f00bc09..da083a49 100644 --- a/package.json +++ b/package.json @@ -146,16 +146,16 @@ "optionalDependencies": { "@img/sharp-darwin-arm64": "0.34.4", "@img/sharp-darwin-x64": "0.34.4", - "@img/sharp-libvips-darwin-arm64": "1.2.3", - "@img/sharp-libvips-darwin-x64": "1.2.3", - "@img/sharp-libvips-linux-arm": "1.2.3", - "@img/sharp-libvips-linux-arm64": "1.2.3", - "@img/sharp-libvips-linux-ppc64": "1.2.3", - "@img/sharp-libvips-linux-riscv64": "1.2.3", - "@img/sharp-libvips-linux-s390x": "1.2.3", - "@img/sharp-libvips-linux-x64": "1.2.3", - "@img/sharp-libvips-linuxmusl-arm64": "1.2.3", - "@img/sharp-libvips-linuxmusl-x64": "1.2.3", + "@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-linux-arm": "0.34.4", "@img/sharp-linux-arm64": "0.34.4", "@img/sharp-linux-ppc64": "0.34.4", @@ -170,16 +170,16 @@ "@img/sharp-win32-x64": "0.34.4" }, "devDependencies": { - "@biomejs/biome": "^2.2.6", + "@biomejs/biome": "^2.3.2", "@cpplint/cli": "^0.1.0", - "@emnapi/runtime": "^1.5.0", - "@img/sharp-libvips-dev": "1.2.3", - "@img/sharp-libvips-dev-wasm32": "1.2.3", - "@img/sharp-libvips-win32-arm64": "1.2.3", - "@img/sharp-libvips-win32-ia32": "1.2.3", - "@img/sharp-libvips-win32-x64": "1.2.3", + "@emnapi/runtime": "^1.6.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", "@types/node": "*", - "emnapi": "^1.5.0", + "emnapi": "^1.6.0", "exif-reader": "^2.0.2", "extract-zip": "^2.0.1", "icc": "^3.0.0", @@ -194,7 +194,7 @@ "node": "^18.17.0 || ^20.3.0 || >=21.0.0" }, "config": { - "libvips": ">=8.17.2" + "libvips": ">=8.17.3" }, "funding": { "url": "https://opencollective.com/libvips" diff --git a/src/common.h b/src/common.h index 16c07fc7..c15755bb 100644 --- a/src/common.h +++ b/src/common.h @@ -19,8 +19,8 @@ #if (VIPS_MAJOR_VERSION < 8) || \ (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 17) || \ - (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 2) -#error "libvips version 8.17.2+ is required - please see https://sharp.pixelplumbing.com/install" + (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" #endif #if defined(__has_include) diff --git a/src/operations.h b/src/operations.h index 6582459c..c281c02c 100644 --- a/src/operations.h +++ b/src/operations.h @@ -1,5 +1,7 @@ -// Copyright 2013 Lovell Fuller and others. -// SPDX-License-Identifier: Apache-2.0 +/*! + Copyright 2013 Lovell Fuller and others. + SPDX-License-Identifier: Apache-2.0 +*/ #ifndef SRC_OPERATIONS_H_ #define SRC_OPERATIONS_H_ diff --git a/test/unit/failOn.js b/test/unit/failOn.js index 460b53a1..f5579148 100644 --- a/test/unit/failOn.js +++ b/test/unit/failOn.js @@ -109,7 +109,7 @@ describe('failOn', () => { it('converts warnings to error for GeoTIFF', async () => { await assert.rejects( sharp(fixtures.inputTiffGeo).toBuffer(), - /Unknown field with tag 33550/ + /Tag 34737/ ); }); }); diff --git a/test/unit/libvips.js b/test/unit/libvips.js index ee0c4f1d..6cab3cce 100644 --- a/test/unit/libvips.js +++ b/test/unit/libvips.js @@ -180,7 +180,7 @@ describe('libvips binaries', function () { process.env.npm_config_arch = 's390x'; process.env.npm_config_libc = ''; const locatorHash = libvips.yarnLocator(); - assert.strictEqual(locatorHash, '7c141893d6'); + assert.strictEqual(locatorHash, '4ab19140fd'); delete process.env.npm_config_platform; delete process.env.npm_config_arch; delete process.env.npm_config_libc; diff --git a/test/unit/metadata.js b/test/unit/metadata.js index 5ad41e20..75a6919c 100644 --- a/test/unit/metadata.js +++ b/test/unit/metadata.js @@ -1013,13 +1013,23 @@ describe('Image metadata', function () { }); }); - it('Unsupported lossless JPEG passes underlying error message', function (_t, done) { - sharp(fixtures.inputJpgLossless) - .metadata(function (err) { - assert.strictEqual(true, !!err); - assert.strictEqual(true, /Input file has corrupt header: VipsJpeg: Unsupported JPEG process: SOF type 0xc3/.test(err.message)); - done(); - }); + it('Lossless JPEG', async () => { + const metadata = await sharp(fixtures.inputJpgLossless).metadata(); + assert.deepStrictEqual(metadata, { + format: 'jpeg', + width: 227, + height: 149, + space: 'srgb', + channels: 3, + depth: 'uchar', + density: 72, + chromaSubsampling: '4:4:4', + isProgressive: false, + isPalette: false, + hasProfile: false, + hasAlpha: false, + autoOrient: { width: 227, height: 149 } + }); }); it('keepExif maintains all EXIF metadata', async () => {