Skip to content

Commit

Permalink
Upgrade to libvips v8.16.0-rc2
Browse files Browse the repository at this point in the history
CI: Add Node.js 22
Bump devDeps
Pin node-addon-api to prevent C++17 for now
  • Loading branch information
lovell committed Oct 28, 2024
1 parent 9582b50 commit 6480a94
Show file tree
Hide file tree
Showing 16 changed files with 86 additions and 56 deletions.
48 changes: 39 additions & 9 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,39 +14,54 @@ jobs:
fail-fast: false
matrix:
include:
- os: ubuntu-22.04
- os: ubuntu-24.04
container: rockylinux:8
nodejs_arch: x64
nodejs_version: "^18.17.0"
nodejs_version_major: 18
platform: linux-x64
prebuild: true
- os: ubuntu-22.04
- os: ubuntu-24.04
container: rockylinux:8
nodejs_arch: x64
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: linux-x64
- os: ubuntu-22.04
- os: ubuntu-24.04
container: rockylinux:8
nodejs_arch: x64
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: linux-x64
- os: ubuntu-24.04
container: node:18-alpine3.17
nodejs_version_major: 18
platform: linuxmusl-x64
prebuild: true
- os: ubuntu-22.04
- os: ubuntu-24.04
container: node:20-alpine3.18
nodejs_version_major: 20
platform: linuxmusl-x64
- os: macos-12
- os: ubuntu-24.04
container: node:22-alpine3.20
nodejs_version_major: 22
platform: linuxmusl-x64
- os: macos-13
nodejs_arch: x64
nodejs_version: "^18.17.0"
nodejs_version_major: 18
platform: darwin-x64
prebuild: true
- os: macos-12
- os: macos-13
nodejs_arch: x64
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: darwin-x64
- os: macos-13
nodejs_arch: x64
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: darwin-x64
- os: macos-14
nodejs_arch: arm64
nodejs_version: "^18.17.0"
Expand All @@ -58,6 +73,11 @@ jobs:
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: darwin-arm64
- os: macos-14
nodejs_arch: arm64
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: darwin-arm64
- os: windows-2019
nodejs_arch: x86
nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10
Expand All @@ -69,6 +89,11 @@ jobs:
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: win32-ia32
- os: windows-2019
nodejs_arch: x86
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: win32-ia32
- os: windows-2019
nodejs_arch: x64
nodejs_version: "^18.17.0"
Expand All @@ -80,6 +105,11 @@ jobs:
nodejs_version: "^20.3.0"
nodejs_version_major: 20
platform: win32-x64
- os: windows-2019
nodejs_arch: x64
nodejs_version: "^22.9.0"
nodejs_version_major: 22
platform: win32-x64
steps:
- name: Dependencies (Rocky Linux glibc)
if: contains(matrix.container, 'rockylinux')
Expand Down Expand Up @@ -125,7 +155,7 @@ jobs:
permissions:
contents: write
name: ${{ matrix.platform }} - Node.js ${{ matrix.nodejs_version_major }} - prebuild
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
Expand Down Expand Up @@ -177,8 +207,8 @@ jobs:
permissions:
contents: write
name: wasm32 - prebuild
runs-on: ubuntu-22.04
container: "emscripten/emsdk:3.1.68"
runs-on: ubuntu-24.04
container: "emscripten/emsdk:3.1.70"
steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down
28 changes: 14 additions & 14 deletions .github/workflows/npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,57 +16,57 @@ jobs:
matrix:
include:
- name: linux-x64-node-npm
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
runtime: node
package-manager: npm
- name: linux-x64-node-pnpm
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
runtime: node
package-manager: pnpm
- name: linux-x64-node-yarn
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
runtime: node
package-manager: yarn
- name: linux-x64-node-yarn-pnp
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
runtime: node
package-manager: yarn-pnp
- name: linux-x64-node-yarn-v1
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
runtime: node
package-manager: yarn-v1
- name: linux-x64-deno
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
runtime: deno
- name: linux-x64-bun
runs-on: ubuntu-22.04
runs-on: ubuntu-24.04
runtime: bun

- name: darwin-x64-node-npm
runs-on: macos-12
runs-on: macos-13
runtime: node
package-manager: npm
- name: darwin-x64-node-pnpm
runs-on: macos-12
runs-on: macos-13
runtime: node
package-manager: pnpm
- name: darwin-x64-node-yarn
runs-on: macos-12
runs-on: macos-13
runtime: node
package-manager: yarn
- name: darwin-x64-node-yarn-pnp
runs-on: macos-12
runs-on: macos-13
runtime: node
package-manager: yarn-pnp
- name: darwin-x64-node-yarn-v1
runs-on: macos-12
runs-on: macos-13
runtime: node
package-manager: yarn-v1
- name: darwin-x64-deno
runs-on: macos-12
runs-on: macos-13
runtime: deno
- name: darwin-x64-bun
runs-on: macos-12
runs-on: macos-13
runtime: bun

- name: win32-x64-node-npm
Expand Down
2 changes: 1 addition & 1 deletion docs/changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## v0.34 - *hat*

Requires libvips v8.16.0-rc1
Requires libvips v8.16.0-rc2

### v0.33.6 - TBD

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.1.0-rc1"
"@img/sharp-libvips-darwin-arm64": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-darwin-x64": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-linux-arm": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-linux-arm64": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-linux-ppc64": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-linux-s390x": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-linux-x64": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc2"
},
"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.1.0-rc1"
"@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc2"
},
"files": [
"lib"
Expand Down
2 changes: 1 addition & 1 deletion npm/wasm32/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
},
"dependencies": {
"@emnapi/runtime": "^1.2.0"
"@emnapi/runtime": "^1.3.1"
},
"cpu": [
"wasm32"
Expand Down
36 changes: 18 additions & 18 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.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-libvips-darwin-arm64": "1.1.0-rc2",
"@img/sharp-libvips-darwin-x64": "1.1.0-rc2",
"@img/sharp-libvips-linux-arm": "1.1.0-rc2",
"@img/sharp-libvips-linux-arm64": "1.1.0-rc2",
"@img/sharp-libvips-linux-ppc64": "1.1.0-rc2",
"@img/sharp-libvips-linux-s390x": "1.1.0-rc2",
"@img/sharp-libvips-linux-x64": "1.1.0-rc2",
"@img/sharp-libvips-linuxmusl-arm64": "1.1.0-rc2",
"@img/sharp-libvips-linuxmusl-x64": "1.1.0-rc2",
"@img/sharp-linux-arm": "0.33.5",
"@img/sharp-linux-arm64": "0.33.5",
"@img/sharp-linux-s390x": "0.33.5",
Expand All @@ -164,22 +164,22 @@
"@img/sharp-win32-x64": "0.33.5"
},
"devDependencies": {
"@emnapi/runtime": "^1.2.0",
"@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",
"@emnapi/runtime": "^1.3.1",
"@img/sharp-libvips-dev": "1.1.0-rc2",
"@img/sharp-libvips-dev-wasm32": "1.1.0-rc2",
"@img/sharp-libvips-win32-ia32": "1.1.0-rc2",
"@img/sharp-libvips-win32-x64": "1.1.0-rc2",
"@types/node": "*",
"cc": "^3.0.1",
"emnapi": "^1.2.0",
"emnapi": "^1.3.1",
"exif-reader": "^2.0.1",
"extract-zip": "^2.0.1",
"icc": "^3.0.0",
"jsdoc-to-markdown": "^9.0.0",
"jsdoc-to-markdown": "^9.0.4",
"license-checker": "^25.0.1",
"mocha": "^10.7.3",
"node-addon-api": "^8.1.0",
"nyc": "^17.0.0",
"node-addon-api": "8.1.0",
"nyc": "^17.1.0",
"prebuild": "^13.0.1",
"semistandard": "^17.0.0",
"tar-fs": "^3.0.6",
Expand Down
4 changes: 2 additions & 2 deletions test/unit/failOn.js
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ describe('failOn', () => {

it('returns errors to callback for truncated JPEG', function (done) {
sharp(fixtures.inputJpgTruncated, { failOn: 'truncated' }).toBuffer(function (err, data, info) {
assert.ok(err.message.includes('VipsJpeg: Premature end of'), err);
assert.ok(err.message.includes('VipsJpeg: premature end of'), err);
assert.strictEqual(data, undefined);
assert.strictEqual(info, undefined);
done();
Expand All @@ -95,7 +95,7 @@ describe('failOn', () => {
throw new Error('Expected rejection');
})
.catch(err => {
done(err.message.includes('VipsJpeg: Premature end of') ? undefined : err);
done(err.message.includes('VipsJpeg: premature end of') ? undefined : err);
});
});

Expand Down
4 changes: 2 additions & 2 deletions test/unit/metadata.js
Original file line number Diff line number Diff line change
Expand Up @@ -931,7 +931,7 @@ describe('Image metadata', function () {
sharp(fixtures.inputJpgWithCorruptHeader)
.metadata(function (err) {
assert.strictEqual(true, !!err);
assert.ok(err.message.includes('Input file has corrupt header: VipsJpeg: Premature end of'), err);
assert.ok(err.message.includes('Input file has corrupt header: VipsJpeg: premature end of'), err);
done();
});
});
Expand All @@ -940,7 +940,7 @@ describe('Image metadata', function () {
sharp(fs.readFileSync(fixtures.inputJpgWithCorruptHeader))
.metadata(function (err) {
assert.strictEqual(true, !!err);
assert.ok(err.message.includes('Input buffer has corrupt header: VipsJpeg: Premature end of'), err);
assert.ok(err.message.includes('Input buffer has corrupt header: VipsJpeg: premature end of'), err);
done();
});
});
Expand Down

0 comments on commit 6480a94

Please sign in to comment.