Skip to content

Commit

Permalink
Upgrade to libvips v8.16.0-rc1
Browse files Browse the repository at this point in the history
  • Loading branch information
lovell committed Oct 14, 2024
1 parent 1533bf9 commit 9582b50
Show file tree
Hide file tree
Showing 23 changed files with 45 additions and 43 deletions.
10 changes: 6 additions & 4 deletions docs/changelog.md
Original file line number Diff line number Diff line change
@@ -1,13 +1,11 @@
# Changelog

## v0.33 - *gauge*
## v0.34 - *hat*

Requires libvips v8.15.5-rc1
Requires libvips v8.16.0-rc1

### v0.33.6 - TBD

* Upgrade to libvips v8.15.5-rc1 for upstream bug fixes.

* TypeScript: Ensure channel counts use the correct range.
[#4197](https://github.com/lovell/sharp/pull/4197)
[@DavidVaness](https://github.com/DavidVaness)
Expand All @@ -20,6 +18,10 @@ Requires libvips v8.15.5-rc1
[#4207](https://github.com/lovell/sharp/pull/4207)
[@calebmer](https://github.com/calebmer)

## v0.33 - *gauge*

Requires libvips v8.15.3

### v0.33.5 - 16th August 2024

* Upgrade to libvips v8.15.3 for upstream bug fixes.
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-darwin-arm64": "1.0.6"
"@img/sharp-libvips-darwin-arm64": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/darwin-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-darwin-x64": "1.0.6"
"@img/sharp-libvips-darwin-x64": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-arm": "1.0.6"
"@img/sharp-libvips-linux-arm": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-arm64": "1.0.6"
"@img/sharp-libvips-linux-arm64": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-ppc64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-ppc64": "1.0.6"
"@img/sharp-libvips-linux-ppc64": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-s390x/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-s390x": "1.0.6"
"@img/sharp-libvips-linux-s390x": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/linux-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linux-x64": "1.0.6"
"@img/sharp-libvips-linux-x64": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/linuxmusl-arm64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-arm64": "1.0.6"
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/linuxmusl-x64/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
},
"preferUnplugged": true,
"optionalDependencies": {
"@img/sharp-libvips-linuxmusl-x64": "1.0.6"
"@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc1"
},
"files": [
"lib"
Expand Down
28 changes: 14 additions & 14 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -144,15 +144,15 @@
"optionalDependencies": {
"@img/sharp-darwin-arm64": "0.33.5",
"@img/sharp-darwin-x64": "0.33.5",
"@img/sharp-libvips-darwin-arm64": "1.0.6",
"@img/sharp-libvips-darwin-x64": "1.0.6",
"@img/sharp-libvips-linux-arm": "1.0.6",
"@img/sharp-libvips-linux-arm64": "1.0.6",
"@img/sharp-libvips-linux-ppc64": "1.0.6",
"@img/sharp-libvips-linux-s390x": "1.0.6",
"@img/sharp-libvips-linux-x64": "1.0.6",
"@img/sharp-libvips-linuxmusl-arm64": "1.0.6",
"@img/sharp-libvips-linuxmusl-x64": "1.0.6",
"@img/sharp-libvips-darwin-arm64": "1.1.0-rc1",
"@img/sharp-libvips-darwin-x64": "1.1.0-rc1",
"@img/sharp-libvips-linux-arm": "1.1.0-rc1",
"@img/sharp-libvips-linux-arm64": "1.1.0-rc1",
"@img/sharp-libvips-linux-ppc64": "1.1.0-rc1",
"@img/sharp-libvips-linux-s390x": "1.1.0-rc1",
"@img/sharp-libvips-linux-x64": "1.1.0-rc1",
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc1",
"@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc1",
"@img/sharp-linux-arm": "0.33.5",
"@img/sharp-linux-arm64": "0.33.5",
"@img/sharp-linux-s390x": "0.33.5",
Expand All @@ -165,10 +165,10 @@
},
"devDependencies": {
"@emnapi/runtime": "^1.2.0",
"@img/sharp-libvips-dev": "1.0.6",
"@img/sharp-libvips-dev-wasm32": "1.0.6",
"@img/sharp-libvips-win32-ia32": "1.0.6",
"@img/sharp-libvips-win32-x64": "1.0.6",
"@img/sharp-libvips-dev": "1.1.0-rc1",
"@img/sharp-libvips-dev-wasm32": "1.1.0-rc1",
"@img/sharp-libvips-win32-ia32": "1.1.0-rc1",
"@img/sharp-libvips-win32-x64": "1.1.0-rc1",
"@types/node": "*",
"cc": "^3.0.1",
"emnapi": "^1.2.0",
Expand All @@ -190,7 +190,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"config": {
"libvips": ">=8.15.5"
"libvips": ">=8.16.0"
},
"funding": {
"url": "https://opencollective.com/libvips"
Expand Down
2 changes: 1 addition & 1 deletion src/binding.gyp
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
# Build libvips C++ binding for Windows due to MSVC std library ABI changes
'type': 'shared_library',
'defines': [
'VIPS_CPLUSPLUS_EXPORTS',
'_VIPS_PUBLIC=__declspec(dllexport)',
'_ALLOW_KEYWORD_MACROS'
],
'sources': [
Expand Down
6 changes: 3 additions & 3 deletions src/common.h
Original file line number Diff line number Diff line change
Expand Up @@ -15,9 +15,9 @@
// Verify platform and compiler compatibility

#if (VIPS_MAJOR_VERSION < 8) || \
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 15) || \
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 15 && VIPS_MICRO_VERSION < 5)
#error "libvips version 8.15.5+ is required - please see https://sharp.pixelplumbing.com/install"
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION < 16) || \
(VIPS_MAJOR_VERSION == 8 && VIPS_MINOR_VERSION == 16 && VIPS_MICRO_VERSION < 0)
#error "libvips version 8.16.0+ is required - please see https://sharp.pixelplumbing.com/install"
#endif

#if ((!defined(__clang__)) && defined(__GNUC__) && (__GNUC__ < 4 || (__GNUC__ == 4 && __GNUC_MINOR__ < 6)))
Expand Down
Binary file modified test/fixtures/expected/gravity-center-width.webp
Binary file not shown.
Binary file modified test/fixtures/expected/tint-blue.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-cmyk.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-green.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-red.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/tint-sepia.jpg
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file modified test/fixtures/expected/webp-alpha-80.webp
Binary file not shown.
2 changes: 1 addition & 1 deletion test/unit/libvips.js
Original file line number Diff line number Diff line change
Expand Up @@ -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, 'b9c917c310');
assert.strictEqual(locatorHash, '9b2ea457de');
delete process.env.npm_config_platform;
delete process.env.npm_config_arch;
delete process.env.npm_config_libc;
Expand Down
4 changes: 2 additions & 2 deletions test/unit/normalize.js
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@ const assertNormalized = function (data) {
min = Math.min(min, data[i]);
max = Math.max(max, data[i]);
}
assert.strictEqual(0, min);
assert.ok([254, 255].includes(max));
assert.strictEqual(0, min, 'min too high');
assert.ok(max > 248, 'max too low');
};

describe('Normalization', function () {
Expand Down
18 changes: 9 additions & 9 deletions test/unit/stats.js
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ describe('Image Stats', function () {
if (err) throw err;

assert.strictEqual(true, stats.isOpaque);
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541));
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.7883011147075762));

const { r, g, b } = stats.dominant;
Expand Down Expand Up @@ -272,7 +272,7 @@ describe('Image Stats', function () {

assert.strictEqual(true, stats.isOpaque);
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.51758075132966));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 9.959951636662941));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 9.971384105278734));

const { r, g, b } = stats.dominant;
assert.strictEqual(40, r);
Expand Down Expand Up @@ -336,8 +336,8 @@ describe('Image Stats', function () {
if (err) throw err;

assert.strictEqual(true, stats.isOpaque);
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 6.087309412541799));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 2.9250574456255682));
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 6.08118048729375));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 2.936767879098001));

const { r, g, b } = stats.dominant;
assert.strictEqual(120, r);
Expand Down Expand Up @@ -484,7 +484,7 @@ describe('Image Stats', function () {
if (err) throw err;

assert.strictEqual(true, stats.isOpaque);
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541));
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.788301114707569));

const { r, g, b } = stats.dominant;
Expand Down Expand Up @@ -552,7 +552,7 @@ describe('Image Stats', function () {

return pipeline.stats().then(function (stats) {
assert.strictEqual(true, stats.isOpaque);
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541));
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.788301114707569));

const { r, g, b } = stats.dominant;
Expand Down Expand Up @@ -615,7 +615,7 @@ describe('Image Stats', function () {
it('File in, Promise out', function () {
return sharp(fixtures.inputJpg).stats().then(function (stats) {
assert.strictEqual(true, stats.isOpaque);
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.319914765248541));
assert.strictEqual(true, isInAcceptableRange(stats.entropy, 7.332915340666659));
assert.strictEqual(true, isInAcceptableRange(stats.sharpness, 0.788301114707569));

const { r, g, b } = stats.dominant;
Expand Down Expand Up @@ -682,8 +682,8 @@ describe('Image Stats', function () {
return Promise
.all([original, blurred])
.then(([original, blurred]) => {
assert.strictEqual(true, isInAcceptableRange(original.sharpness, 0.7883011147075476));
assert.strictEqual(true, isInAcceptableRange(blurred.sharpness, 0.4791559805997398));
assert.strictEqual(true, isInAcceptableRange(original.sharpness, 0.789046400439488));
assert.strictEqual(true, isInAcceptableRange(blurred.sharpness, 0.47985138441709047));
});
});

Expand Down

0 comments on commit 9582b50

Please sign in to comment.