Skip to content

Commit 283c7d3

Browse files
committed
Drop Node.js 18, now requires Node.js >= 20.9.0
1 parent 34c39fa commit 283c7d3

File tree

21 files changed

+96
-86
lines changed

21 files changed

+96
-86
lines changed

.github/ISSUE_TEMPLATE/installation.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ please open an issue against that package instead.
3131

3232
<!-- Please place an [x] in the relevant box to confirm. -->
3333

34-
- [ ] I am using Node.js with a version that satisfies `^18.17.0 || ^20.3.0 || >=21.0.0`
34+
- [ ] I am using Node.js with a version that satisfies `>=20.9.0`
3535
- [ ] I am using Deno
3636
- [ ] I am using Bun
3737

.github/workflows/ci.yml

Lines changed: 75 additions & 67 deletions
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ jobs:
99
contents: read
1010
runs-on: ubuntu-24.04
1111
steps:
12-
- uses: actions/checkout@v4
13-
- uses: actions/setup-node@v5
12+
- uses: actions/checkout@v6
13+
- uses: actions/setup-node@v6
1414
with:
1515
node-version: "24"
1616
- run: npm install --ignore-scripts
@@ -31,123 +31,129 @@ jobs:
3131
- os: ubuntu-24.04
3232
container: rockylinux:8
3333
nodejs_arch: x64
34-
nodejs_version: "^18.17.0"
35-
nodejs_version_major: 18
34+
nodejs_version: "^20.9.0"
35+
nodejs_version_major: 20
3636
platform: linux-x64
3737
package: true
3838
- os: ubuntu-24.04
3939
container: rockylinux:8
4040
nodejs_arch: x64
41-
nodejs_version: "^20.3.0"
42-
nodejs_version_major: 20
41+
nodejs_version: "^22"
42+
nodejs_version_major: 22
4343
platform: linux-x64
4444
- os: ubuntu-24.04
4545
container: rockylinux:8
4646
nodejs_arch: x64
47-
nodejs_version: "^22.9.0"
48-
nodejs_version_major: 22
47+
nodejs_version: "^24"
48+
nodejs_version_major: 24
4949
platform: linux-x64
50-
- os: ubuntu-24.04
51-
container: node:18-alpine3.17
52-
nodejs_version_major: 18
53-
platform: linuxmusl-x64
54-
package: true
5550
- os: ubuntu-24.04
5651
container: node:20-alpine3.18
5752
nodejs_version_major: 20
5853
platform: linuxmusl-x64
54+
package: true
5955
- os: ubuntu-24.04
6056
container: node:22-alpine3.20
6157
nodejs_version_major: 22
6258
platform: linuxmusl-x64
59+
- os: ubuntu-24.04
60+
container: node:24-alpine3.22
61+
nodejs_version_major: 24
62+
platform: linuxmusl-x64
6363
- os: ubuntu-24.04-arm
6464
container: arm64v8/rockylinux:8
6565
nodejs_arch: arm64
66-
nodejs_version: "^18.17.0"
67-
nodejs_version_major: 18
66+
nodejs_version: "^20.9.0"
67+
nodejs_version_major: 20
6868
platform: linux-arm64
6969
package: true
7070
- os: ubuntu-24.04-arm
7171
container: arm64v8/rockylinux:8
7272
nodejs_arch: arm64
73-
nodejs_version: "^20.3.0"
74-
nodejs_version_major: 20
73+
nodejs_version: "^22"
74+
nodejs_version_major: 22
75+
platform: linux-arm64
76+
- os: ubuntu-24.04-arm
77+
container: arm64v8/rockylinux:8
78+
nodejs_arch: arm64
79+
nodejs_version: "^24"
80+
nodejs_version_major: 24
7581
platform: linux-arm64
7682
- os: macos-15-intel
7783
nodejs_arch: x64
78-
nodejs_version: "^18.17.0"
79-
nodejs_version_major: 18
84+
nodejs_version: "^20.9.0"
85+
nodejs_version_major: 20
8086
platform: darwin-x64
8187
package: true
8288
- os: macos-15-intel
8389
nodejs_arch: x64
84-
nodejs_version: "^20.3.0"
85-
nodejs_version_major: 20
90+
nodejs_version: "^22"
91+
nodejs_version_major: 22
8692
platform: darwin-x64
8793
- os: macos-15-intel
8894
nodejs_arch: x64
89-
nodejs_version: "^22.9.0"
90-
nodejs_version_major: 22
95+
nodejs_version: "^24"
96+
nodejs_version_major: 24
9197
platform: darwin-x64
9298
- os: macos-15
9399
nodejs_arch: arm64
94-
nodejs_version: "^18.17.0"
95-
nodejs_version_major: 18
100+
nodejs_version: "^20.9.0"
101+
nodejs_version_major: 20
96102
platform: darwin-arm64
97103
package: true
98104
- os: macos-15
99105
nodejs_arch: arm64
100-
nodejs_version: "^20.3.0"
101-
nodejs_version_major: 20
106+
nodejs_version: "^22"
107+
nodejs_version_major: 22
102108
platform: darwin-arm64
103109
- os: macos-15
104110
nodejs_arch: arm64
105-
nodejs_version: "^22.9.0"
106-
nodejs_version_major: 22
111+
nodejs_version: "^24"
112+
nodejs_version_major: 24
107113
platform: darwin-arm64
108114
- os: windows-2022
109115
nodejs_arch: x86
110-
nodejs_version: "18.18.2" # pinned to avoid 18.19.0 and npm 10
111-
nodejs_version_major: 18
112-
platform: win32-ia32
113-
package: true
114-
- os: windows-2022
115-
nodejs_arch: x86
116-
nodejs_version: "^20.3.0"
116+
nodejs_version: "^20.9.0"
117117
nodejs_version_major: 20
118118
platform: win32-ia32
119+
package: true
119120
- os: windows-2022
120121
nodejs_arch: x86
121-
nodejs_version: "^22.9.0"
122+
nodejs_version: "^22"
122123
nodejs_version_major: 22
123124
platform: win32-ia32
124125
- os: windows-2022
125126
nodejs_arch: x64
126-
nodejs_version: "^18.17.0"
127-
nodejs_version_major: 18
127+
nodejs_version: "^20.9.0"
128+
nodejs_version_major: 20
128129
platform: win32-x64
129130
package: true
130131
- os: windows-2022
131132
nodejs_arch: x64
132-
nodejs_version: "^20.3.0"
133-
nodejs_version_major: 20
133+
nodejs_version: "^22"
134+
nodejs_version_major: 22
134135
platform: win32-x64
135136
- os: windows-2022
136137
nodejs_arch: x64
137-
nodejs_version: "^22.9.0"
138-
nodejs_version_major: 22
138+
nodejs_version: "^24"
139+
nodejs_version_major: 24
139140
platform: win32-x64
140141
- os: windows-11-arm
141142
nodejs_arch: arm64
142-
nodejs_version: "^20.3.0"
143+
nodejs_version: "^20.9.0"
143144
nodejs_version_major: 20
144145
platform: win32-arm64
145146
package: true
146147
- os: windows-11-arm
147148
nodejs_arch: arm64
148-
nodejs_version: "^22.9.0"
149+
nodejs_version: "^22"
149150
nodejs_version_major: 22
150151
platform: win32-arm64
152+
- os: windows-11-arm
153+
nodejs_arch: arm64
154+
nodejs_version: "^24"
155+
nodejs_version_major: 24
156+
platform: win32-arm64
151157
steps:
152158
- name: Dependencies (Rocky Linux glibc)
153159
if: contains(matrix.container, 'rockylinux')
@@ -159,22 +165,22 @@ jobs:
159165
run: apk add build-base git python3 font-noto --update-cache
160166
- name: Dependencies (Python 3.11 - macOS, Windows)
161167
if: contains(matrix.os, 'macos') || contains(matrix.os, 'windows')
162-
uses: actions/setup-python@v5
168+
uses: actions/setup-python@v6
163169
with:
164170
python-version: "3.12"
165171
- name: Dependencies (Node.js)
166172
if: "!contains(matrix.platform, 'linuxmusl')"
167-
uses: actions/setup-node@v5
173+
uses: actions/setup-node@v6
168174
with:
169175
node-version: ${{ matrix.nodejs_version }}
170176
architecture: ${{ matrix.nodejs_arch }}
171-
- uses: actions/checkout@v4
177+
- uses: actions/checkout@v6
172178
- run: npm install
173179
- run: npm run build
174180
- run: npm run test-unit
175181
- if: matrix.package
176182
run: npm run package-from-local-build
177-
- uses: actions/upload-artifact@v4
183+
- uses: actions/upload-artifact@v6
178184
if: matrix.package
179185
with:
180186
name: ${{ matrix.platform }}
@@ -191,16 +197,18 @@ jobs:
191197
image: ${{ matrix.container }}
192198
volumes:
193199
- /opt:/opt:rw,rshared
194-
- /opt:/__e/node20:ro,rshared
200+
- /opt:/__e/node24:ro,rshared
195201
strategy:
196202
fail-fast: false
197203
matrix:
198204
include:
199-
- container: node:18-alpine3.17
200-
nodejs_version_major: 18
201-
package: true
202-
- container: node:20-alpine3.18
205+
- container: node:20-alpine3.20
203206
nodejs_version_major: 20
207+
package: true
208+
- container: node:22-alpine3.20
209+
nodejs_version_major: 22
210+
- container: node:24-alpine3.22
211+
nodejs_version_major: 24
204212
steps:
205213
- name: Allow Linux musl containers on ARM64 runners # https://github.com/actions/runner/issues/801#issuecomment-2394425757
206214
shell: sh
@@ -211,13 +219,13 @@ jobs:
211219
ln -s /usr/bin/node /opt/bin/node
212220
- name: Dependencies
213221
run: apk add build-base git python3 font-noto --update-cache
214-
- uses: actions/checkout@v4
222+
- uses: actions/checkout@v6
215223
- run: npm install
216224
- run: npm run build
217225
- run: npm run test-unit
218226
- if: matrix.package
219227
run: npm run package-from-local-build
220-
- uses: actions/upload-artifact@v4
228+
- uses: actions/upload-artifact@v6
221229
if: matrix.package
222230
with:
223231
name: linuxmusl-arm64
@@ -238,20 +246,20 @@ jobs:
238246
base_image: "balenalib/rpi-raspbian:bullseye"
239247
nodejs_arch: armv6l
240248
nodejs_hostname: unofficial-builds.nodejs.org
241-
nodejs_version: "18.17.0"
242-
nodejs_version_major: 18
249+
nodejs_version: "20.9.0"
250+
nodejs_version_major: 20
243251
- platform: linux-s390x
244252
base_image: "--platform=linux/s390x s390x/debian:bookworm"
245253
nodejs_arch: s390x
246254
nodejs_hostname: nodejs.org
247-
nodejs_version: "18.17.0"
248-
nodejs_version_major: 18
255+
nodejs_version: "20.9.0"
256+
nodejs_version_major: 20
249257
- platform: linux-ppc64
250258
base_image: "--platform=linux/ppc64le ppc64le/debian:bookworm"
251259
nodejs_arch: ppc64le
252260
nodejs_hostname: nodejs.org
253-
nodejs_version: "18.17.0"
254-
nodejs_version_major: 18
261+
nodejs_version: "20.9.0"
262+
nodejs_version_major: 20
255263
- platform: linux-riscv64
256264
base_image: "--platform=linux/riscv64 riscv64/debian:trixie"
257265
compiler_flags: "-march=rv64gc"
@@ -260,7 +268,7 @@ jobs:
260268
nodejs_version: "20.19.5"
261269
nodejs_version_major: 20
262270
steps:
263-
- uses: actions/checkout@v4
271+
- uses: actions/checkout@v6
264272
- uses: uraimo/run-on-arch-action@v3
265273
with:
266274
arch: none
@@ -279,7 +287,7 @@ jobs:
279287
npm run build
280288
node --test test/unit/io.js
281289
npm run package-from-local-build
282-
- uses: actions/upload-artifact@v4
290+
- uses: actions/upload-artifact@v6
283291
with:
284292
name: ${{ matrix.platform }}
285293
path: npm/${{ matrix.platform }}
@@ -311,7 +319,7 @@ jobs:
311319
test "$EMSCRIPTEN_VERSION_LIBVIPS" = "$EMSCRIPTEN_VERSION_SHARP"
312320
- run: emmake npm run test-unit
313321
- run: emmake npm run package-from-local-build
314-
- uses: actions/upload-artifact@v4
322+
- uses: actions/upload-artifact@v6
315323
with:
316324
name: wasm32
317325
path: npm/wasm32
@@ -329,12 +337,12 @@ jobs:
329337
- build-emscripten
330338
steps:
331339
- uses: actions/checkout@v4
332-
- uses: actions/download-artifact@v4
340+
- uses: actions/download-artifact@v7
333341
with:
334342
path: npm
335343
- name: Create npm workspace tarball
336344
run: tar -vcaf npm-workspace.tar.xz --directory npm --exclude=from-local-build.js .
337-
- uses: actions/setup-node@v5
345+
- uses: actions/setup-node@v6
338346
with:
339347
node-version: '24'
340348
- name: Create release notes

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions
88

99
It can be used with all JavaScript runtimes
1010
that provide support for Node-API v9, including
11-
Node.js (^18.17.0 or >= 20.3.0), Deno and Bun.
11+
Node.js (>= 20.9.0), Deno and Bun.
1212

1313
Resizing an image is typically 4x-5x faster than using the
1414
quickest ImageMagick and GraphicsMagick settings

docs/src/content/docs/changelog/v0.35.0.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,3 +4,5 @@ slug: changelog/v0.35.0
44
---
55

66
* Upgrade to libvips v8.18.0 for upstream bug fixes.
7+
8+
* Drop support for Node.js 18, now requires Node.js >= 20.9.0.

docs/src/content/docs/index.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ smaller, web-friendly JPEG, PNG, WebP, GIF and AVIF images of varying dimensions
1010

1111
It can be used with all JavaScript runtimes
1212
that provide support for Node-API v9, including
13-
Node.js >= 18.17.0, Deno and Bun.
13+
Node.js >= 20.9.0, Deno and Bun.
1414

1515
Resizing an image is typically 4x-5x faster than using the
1616
quickest ImageMagick and GraphicsMagick settings

docs/src/content/docs/install.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ deno run --allow-env --allow-ffi --allow-read --allow-sys ...
3939

4040
## Prerequisites
4141

42-
* Node-API v9 compatible runtime e.g. Node.js ^18.17.0 or >=20.3.0.
42+
* Node-API v9 compatible runtime e.g. Node.js >= 20.9.0.
4343

4444
## Prebuilt binaries
4545

npm/darwin-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"./package": "./package.json"
3030
},
3131
"engines": {
32-
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
32+
"node": ">=20.9.0"
3333
},
3434
"os": [
3535
"darwin"

npm/darwin-x64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"./package": "./package.json"
3030
},
3131
"engines": {
32-
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
32+
"node": ">=20.9.0"
3333
},
3434
"os": [
3535
"darwin"

npm/linux-arm/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"./package": "./package.json"
3030
},
3131
"engines": {
32-
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
32+
"node": ">=20.9.0"
3333
},
3434
"config": {
3535
"glibc": ">=2.31"

npm/linux-arm64/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"./package": "./package.json"
3030
},
3131
"engines": {
32-
"node": "^18.17.0 || ^20.3.0 || >=21.0.0"
32+
"node": ">=20.9.0"
3333
},
3434
"config": {
3535
"glibc": ">=2.26"

0 commit comments

Comments
 (0)