Skip to content

Commit 8456c3f

Browse files
authored
Update node support to v26, remove node v20, update NAN to 2.27.0 (maplibre#4322)
1 parent f6d70e9 commit 8456c3f

8 files changed

Lines changed: 119 additions & 78 deletions

File tree

.github/workflows/node-ci.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -197,7 +197,7 @@ jobs:
197197
with:
198198
# downloaded with platform/node/cmake/module.cmake
199199
path: build/headers
200-
key: ${{ runner.os }}-${{ runner.arch }}-cmake-node-module-deps
200+
key: ${{ runner.os }}-${{ runner.arch }}-cmake-node-module-deps-${{ hashFiles('platform/node/.nvmrc') }}
201201

202202
- name: Configure maplibre-native (MacOS)
203203
if: runner.os == 'macOS'
@@ -289,7 +289,7 @@ jobs:
289289
GALLIUM_DRIVER: llvmpipe
290290
run: |
291291
(Invoke-WebRequest https://api.github.com/repos/pal1000/mesa-dist-win/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa3d-.+-release-msvc\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z }
292-
& 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll
292+
& 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v147 .\mesa3d.7z x64\opengl32.dll x64\libgallium_wgl.dll x64\libGLESv2.dll
293293
npm test
294294
295295
- name: Test (Windows ARM64)
@@ -301,7 +301,7 @@ jobs:
301301
GALLIUM_DRIVER: llvmpipe
302302
run: |
303303
(Invoke-WebRequest https://api.github.com/repos/mmozeiko/build-mesa/releases -Headers @{ Authorization = ('Bearer {0}' -f '${{ secrets.GITHUB_TOKEN }}') } | ConvertFrom-Json)[0].assets | Where-Object name -match 'mesa-llvmpipe-arm64-.+\.7z' | foreach { Invoke-WebRequest $_.browser_download_url -OutFile mesa3d.7z }
304-
& 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v137 .\mesa3d.7z opengl32.dll libGLESv2.dll
304+
& 'C:\Program Files\7-Zip\7z.exe' e -olib\node-v147 .\mesa3d.7z opengl32.dll libGLESv2.dll
305305
npm test
306306
# On PRs make sure that the npm package can be packaged.
307307
- name: Pack

.github/workflows/node-release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -172,7 +172,7 @@ jobs:
172172
with:
173173
# downloaded with platform/node/cmake/module.cmake
174174
path: build/headers
175-
key: ${{ runner.os }}-${{ runner.arch }}-cmake-node-module-deps
175+
key: ${{ runner.os }}-${{ runner.arch }}-cmake-node-module-deps-${{ hashFiles('platform/node/.nvmrc') }}
176176

177177
- name: Configure maplibre-native (MacOS)
178178
if: runner.os == 'MacOS'

platform/node/.nvmrc

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
24
1+
26

platform/node/CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
set(NODE_MODULE_MINIMUM_ABI 115) # Minimum supported Node.js version: 20
1+
set(NODE_MODULE_MINIMUM_ABI 127) # Minimum supported Node.js version: 22
22
set(NODE_MODULE_CACHE_DIR ${CMAKE_BINARY_DIR}/headers)
33

44
if(DEFINED ENV{MSYSTEM})
@@ -12,7 +12,7 @@ include(${CMAKE_CURRENT_LIST_DIR}/cmake/module.cmake)
1212
add_node_module(
1313
mbgl-node
1414
INSTALL_PATH ${PROJECT_SOURCE_DIR}/platform/node/lib/{node_abi}/mbgl.node
15-
NAN_VERSION 2.25.0
15+
NAN_VERSION 2.27.0
1616
EXCLUDE_NODE_ABIS
1717
46
1818
47

platform/node/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ Binaries are available and downloaded during install for the following platforms
1111
- Ubuntu 24.04 (amd64/arm64)
1212
- macOS (amd64/arm64)
1313
- Windows (amd64/arm64)
14-
- Node.js 20, 22, 24
14+
- Node.js 22, 24, 26
1515

1616
Run:
1717

0 commit comments

Comments
 (0)