diff --git a/.github/ISSUE_TEMPLATE/installation.md b/.github/ISSUE_TEMPLATE/installation.md index b47d10e9..f1068198 100644 --- a/.github/ISSUE_TEMPLATE/installation.md +++ b/.github/ISSUE_TEMPLATE/installation.md @@ -31,7 +31,7 @@ please open an issue against that package instead. -- [ ] I am using Node.js with a version that satisfies `^18.17.0 || ^20.3.0 || >=21.0.0` +- [ ] I am using Node.js with a version that satisfies `>=20.9.0` - [ ] I am using Deno - [ ] I am using Bun diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 0f8bb90a..abbacc46 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -9,8 +9,8 @@ jobs: contents: read runs-on: ubuntu-24.04 steps: - - uses: actions/checkout@v4 - - uses: actions/setup-node@v5 + - uses: actions/checkout@v6 + - uses: actions/setup-node@v6 with: node-version: "24" - run: npm install --ignore-scripts @@ -31,123 +31,129 @@ jobs: - os: ubuntu-24.04 container: rockylinux:8 nodejs_arch: x64 - nodejs_version: "^18.17.0" - nodejs_version_major: 18 + nodejs_version: "^20.9.0" + nodejs_version_major: 20 platform: linux-x64 package: true - os: ubuntu-24.04 container: rockylinux:8 nodejs_arch: x64 - nodejs_version: "^20.3.0" - nodejs_version_major: 20 - platform: linux-x64 - - os: ubuntu-24.04 - container: rockylinux:8 - nodejs_arch: x64 - nodejs_version: "^22.9.0" + nodejs_version: "^22" nodejs_version_major: 22 platform: linux-x64 - os: ubuntu-24.04 - container: node:18-alpine3.17 - nodejs_version_major: 18 - platform: linuxmusl-x64 - package: true + container: rockylinux:8 + nodejs_arch: x64 + nodejs_version: "^24" + nodejs_version_major: 24 + platform: linux-x64 - os: ubuntu-24.04 container: node:20-alpine3.18 nodejs_version_major: 20 platform: linuxmusl-x64 + package: true - os: ubuntu-24.04 container: node:22-alpine3.20 nodejs_version_major: 22 platform: linuxmusl-x64 + - os: ubuntu-24.04 + container: node:24-alpine3.22 + nodejs_version_major: 24 + platform: linuxmusl-x64 - os: ubuntu-24.04-arm container: arm64v8/rockylinux:8 nodejs_arch: arm64 - nodejs_version: "^18.17.0" - nodejs_version_major: 18 + nodejs_version: "^20.9.0" + nodejs_version_major: 20 platform: linux-arm64 package: true - os: ubuntu-24.04-arm container: arm64v8/rockylinux:8 nodejs_arch: arm64 - nodejs_version: "^20.3.0" - nodejs_version_major: 20 + nodejs_version: "^22" + nodejs_version_major: 22 + platform: linux-arm64 + - os: ubuntu-24.04-arm + container: arm64v8/rockylinux:8 + nodejs_arch: arm64 + nodejs_version: "^24" + nodejs_version_major: 24 platform: linux-arm64 - os: macos-15-intel nodejs_arch: x64 - nodejs_version: "^18.17.0" - nodejs_version_major: 18 + nodejs_version: "^20.9.0" + nodejs_version_major: 20 platform: darwin-x64 package: true - os: macos-15-intel nodejs_arch: x64 - nodejs_version: "^20.3.0" - nodejs_version_major: 20 + nodejs_version: "^22" + nodejs_version_major: 22 platform: darwin-x64 - os: macos-15-intel nodejs_arch: x64 - nodejs_version: "^22.9.0" - nodejs_version_major: 22 + nodejs_version: "^24" + nodejs_version_major: 24 platform: darwin-x64 - os: macos-15 nodejs_arch: arm64 - nodejs_version: "^18.17.0" - nodejs_version_major: 18 + nodejs_version: "^20.9.0" + nodejs_version_major: 20 platform: darwin-arm64 package: true - os: macos-15 nodejs_arch: arm64 - nodejs_version: "^20.3.0" - nodejs_version_major: 20 + nodejs_version: "^22" + nodejs_version_major: 22 platform: darwin-arm64 - os: macos-15 nodejs_arch: arm64 - nodejs_version: "^22.9.0" - nodejs_version_major: 22 + nodejs_version: "^24" + nodejs_version_major: 24 platform: darwin-arm64 - os: windows-2022 nodejs_arch: x86 - nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10 - nodejs_version_major: 18 + nodejs_version: "^20.9.0" + nodejs_version_major: 20 platform: win32-ia32 package: true - os: windows-2022 nodejs_arch: x86 - nodejs_version: "^20.3.0" - nodejs_version_major: 20 - platform: win32-ia32 - - os: windows-2022 - nodejs_arch: x86 - nodejs_version: "^22.9.0" + nodejs_version: "^22" nodejs_version_major: 22 platform: win32-ia32 - os: windows-2022 nodejs_arch: x64 - nodejs_version: "^18.17.0" - nodejs_version_major: 18 + nodejs_version: "^20.9.0" + nodejs_version_major: 20 platform: win32-x64 package: true - os: windows-2022 nodejs_arch: x64 - nodejs_version: "^20.3.0" - nodejs_version_major: 20 + nodejs_version: "^22" + nodejs_version_major: 22 platform: win32-x64 - os: windows-2022 nodejs_arch: x64 - nodejs_version: "^22.9.0" - nodejs_version_major: 22 + nodejs_version: "^24" + nodejs_version_major: 24 platform: win32-x64 - os: windows-11-arm nodejs_arch: arm64 - nodejs_version: "^20.3.0" + nodejs_version: "^20.9.0" nodejs_version_major: 20 platform: win32-arm64 package: true - os: windows-11-arm nodejs_arch: arm64 - nodejs_version: "^22.9.0" + nodejs_version: "^22" nodejs_version_major: 22 platform: win32-arm64 + - os: windows-11-arm + nodejs_arch: arm64 + nodejs_version: "^24" + nodejs_version_major: 24 + platform: win32-arm64 steps: - name: Dependencies (Rocky Linux glibc) if: contains(matrix.container, 'rockylinux') @@ -159,22 +165,22 @@ jobs: run: apk add build-base git python3 font-noto --update-cache - name: Dependencies (Python 3.11 - macOS, Windows) if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows') - uses: actions/setup-python@v5 + uses: actions/setup-python@v6 with: python-version: "3.12" - name: Dependencies (Node.js) if: "!contains(matrix.platform, 'linuxmusl')" - uses: actions/setup-node@v5 + uses: actions/setup-node@v6 with: node-version: ${{ matrix.nodejs_version }} architecture: ${{ matrix.nodejs_arch }} - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - run: npm install - run: npm run build - run: npm run test-unit - if: matrix.package run: npm run package-from-local-build - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: matrix.package with: name: ${{ matrix.platform }} @@ -191,16 +197,18 @@ jobs: image: ${{ matrix.container }} volumes: - /opt:/opt:rw,rshared - - /opt:/__e/node20:ro,rshared + - /opt:/__e/node24:ro,rshared strategy: fail-fast: false matrix: include: - - container: node:18-alpine3.17 - nodejs_version_major: 18 - package: true - - container: node:20-alpine3.18 + - container: node:20-alpine3.20 nodejs_version_major: 20 + package: true + - container: node:22-alpine3.20 + nodejs_version_major: 22 + - container: node:24-alpine3.22 + nodejs_version_major: 24 steps: - name: Allow Linux musl containers on ARM64 runners # https://github.com/actions/runner/issues/801#issuecomment-2394425757 shell: sh @@ -211,13 +219,13 @@ jobs: ln -s /usr/bin/node /opt/bin/node - name: Dependencies run: apk add build-base git python3 font-noto --update-cache - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - run: npm install - run: npm run build - run: npm run test-unit - if: matrix.package run: npm run package-from-local-build - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 if: matrix.package with: name: linuxmusl-arm64 @@ -238,20 +246,20 @@ jobs: base_image: "balenalib/rpi-raspbian:bullseye" nodejs_arch: armv6l nodejs_hostname: unofficial-builds.nodejs.org - nodejs_version: "18.17.0" - nodejs_version_major: 18 + nodejs_version: "20.9.0" + nodejs_version_major: 20 - platform: linux-s390x base_image: "--platform=linux/s390x s390x/debian:bookworm" nodejs_arch: s390x nodejs_hostname: nodejs.org - nodejs_version: "18.17.0" - nodejs_version_major: 18 + nodejs_version: "20.9.0" + nodejs_version_major: 20 - platform: linux-ppc64 base_image: "--platform=linux/ppc64le ppc64le/debian:bookworm" nodejs_arch: ppc64le nodejs_hostname: nodejs.org - nodejs_version: "18.17.0" - nodejs_version_major: 18 + nodejs_version: "20.9.0" + nodejs_version_major: 20 - platform: linux-riscv64 base_image: "--platform=linux/riscv64 riscv64/debian:trixie" compiler_flags: "-march=rv64gc" @@ -260,7 +268,7 @@ jobs: nodejs_version: "20.19.5" nodejs_version_major: 20 steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v6 - uses: uraimo/run-on-arch-action@v3 with: arch: none @@ -279,7 +287,7 @@ jobs: npm run build node --test test/unit/io.js npm run package-from-local-build - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: ${{ matrix.platform }} path: npm/${{ matrix.platform }} @@ -311,7 +319,7 @@ jobs: test "$EMSCRIPTEN_VERSION_LIBVIPS" = "$EMSCRIPTEN_VERSION_SHARP" - run: emmake npm run test-unit - run: emmake npm run package-from-local-build - - uses: actions/upload-artifact@v4 + - uses: actions/upload-artifact@v6 with: name: wasm32 path: npm/wasm32 @@ -329,12 +337,12 @@ jobs: - build-emscripten steps: - uses: actions/checkout@v4 - - uses: actions/download-artifact@v4 + - uses: actions/download-artifact@v7 with: path: npm - name: Create npm workspace tarball run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js . - - uses: actions/setup-node@v5 + - uses: actions/setup-node@v6 with: node-version: '24' - name: Create release notes diff --git a/README.md b/README.md index 47da52e8..134e2e7b 100644 --- a/README.md +++ b/README.md @@ -8,7 +8,7 @@ smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions It can be used with all JavaScript runtimes that provide support for Node-API v9, including -Node.js (^18.17.0 or >= 20.3.0), Deno and Bun. +Node.js (>= 20.9.0), Deno and Bun. Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings diff --git a/docs/src/content/docs/changelog/v0.35.0.md b/docs/src/content/docs/changelog/v0.35.0.md index 7262ae14..beb269c6 100644 --- a/docs/src/content/docs/changelog/v0.35.0.md +++ b/docs/src/content/docs/changelog/v0.35.0.md @@ -4,3 +4,5 @@ slug: changelog/v0.35.0 --- * Upgrade to libvips v8.18.0 for upstream bug fixes. + +* Drop support for Node.js 18, now requires Node.js >= 20.9.0. diff --git a/docs/src/content/docs/index.md b/docs/src/content/docs/index.md index 3ba704f4..77a0019e 100644 --- a/docs/src/content/docs/index.md +++ b/docs/src/content/docs/index.md @@ -10,7 +10,7 @@ smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions It can be used with all JavaScript runtimes that provide support for Node-API v9, including -Node.js >= 18.17.0, Deno and Bun. +Node.js >= 20.9.0, Deno and Bun. Resizing an image is typically 4x-5x faster than using the quickest ImageMagick and GraphicsMagick settings diff --git a/docs/src/content/docs/install.md b/docs/src/content/docs/install.md index 083db5cc..9611b4f4 100644 --- a/docs/src/content/docs/install.md +++ b/docs/src/content/docs/install.md @@ -39,7 +39,7 @@ deno run --allow-env --allow-ffi --allow-read --allow-sys ... ## Prerequisites -* Node-API v9 compatible runtime e.g. Node.js ^18.17.0 or >=20.3.0. +* Node-API v9 compatible runtime e.g. Node.js >= 20.9.0. ## Prebuilt binaries diff --git a/npm/darwin-arm64/package.json b/npm/darwin-arm64/package.json index dc539c05..7405919f 100644 --- a/npm/darwin-arm64/package.json +++ b/npm/darwin-arm64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "os": [ "darwin" diff --git a/npm/darwin-x64/package.json b/npm/darwin-x64/package.json index 8df6f925..230fb24d 100644 --- a/npm/darwin-x64/package.json +++ b/npm/darwin-x64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "os": [ "darwin" diff --git a/npm/linux-arm/package.json b/npm/linux-arm/package.json index db200ada..c3999fcb 100644 --- a/npm/linux-arm/package.json +++ b/npm/linux-arm/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "glibc": ">=2.31" diff --git a/npm/linux-arm64/package.json b/npm/linux-arm64/package.json index c9254cdb..fd1eea0e 100644 --- a/npm/linux-arm64/package.json +++ b/npm/linux-arm64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "glibc": ">=2.26" diff --git a/npm/linux-ppc64/package.json b/npm/linux-ppc64/package.json index 488fbd4a..0d999e5f 100644 --- a/npm/linux-ppc64/package.json +++ b/npm/linux-ppc64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "glibc": ">=2.36" diff --git a/npm/linux-riscv64/package.json b/npm/linux-riscv64/package.json index 98b0c3b7..846659dc 100644 --- a/npm/linux-riscv64/package.json +++ b/npm/linux-riscv64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "glibc": ">=2.41" diff --git a/npm/linux-s390x/package.json b/npm/linux-s390x/package.json index 2bf9eb70..9743d4f8 100644 --- a/npm/linux-s390x/package.json +++ b/npm/linux-s390x/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "glibc": ">=2.36" diff --git a/npm/linux-x64/package.json b/npm/linux-x64/package.json index a528c9aa..698d503d 100644 --- a/npm/linux-x64/package.json +++ b/npm/linux-x64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "glibc": ">=2.26" diff --git a/npm/linuxmusl-arm64/package.json b/npm/linuxmusl-arm64/package.json index ce26f31b..5ee5853c 100644 --- a/npm/linuxmusl-arm64/package.json +++ b/npm/linuxmusl-arm64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "musl": ">=1.2.2" diff --git a/npm/linuxmusl-x64/package.json b/npm/linuxmusl-x64/package.json index c38bd238..6489f57b 100644 --- a/npm/linuxmusl-x64/package.json +++ b/npm/linuxmusl-x64/package.json @@ -29,7 +29,7 @@ "./package": "./package.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "musl": ">=1.2.2" diff --git a/npm/wasm32/package.json b/npm/wasm32/package.json index 4e3c01cc..651a23b2 100644 --- a/npm/wasm32/package.json +++ b/npm/wasm32/package.json @@ -28,7 +28,7 @@ "./versions": "./versions.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "dependencies": { "@emnapi/runtime": "^1.7.1" diff --git a/npm/win32-arm64/package.json b/npm/win32-arm64/package.json index 651f420e..8cd86920 100644 --- a/npm/win32-arm64/package.json +++ b/npm/win32-arm64/package.json @@ -28,7 +28,7 @@ "./versions": "./versions.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "os": [ "win32" diff --git a/npm/win32-ia32/package.json b/npm/win32-ia32/package.json index 21c6dbba..b6a27bae 100644 --- a/npm/win32-ia32/package.json +++ b/npm/win32-ia32/package.json @@ -28,7 +28,7 @@ "./versions": "./versions.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "os": [ "win32" diff --git a/npm/win32-x64/package.json b/npm/win32-x64/package.json index 8b867b5e..ad21c614 100644 --- a/npm/win32-x64/package.json +++ b/npm/win32-x64/package.json @@ -28,7 +28,7 @@ "./versions": "./versions.json" }, "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "os": [ "win32" diff --git a/package.json b/package.json index 6e06bf54..d8cf98b1 100644 --- a/package.json +++ b/package.json @@ -191,7 +191,7 @@ }, "license": "Apache-2.0", "engines": { - "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + "node": ">=20.9.0" }, "config": { "libvips": ">=8.18.0"