Upgrade to libvips v8.17.3

This commit is contained in:
Lovell Fuller 2025-11-01 10:12:13 +00:00
parent 1f2f33d9a7
commit 040b73ca74
20 changed files with 59 additions and 45 deletions

View File

@ -291,7 +291,7 @@ jobs:
needs: lint needs: lint
name: "build-wasm32 [package]" name: "build-wasm32 [package]"
runs-on: ubuntu-24.04 runs-on: ubuntu-24.04
container: "emscripten/emsdk:4.0.14" container: "emscripten/emsdk:4.0.18"
steps: steps:
- uses: actions/checkout@v4 - uses: actions/checkout@v4
- name: Dependencies - name: Dependencies

View File

@ -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": { "vcs": {
"enabled": true, "enabled": true,
"clientKind": "git", "clientKind": "git",

View File

@ -3,6 +3,8 @@ title: v0.34.5 - TBD
slug: changelog/v0.34.5 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. * Add experimental support for prebuilt Linux RISC-V 64-bit binaries.
* Support building from source with npm v12+, deprecate `--build-from-source` flag. * Support building from source with npm v12+, deprecate `--build-from-source` flag.

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-darwin-arm64": "1.2.3" "@img/sharp-libvips-darwin-arm64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-darwin-x64": "1.2.3" "@img/sharp-libvips-darwin-x64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linux-arm": "1.2.3" "@img/sharp-libvips-linux-arm": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linux-arm64": "1.2.3" "@img/sharp-libvips-linux-arm64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linux-ppc64": "1.2.3" "@img/sharp-libvips-linux-ppc64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linux-riscv64": "1.2.3" "@img/sharp-libvips-linux-riscv64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linux-s390x": "1.2.3" "@img/sharp-libvips-linux-s390x": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linux-x64": "1.2.3" "@img/sharp-libvips-linux-x64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linuxmusl-arm64": "1.2.3" "@img/sharp-libvips-linuxmusl-arm64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -15,7 +15,7 @@
}, },
"preferUnplugged": true, "preferUnplugged": true,
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-libvips-linuxmusl-x64": "1.2.3" "@img/sharp-libvips-linuxmusl-x64": "1.2.4"
}, },
"files": [ "files": [
"lib" "lib"

View File

@ -31,7 +31,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0" "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
}, },
"dependencies": { "dependencies": {
"@emnapi/runtime": "^1.5.0" "@emnapi/runtime": "^1.6.0"
}, },
"cpu": [ "cpu": [
"wasm32" "wasm32"

View File

@ -146,16 +146,16 @@
"optionalDependencies": { "optionalDependencies": {
"@img/sharp-darwin-arm64": "0.34.4", "@img/sharp-darwin-arm64": "0.34.4",
"@img/sharp-darwin-x64": "0.34.4", "@img/sharp-darwin-x64": "0.34.4",
"@img/sharp-libvips-darwin-arm64": "1.2.3", "@img/sharp-libvips-darwin-arm64": "1.2.4",
"@img/sharp-libvips-darwin-x64": "1.2.3", "@img/sharp-libvips-darwin-x64": "1.2.4",
"@img/sharp-libvips-linux-arm": "1.2.3", "@img/sharp-libvips-linux-arm": "1.2.4",
"@img/sharp-libvips-linux-arm64": "1.2.3", "@img/sharp-libvips-linux-arm64": "1.2.4",
"@img/sharp-libvips-linux-ppc64": "1.2.3", "@img/sharp-libvips-linux-ppc64": "1.2.4",
"@img/sharp-libvips-linux-riscv64": "1.2.3", "@img/sharp-libvips-linux-riscv64": "1.2.4",
"@img/sharp-libvips-linux-s390x": "1.2.3", "@img/sharp-libvips-linux-s390x": "1.2.4",
"@img/sharp-libvips-linux-x64": "1.2.3", "@img/sharp-libvips-linux-x64": "1.2.4",
"@img/sharp-libvips-linuxmusl-arm64": "1.2.3", "@img/sharp-libvips-linuxmusl-arm64": "1.2.4",
"@img/sharp-libvips-linuxmusl-x64": "1.2.3", "@img/sharp-libvips-linuxmusl-x64": "1.2.4",
"@img/sharp-linux-arm": "0.34.4", "@img/sharp-linux-arm": "0.34.4",
"@img/sharp-linux-arm64": "0.34.4", "@img/sharp-linux-arm64": "0.34.4",
"@img/sharp-linux-ppc64": "0.34.4", "@img/sharp-linux-ppc64": "0.34.4",
@ -170,16 +170,16 @@
"@img/sharp-win32-x64": "0.34.4" "@img/sharp-win32-x64": "0.34.4"
}, },
"devDependencies": { "devDependencies": {
"@biomejs/biome": "^2.2.6", "@biomejs/biome": "^2.3.2",
"@cpplint/cli": "^0.1.0", "@cpplint/cli": "^0.1.0",
"@emnapi/runtime": "^1.5.0", "@emnapi/runtime": "^1.6.0",
"@img/sharp-libvips-dev": "1.2.3", "@img/sharp-libvips-dev": "1.2.4",
"@img/sharp-libvips-dev-wasm32": "1.2.3", "@img/sharp-libvips-dev-wasm32": "1.2.4",
"@img/sharp-libvips-win32-arm64": "1.2.3", "@img/sharp-libvips-win32-arm64": "1.2.4",
"@img/sharp-libvips-win32-ia32": "1.2.3", "@img/sharp-libvips-win32-ia32": "1.2.4",
"@img/sharp-libvips-win32-x64": "1.2.3", "@img/sharp-libvips-win32-x64": "1.2.4",
"@types/node": "*", "@types/node": "*",
"emnapi": "^1.5.0", "emnapi": "^1.6.0",
"exif-reader": "^2.0.2", "exif-reader": "^2.0.2",
"extract-zip": "^2.0.1", "extract-zip": "^2.0.1",
"icc": "^3.0.0", "icc": "^3.0.0",
@ -194,7 +194,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0" "node": "^18.17.0 || ^20.3.0 || >=21.0.0"
}, },
"config": { "config": {
"libvips": ">=8.17.2" "libvips": ">=8.17.3"
}, },
"funding": { "funding": {
"url": "https://opencollective.com/libvips" "url": "https://opencollective.com/libvips"

View File

@ -19,8 +19,8 @@
#if (VIPS_MAJOR_VERSION < 8) || \ #if (VIPS_MAJOR_VERSION < 8) || \
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 17) || \ (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 17) || \
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 2) (VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 17 && VIPS_MICRO_VERSION < 3)
#error "libvips version 8.17.2+ is required - please see https://sharp.pixelplumbing.com/install" #error "libvips version 8.17.3+ is required - please see https://sharp.pixelplumbing.com/install"
#endif #endif
#if defined(__has_include) #if defined(__has_include)

View File

@ -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_ #ifndef SRC_OPERATIONS_H_
#define SRC_OPERATIONS_H_ #define SRC_OPERATIONS_H_

View File

@ -109,7 +109,7 @@ describe('failOn', () => {
it('converts warnings to error for GeoTIFF', async () => { it('converts warnings to error for GeoTIFF', async () => {
await assert.rejects( await assert.rejects(
sharp(fixtures.inputTiffGeo).toBuffer(), sharp(fixtures.inputTiffGeo).toBuffer(),
/Unknown field with tag 33550/ /Tag 34737/
); );
}); });
}); });

View File

@ -180,7 +180,7 @@ describe('libvips binaries', function () {
process.env.npm_config_arch = 's390x'; process.env.npm_config_arch = 's390x';
process.env.npm_config_libc = ''; process.env.npm_config_libc = '';
const locatorHash = libvips.yarnLocator(); const locatorHash = libvips.yarnLocator();
assert.strictEqual(locatorHash, '7c141893d6'); assert.strictEqual(locatorHash, '4ab19140fd');
delete process.env.npm_config_platform; delete process.env.npm_config_platform;
delete process.env.npm_config_arch; delete process.env.npm_config_arch;
delete process.env.npm_config_libc; delete process.env.npm_config_libc;

View File

@ -1013,12 +1013,22 @@ describe('Image metadata', function () {
}); });
}); });
it('Unsupported lossless JPEG passes underlying error message', function (_t, done) { it('Lossless JPEG', async () => {
sharp(fixtures.inputJpgLossless) const metadata = await sharp(fixtures.inputJpgLossless).metadata();
.metadata(function (err) { assert.deepStrictEqual(metadata, {
assert.strictEqual(true, !!err); format: 'jpeg',
assert.strictEqual(true, /Input file has corrupt header: VipsJpeg: Unsupported JPEG process: SOF type 0xc3/.test(err.message)); width: 227,
done(); 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 }
}); });
}); });