Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add Node.js 22 and drop Node.js 16 #161

Merged
merged 6 commits into from
Jun 18, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:

strategy:
matrix:
node-version: [ 16, 18, 20, 21 ]
node-version: [ 16, 18, 20, 22 ]

steps:
- uses: actions/checkout@v4
Expand All @@ -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:
Expand Down
18 changes: 13 additions & 5 deletions .github/workflows/test-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ name: Node.js CI
on:
push:
branches: [ '*' ]
paths-ignore:
'*.md'
pull_request:
branches: [ main ]
workflow_dispatch:
Expand Down Expand Up @@ -60,7 +62,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
Expand Down Expand Up @@ -108,7 +116,7 @@ jobs:

strategy:
matrix:
node-version: [ 16, 18, 20, 21 ]
node-version: [ 16, 18, 20, 22 ]
gdal-version: [ 'shared', 'bundled' ]

steps:
Expand All @@ -122,7 +130,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:22.04 ${{ matrix.node-version }} ${{ matrix.gdal-version }}
env:
MOCHA_TEST_NETWORK: ${{ github.event.inputs.testNetwork }}

Expand Down Expand Up @@ -153,7 +161,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
Expand Down Expand Up @@ -223,7 +231,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
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down Expand Up @@ -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:
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test-release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,21 +17,19 @@ 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
- linux-version: fedora:37
node-version: 18
- linux-version: fedora:38
node-version: 20
exclude:
- linux-version: centos:stream9
node-version: 21

steps:
- uses: actions/checkout@v4
Expand All @@ -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
Expand Down
4 changes: 3 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
27 changes: 11 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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.

Expand All @@ -359,25 +359,20 @@ 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 21.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 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 platform*)
| Node.js 21.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 21.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 | Windows Server 2019 | bundled GDAL
| Node.js 16.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
---
11 changes: 10 additions & 1 deletion test/api_rasterband.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 })
Expand Down