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
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

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

View File

@ -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.

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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"

View File

@ -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)

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

View File

@ -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/
);
});
});

View File

@ -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;

View File

@ -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 () => {