Skip to content

Commit c9929cc

Browse files
committed
Bumped all dependencies and modernised CI for Node 20+/22+/24+
Fixes #1824 — prebuild-install failing on Node 22.14.0 due to N-API version string comparison bug in napi-build-utils < 2.0.0. Dependencies: - prebuild-install: ^7.1.1 -> ^7.1.3 (fixes N-API version detection) - prebuild: 12.1.0 -> 13.0.1 - tar: ^6.1.11 -> ^7.5.10 (fixes 6 HIGH CVEs) - node-addon-api: ^7.0.0 -> ^8.0.0 - node-gyp: 8.x -> 12.x (peer + optional) - Added engines field: node >=20.17.0 CI: - Node 18 -> 24, ubuntu-20.04 -> ubuntu-24.04, alpine3.15 -> alpine3.20 - Replaced macos-m1 self-hosted with macos-latest (now ARM64) - Removed pip install setuptools workaround - Updated actions (checkout v6, setup-node v6, upload-artifact v7, setup-qemu-action v4, setup-buildx-action v4) - Dockerfile: Node 18 -> 24, bullseye -> bookworm
1 parent 66d054a commit c9929cc

File tree

5 files changed

+33
-38
lines changed

5 files changed

+33
-38
lines changed

.github/workflows/ci.yml

Lines changed: 20 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -20,39 +20,31 @@ jobs:
2020
matrix:
2121
os:
2222
- macos-latest
23-
- ubuntu-20.04
23+
- ubuntu-24.04
2424
- windows-latest
2525
host:
2626
- x64
2727
target:
2828
- x64
2929
node:
30-
- 18
30+
- 24
3131
include:
3232
- os: windows-latest
33-
node: 18
33+
node: 24
3434
host: x86
3535
target: x86
36-
- os: macos-m1
37-
node: 18
36+
- os: macos-latest
37+
node: 24
3838
host: arm64
3939
target: arm64
4040
name: ${{ matrix.os }} (host=${{ matrix.host }}, target=${{ matrix.target }})
4141
steps:
42-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
43-
- uses: actions/setup-node@v4
42+
- uses: actions/checkout@v6
43+
- uses: actions/setup-node@v6
4444
with:
4545
node-version: ${{ matrix.node }}
4646
architecture: ${{ matrix.host }}
4747

48-
- name: Add yarn (self-hosted)
49-
if: matrix.os == 'macos-m1'
50-
run: npm install -g yarn
51-
52-
- name: Add setuptools for Python 3.12 (temp)
53-
if: matrix.os != 'macos-m1'
54-
run: pip install setuptools
55-
5648
- name: Add msbuild to PATH
5749
uses: microsoft/setup-msbuild@v1.3
5850
if: contains(matrix.os, 'windows')
@@ -98,16 +90,16 @@ jobs:
9890
run: yarn test
9991

10092
- name: Upload binaries to commit artifacts
101-
uses: actions/upload-artifact@v4
102-
if: matrix.node == 18
93+
uses: actions/upload-artifact@v7
94+
if: matrix.node == 24
10395
with:
10496
name: prebuilt-binaries
10597
path: prebuilds/*
10698
retention-days: 7
10799

108100
- name: Upload binaries to GitHub Release
109101
run: yarn upload --upload-all ${{ github.token }}
110-
if: matrix.node == 18 && startsWith(github.ref, 'refs/tags/')
102+
if: matrix.node == 24 && startsWith(github.ref, 'refs/tags/')
111103

112104
build-qemu:
113105
runs-on: ubuntu-latest
@@ -116,26 +108,26 @@ jobs:
116108
fail-fast: false
117109
matrix:
118110
node:
119-
- 18
111+
- 24
120112
target:
121113
- linux/arm64
122114
variant:
123-
- bullseye
124-
- alpine3.15
115+
- bookworm
116+
- alpine3.20
125117
include:
126118
# musl x64 builds
127119
- target: linux/amd64
128120
variant: alpine3.15
129-
node: 18
121+
node: 24
130122
name: ${{ matrix.variant }} (node=${{ matrix.node }}, target=${{ matrix.target }})
131123
steps:
132-
- uses: actions/checkout@b4ffde65f46336ab88eb53be808477a3936bae11 # v4
124+
- uses: actions/checkout@v6
133125

134126
- name: Set up QEMU
135-
uses: docker/setup-qemu-action@v3
127+
uses: docker/setup-qemu-action@v4
136128

137129
- name: Setup Docker Buildx
138-
uses: docker/setup-buildx-action@v3
130+
uses: docker/setup-buildx-action@v4
139131

140132
- name: Build binaries and test
141133
run: |
@@ -152,13 +144,13 @@ jobs:
152144
docker cp $CONTAINER_ID:/usr/src/build/prebuilds/ ./prebuilds
153145
154146
- name: Upload binaries to commit artifacts
155-
uses: actions/upload-artifact@v4
156-
if: matrix.node == 18
147+
uses: actions/upload-artifact@v7
148+
if: matrix.node == 24
157149
with:
158150
name: prebuilt-binaries
159151
path: prebuilds/*
160152
retention-days: 7
161153

162154
- name: Upload binaries to GitHub Release
163155
run: yarn install --ignore-scripts && yarn upload --upload-all ${{ github.token }}
164-
if: matrix.node == 18 && startsWith(github.ref, 'refs/tags/')
156+
if: matrix.node == 24 && startsWith(github.ref, 'refs/tags/')

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ yarn add sqlite3
3636

3737
### Prebuilt binaries
3838

39-
`sqlite3` v5+ was rewritten to use [Node-API](https://nodejs.org/api/n-api.html) so prebuilt binaries do not need to be built for specific Node versions. `sqlite3` currently builds for both Node-API v3 and v6. Check the [Node-API version matrix](https://nodejs.org/api/n-api.html#node-api-version-matrix) to ensure your Node version supports one of these. The prebuilt binaries should be supported on Node v10+.
39+
`sqlite3` v5+ was rewritten to use [Node-API](https://nodejs.org/api/n-api.html) so prebuilt binaries do not need to be built for specific Node versions. `sqlite3` currently builds for both Node-API v3 and v6. Check the [Node-API version matrix](https://nodejs.org/api/n-api.html#node-api-version-matrix) to ensure your Node version supports one of these. The prebuilt binaries should be supported on Node v20.17.0+.
4040

4141
The module uses [`prebuild-install`](https://github.com/prebuild/prebuild-install) to download the prebuilt binary for your platform, if it exists. These binaries are hosted on GitHub Releases for `sqlite3` versions above 5.0.2, and they are hosted on S3 otherwise. The following targets are currently provided:
4242

package.json

Lines changed: 9 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -45,25 +45,28 @@
4545
},
4646
"dependencies": {
4747
"bindings": "^1.5.0",
48-
"node-addon-api": "^7.0.0",
49-
"prebuild-install": "^7.1.1",
50-
"tar": "^6.1.11"
48+
"node-addon-api": "^8.0.0",
49+
"prebuild-install": "^7.1.3",
50+
"tar": "^7.5.10"
5151
},
5252
"devDependencies": {
5353
"eslint": "8.56.0",
5454
"mocha": "10.2.0",
55-
"prebuild": "12.1.0"
55+
"prebuild": "13.0.1"
5656
},
5757
"peerDependencies": {
58-
"node-gyp": "8.x"
58+
"node-gyp": "12.x"
5959
},
6060
"peerDependenciesMeta": {
6161
"node-gyp": {
6262
"optional": true
6363
}
6464
},
6565
"optionalDependencies": {
66-
"node-gyp": "8.x"
66+
"node-gyp": "12.x"
67+
},
68+
"engines": {
69+
"node": ">=20.17.0"
6770
},
6871
"scripts": {
6972
"install": "prebuild-install -r napi || node-gyp rebuild",

tools/BinaryBuilder.Dockerfile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
1-
ARG NODE_VERSION=18
2-
ARG VARIANT=bullseye
1+
ARG NODE_VERSION=24
2+
ARG VARIANT=bookworm
33

44
FROM node:$NODE_VERSION-$VARIANT
55

tools/semver-check.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@ const fs = require('fs');
22
const path = require('path');
33
const semver = require('semver');
44

5-
const supportedVersions = '10.12.0';
5+
const supportedVersions = '20.17.0';
66

77
function checkEngines(modulePath) {
88
const packageJsonPath = path.join(modulePath, 'package.json');

0 commit comments

Comments
 (0)