From eb0a46a7486e39ac8da6b1e2ca5222f1f9c78e6a Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Thu, 13 Jun 2024 21:18:10 +0200 Subject: [PATCH 1/6] add node.js 22 --- .github/workflows/publish.yml | 4 ++-- .github/workflows/test-dev.yml | 8 ++++---- .github/workflows/test-npm.yml | 4 ++-- .github/workflows/test-release.yml | 8 +++----- CHANGELOG.md | 4 +++- README.md | 8 ++++---- 6 files changed, 18 insertions(+), 18 deletions(-) diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index 27d706830..740fb25b4 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -10,7 +10,7 @@ jobs: strategy: matrix: - node-version: [ 16, 18, 20, 21 ] + node-version: [ 16, 18, 20, 22 ] steps: - uses: actions/checkout@v4 @@ -29,7 +29,7 @@ jobs: strategy: matrix: - node-version: [ 16.x, 18.x, 20.x, 21.x ] + node-version: [ 16.x, 18.x, 20.x, 22.x ] platforms: [ windows-2019, macos-12 ] steps: diff --git a/.github/workflows/test-dev.yml b/.github/workflows/test-dev.yml index 79d569a30..f8d3c64cd 100644 --- a/.github/workflows/test-dev.yml +++ b/.github/workflows/test-dev.yml @@ -108,7 +108,7 @@ jobs: strategy: matrix: - node-version: [ 16, 18, 20, 21 ] + node-version: [ 16, 18, 20, 22 ] gdal-version: [ 'shared', 'bundled' ] steps: @@ -122,7 +122,7 @@ jobs: with: max-size: 1000M key: node-${{ matrix.node-version }} - - run: npm run container dev ubuntu:20.04 ${{ matrix.node-version }} ${{ matrix.gdal-version }} + - run: npm run container dev ubuntu:24.04 ${{ matrix.node-version }} ${{ matrix.gdal-version }} env: MOCHA_TEST_NETWORK: ${{ github.event.inputs.testNetwork }} @@ -153,7 +153,7 @@ jobs: strategy: matrix: - node-version: [ 16.x, 18.x, 20.x, 21.x ] + node-version: [ 16.x, 18.x, 20.x, 22.x ] steps: - uses: actions/checkout@v4 @@ -223,7 +223,7 @@ jobs: strategy: matrix: - node-version: [ 16.x, 18.x, 20.x, 21.x ] + node-version: [ 16.x, 18.x, 20.x, 22.x ] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml index 714efa728..79f29a3b1 100644 --- a/.github/workflows/test-npm.yml +++ b/.github/workflows/test-npm.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - platforms: [ ubuntu-22.04, ubuntu-24.04, windows-2019, macos-12 ] + platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-11 ] node-version: [ 16.x, 18.x, 20.x, 21.x ] steps: @@ -48,7 +48,7 @@ jobs: strategy: matrix: - platforms: [ ubuntu-22.04, ubuntu-24.04, windows-2019, macos-12 ] + platforms: [ ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, windows-2019, macos-11 ] node-version: [ 16.x, 18.x, 20.x, 21.x ] steps: diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index ab956aaee..c59614a69 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -17,11 +17,12 @@ jobs: linux-version: - ubuntu:20.04 - ubuntu:22.04 + - ubuntu:24.04 - debian:buster - debian:bullseye - centos:stream9 - amazonlinux:2022 - node-version: [ 16, 18, 20, 21 ] + node-version: [ 16, 18, 20, 22 ] include: - linux-version: fedora:36 node-version: 18 @@ -29,9 +30,6 @@ jobs: node-version: 18 - linux-version: fedora:38 node-version: 20 - exclude: - - linux-version: centos:stream9 - node-version: 21 steps: - uses: actions/checkout@v4 @@ -51,7 +49,7 @@ jobs: strategy: matrix: platforms: [ windows-2019, macos-12 ] - node-version: [ 16.x, 18.x, 20.x, 21.x ] + node-version: [ 16.x, 18.x, 20.x, 22.x ] steps: - uses: actions/checkout@v4 diff --git a/CHANGELOG.md b/CHANGELOG.md index d97b461a1..af1b650ed 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,13 +9,15 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ### Added - GDAL 3.9.0 + - Node.js 22 support ### Changed - All shared library symbols are now hidden on Linux, allowing to load the binary addon in a process that has loaded a different version of GDAL (on Windows this has always been possible and on maOS, while possible in theory, this particular linking mode is not supported by `node-gyp`) ### Removed - Drop macOS 11 support - + - Drop Node.js 21 support + - Mark Node.js 16 as obsolete with a warning ## [3.8.5] 2024-04-09 diff --git a/README.md b/README.md index 2ff3cee44..e0a836e1c 100644 --- a/README.md +++ b/README.md @@ -364,20 +364,20 @@ Development versions are unit tested for the following targets: | Node.js 14.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 | Node.js 18.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 | Node.js 20.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 -| Node.js 21.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 +| Node.js 22.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 | Node.js 17.x | Ubuntu 22.04 | bundled GDAL | Node.js 18.x | Ubuntu 22.04 | bundled GDAL | Node.js 20.x | Ubuntu 22.04 | bundled GDAL (*code coverage platform*) -| Node.js 21.x | Ubuntu 22.04 | bundled GDAL +| Node.js 22.x | Ubuntu 22.04 | bundled GDAL | Node.js 16.x | Amazon Linux 2022 | bundled GDAL | Node.js 16.x | Windows Server 2019 | bundled GDAL | Node.js 17.x | Windows Server 2019 | bundled GDAL | Node.js 18.x | Windows Server 2019 | bundled GDAL | Node.js 20.x | Windows Server 2019 | bundled GDAL -| Node.js 21.x | Windows Server 2019 | bundled GDAL +| Node.js 22.x | Windows Server 2019 | bundled GDAL | Node.js 16.x | macOS Big Sur 11 | bundled GDAL | Node.js 17.x | macOS Big Sur 11 | bundled GDAL | Node.js 18.x | macOS Big Sur 11 | bundled GDAL | Node.js 20.x | macOS Big Sur 11 | bundled GDAL -| Node.js 21.x | macOS Big Sur 11 | bundled GDAL +| Node.js 22.x | macOS Big Sur 11 | bundled GDAL --- From 15da4f7551f0e0b37e311022c57838592af27d42 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Thu, 13 Jun 2024 22:53:16 +0200 Subject: [PATCH 2/6] seems that TypedArrays are no longer limited to 4G elements in Node.js 22 --- test/api_rasterband.test.ts | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/test/api_rasterband.test.ts b/test/api_rasterband.test.ts index 35aa9b07c..a01faddba 100644 --- a/test/api_rasterband.test.ts +++ b/test/api_rasterband.test.ts @@ -654,7 +654,16 @@ describe('gdal.RasterBand', () => { ds.rasterSize.x / 2, ds.rasterSize.y / 2, data) }, /Array length must be greater than/) }) - it('w/file over the 4G elements limit', () => { + it('w/file over the 4G elements limit', function() { + if (semver.gte(process.versions.node, '22.0.0')) { + // It seems that Node.js 22 (V8?) has removed the 32-bit index restrictions + // on TypedArrays + // (but not on Arrays which are part of the JavaScript specification) + // The new limit is Number.MAX_SAFE_INTEGER which is 8P (Peta) elements + // so there is nothing to test in this case + // (I can't find any official announcement, but testing confirms it) + this.skip() + } const ds = gdal.open(`${__dirname}/data/huge-sparse.tiff`) const band = ds.bands.get(1) assert.deepEqual(ds.rasterSize, { x: size, y: size }) From ee50a9fd2d330f018af61d10ab9654c994476815 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Tue, 18 Jun 2024 11:59:00 +0200 Subject: [PATCH 3/6] add ubuntu-24.04 as a testing platform --- .github/workflows/test-dev.yml | 8 +++++++- README.md | 22 +++++++++------------- 2 files changed, 16 insertions(+), 14 deletions(-) diff --git a/.github/workflows/test-dev.yml b/.github/workflows/test-dev.yml index f8d3c64cd..f47003be4 100644 --- a/.github/workflows/test-dev.yml +++ b/.github/workflows/test-dev.yml @@ -60,7 +60,13 @@ jobs: strategy: matrix: - linux-version: [ 'ubuntu:22.04', 'ubuntu:20.04', 'debian:bullseye', 'fedora:37', 'centos:stream9' ] + linux-version: + - ubuntu:20.04 + - ubuntu:22.04 + - ubuntu:24.04 + - debian:bullseye + - fedora:37 + - centos:stream9 steps: - uses: actions/checkout@v4 diff --git a/README.md b/README.md index e0a836e1c..83ff6b2fc 100644 --- a/README.md +++ b/README.md @@ -337,7 +337,7 @@ Unless required by applicable law or agreed to in writing, software distributed Release binaries with pre-built bundled GDAL are tested against the full matrix of: * Node.js versions: 14.x, 16.x, 17.x, 18.x, 20.x -* OS: Ubuntu 20.04, Ubuntu 22.04, CentOS 9 Stream, Fedora 36, Fedora 37, Debian 10 buster, Debian 11 bullseye, Arch Linux current, Amazon Linux, Windows Server 2019, macOS Catalina 10.15 (EOL), macOS Big Sur 11 +* OS: Ubuntu 20.04, Ubuntu 22.04, CentOS 9 Stream, Fedora 36, Fedora 37, Debian 10 buster, Debian 11 bullseye, Arch Linux current, Amazon Linux, Windows Server 2019, macOS Catalina 10.15 (EOL), macOS Monterey 12 On Ubuntu 16.04, Amazon Linux, Windows and macOS only the bundled GDAL version is officially supported. On all other platforms both the bundled and the system-installed versions are supported. @@ -359,15 +359,11 @@ Development versions are unit tested for the following targets: | Node.js 18.x | Fedora 37 | system-installed GDAL 3.5.2 | Node.js 18.x | Fedora 37 | bundled GDAL | Node.js 20.x | Fedora 38 | bundled GDAL -| Node.js 17.x | Ubuntu 20.04 | system-installed GDAL 3.0.4 -| Node.js 18.x | Ubuntu 20.04 | system-installed GDAL 3.0.4 -| Node.js 14.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 -| Node.js 18.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 +| Node.js 20.x | Ubuntu 20.04 | system-installed GDAL 3.0.4 | Node.js 20.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 -| Node.js 22.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 -| Node.js 17.x | Ubuntu 22.04 | bundled GDAL +| Node.js 20.x | Ubuntu 24.04 | system-installed GDAL 3.8.4 | Node.js 18.x | Ubuntu 22.04 | bundled GDAL -| Node.js 20.x | Ubuntu 22.04 | bundled GDAL (*code coverage platform*) +| Node.js 20.x | Ubuntu 22.04 | bundled GDAL (*code coverage and development platform*) | Node.js 22.x | Ubuntu 22.04 | bundled GDAL | Node.js 16.x | Amazon Linux 2022 | bundled GDAL | Node.js 16.x | Windows Server 2019 | bundled GDAL @@ -375,9 +371,9 @@ Development versions are unit tested for the following targets: | Node.js 18.x | Windows Server 2019 | bundled GDAL | Node.js 20.x | Windows Server 2019 | bundled GDAL | Node.js 22.x | Windows Server 2019 | bundled GDAL -| Node.js 16.x | macOS Big Sur 11 | bundled GDAL -| Node.js 17.x | macOS Big Sur 11 | bundled GDAL -| Node.js 18.x | macOS Big Sur 11 | bundled GDAL -| Node.js 20.x | macOS Big Sur 11 | bundled GDAL -| Node.js 22.x | macOS Big Sur 11 | bundled GDAL +| Node.js 16.x | macOS Monterey 12 | bundled GDAL +| Node.js 17.x | macOS Monterey 12 | bundled GDAL +| Node.js 18.x | macOS Monterey 12 | bundled GDAL +| Node.js 20.x | macOS Monterey 12 | bundled GDAL +| Node.js 22.x | macOS Monterey 12 | bundled GDAL --- From 2c5aafae166c04c66decc2ebe5e18e8dcc7fa5da Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Tue, 18 Jun 2024 12:06:53 +0200 Subject: [PATCH 4/6] main testing platform is still 22.04 --- .github/workflows/test-dev.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-dev.yml b/.github/workflows/test-dev.yml index f47003be4..28ef189a7 100644 --- a/.github/workflows/test-dev.yml +++ b/.github/workflows/test-dev.yml @@ -128,7 +128,7 @@ jobs: with: max-size: 1000M key: node-${{ matrix.node-version }} - - run: npm run container dev ubuntu:24.04 ${{ matrix.node-version }} ${{ matrix.gdal-version }} + - run: npm run container dev ubuntu:22.04 ${{ matrix.node-version }} ${{ matrix.gdal-version }} env: MOCHA_TEST_NETWORK: ${{ github.event.inputs.testNetwork }} From e9ef0928d143804ae89b9f7fc1d3223917410b5e Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Tue, 18 Jun 2024 12:07:59 +0200 Subject: [PATCH 5/6] update the testing platform list --- README.md | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/README.md b/README.md index 83ff6b2fc..61be4a59c 100644 --- a/README.md +++ b/README.md @@ -362,17 +362,16 @@ Development versions are unit tested for the following targets: | Node.js 20.x | Ubuntu 20.04 | system-installed GDAL 3.0.4 | Node.js 20.x | Ubuntu 22.04 | system-installed GDAL 3.4.1 | Node.js 20.x | Ubuntu 24.04 | system-installed GDAL 3.8.4 +| Node.js 16.x | Ubuntu 22.04 | bundled GDAL | Node.js 18.x | Ubuntu 22.04 | bundled GDAL | Node.js 20.x | Ubuntu 22.04 | bundled GDAL (*code coverage and development platform*) | Node.js 22.x | Ubuntu 22.04 | bundled GDAL | Node.js 16.x | Amazon Linux 2022 | bundled GDAL | Node.js 16.x | Windows Server 2019 | bundled GDAL -| Node.js 17.x | Windows Server 2019 | bundled GDAL | Node.js 18.x | Windows Server 2019 | bundled GDAL | Node.js 20.x | Windows Server 2019 | bundled GDAL | Node.js 22.x | Windows Server 2019 | bundled GDAL | Node.js 16.x | macOS Monterey 12 | bundled GDAL -| Node.js 17.x | macOS Monterey 12 | bundled GDAL | Node.js 18.x | macOS Monterey 12 | bundled GDAL | Node.js 20.x | macOS Monterey 12 | bundled GDAL | Node.js 22.x | macOS Monterey 12 | bundled GDAL From f51c8eb7588092d130ce6ad445db66eb68fab242 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Tue, 18 Jun 2024 12:09:17 +0200 Subject: [PATCH 6/6] ignore markdown changes for CI --- .github/workflows/test-dev.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/.github/workflows/test-dev.yml b/.github/workflows/test-dev.yml index 28ef189a7..c01bfaa8e 100644 --- a/.github/workflows/test-dev.yml +++ b/.github/workflows/test-dev.yml @@ -6,6 +6,8 @@ name: Node.js CI on: push: branches: [ '*' ] + paths-ignore: + '*.md' pull_request: branches: [ main ] workflow_dispatch: