Skip to content

Commit ae953ec

Browse files
authored
BREAKING CHANGE: drop EOL Node.js v18 and Electron v26, v27, and v28. Add node v24 to build matrix. (#1371)
BREAKING CHANGE: drop EOL Node.js v18 and Electron v26, v27, and v28 (EOL for > 1yr).
1 parent 335ccad commit ae953ec

File tree

4 files changed

+18
-16
lines changed

4 files changed

+18
-16
lines changed

.github/workflows/build.yml

Lines changed: 13 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,12 @@ on:
1414

1515
env:
1616
# See https://github.com/nodejs/release#release-schedule
17-
# Node.js v16 EOL = 2023-09-11. v21 EOL = 2024-06-01.
18-
NODE_BUILD_CMD: npx --no-install prebuild -r node -t 18.0.0 -t 20.0.0 -t 22.0.0 -t 23.0.0 --include-regex 'better_sqlite3.node$'
19-
# Merge with NODE_BUILD_CMD when Node.js v18 is EOL
20-
NO_V18_NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 -t 23.0.0 --include-regex 'better_sqlite3.node$'
17+
# Node.js v20 EOL = 2026-04-30. v22 EOL = 2027-04-30. v23 EOL = 2025-06-01. v24 EOL = 2028-04-30.
18+
NODE_BUILD_CMD: npx --no-install prebuild -r node -t 20.0.0 -t 22.0.0 -t 23.0.0 -t 24.0.0 --include-regex 'better_sqlite3.node$'
19+
2120
# See https://www.electronjs.org/docs/latest/tutorial/electron-timelines#version-support-policy
22-
# Electron v25 EOL = 2023-12-05. v26 EOL = 2024-02-20. v27 EOL = 2024-04-16. v28 EOL = 2024-06-11. v29 EOL = 2024-08-20.
23-
ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 26.0.0 -t 27.0.0 -t 28.0.0 -t 29.0.0 -t 30.0.0 -t 31.0.0 -t 32.0.0 -t 33.0.0 -t 34.0.0 -t 35.0.0 -t 36.0.0 --include-regex 'better_sqlite3.node$'
21+
# Electron v29 EOL = 2024-08-20. v30 EOL = 2024-10-15. v31 EOL = 2025-01-14. v32 EOL = 2025-03-11. v33 EOL = 2025-05-13. v34 EOL = 2025-06-24. v35 EOL = 2025-09-02. v36 EOL = 2025-10-28.
22+
ELECTRON_BUILD_CMD: npx --no-install prebuild -r electron -t 29.0.0 -t 30.0.0 -t 31.0.0 -t 32.0.0 -t 33.0.0 -t 34.0.0 -t 35.0.0 -t 36.0.0 --include-regex 'better_sqlite3.node$'
2423

2524
jobs:
2625
test:
@@ -32,10 +31,10 @@ jobs:
3231
- macos-14
3332
- windows-2019
3433
node:
35-
- 18
3634
- 20
3735
- 22
3836
- 23
37+
- 24
3938
name: Testing Node ${{ matrix.node }} on ${{ matrix.os }}
4039
runs-on: ${{ matrix.os }}
4140
steps:
@@ -78,7 +77,7 @@ jobs:
7877
- uses: actions/checkout@v4
7978
- uses: actions/setup-node@v4
8079
with:
81-
node-version: 18
80+
node-version: 20
8281
registry-url: https://registry.npmjs.org
8382
- run: npm publish
8483
env:
@@ -100,7 +99,7 @@ jobs:
10099
- uses: actions/checkout@v4
101100
- uses: actions/setup-node@v4
102101
with:
103-
node-version: 18
102+
node-version: 20
104103
- if: ${{ startsWith(matrix.os, 'windows') }}
105104
run: pip.exe install setuptools
106105
- if: ${{ startsWith(matrix.os, 'macos') }}
@@ -111,15 +110,15 @@ jobs:
111110
- if: matrix.os == 'windows-2019'
112111
run: |
113112
${{ env.NODE_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
114-
${{ env.NO_V18_NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
113+
${{ env.NODE_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
115114
${{ env.ELECTRON_BUILD_CMD }} --arch ia32 -u ${{ secrets.GITHUB_TOKEN }}
116115
${{ env.ELECTRON_BUILD_CMD }} --arch arm64 -u ${{ secrets.GITHUB_TOKEN }}
117116
118117
prebuild-linux-x64:
119118
if: ${{ github.event_name == 'release' }}
120119
name: Prebuild on Linux x64
121120
runs-on: ubuntu-latest
122-
container: node:18-bullseye
121+
container: node:20-bullseye
123122
needs: test
124123
steps:
125124
- uses: actions/checkout@v4
@@ -131,7 +130,7 @@ jobs:
131130
if: ${{ github.event_name == 'release' }}
132131
name: Prebuild on alpine
133132
runs-on: ubuntu-latest
134-
container: node:18-alpine
133+
container: node:20-alpine
135134
needs: test
136135
steps:
137136
- uses: actions/checkout@v4
@@ -154,7 +153,7 @@ jobs:
154153
- uses: actions/checkout@v4
155154
- uses: docker/setup-qemu-action@v3
156155
- run: |
157-
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-alpine -c "\
156+
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:20-alpine -c "\
158157
apk add build-base git python3 py3-setuptools --update-cache && \
159158
cd /tmp/project && \
160159
npm install --ignore-scripts && \
@@ -175,7 +174,7 @@ jobs:
175174
- uses: actions/checkout@v4
176175
- uses: docker/setup-qemu-action@v3
177176
- run: |
178-
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:18-bullseye -c "\
177+
docker run --rm -v $(pwd):/tmp/project --entrypoint /bin/sh --platform linux/${{ matrix.arch }} node:20-bullseye -c "\
179178
cd /tmp/project && \
180179
npm install --ignore-scripts && \
181180
${{ env.NODE_BUILD_CMD }} -u ${{ secrets.GITHUB_TOKEN }} && \

.github/workflows/bump-version.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
fetch-depth: 0
2424
- uses: actions/setup-node@v4
2525
with:
26-
node-version: 18
26+
node-version: 20
2727
- name: Configure user
2828
run: |
2929
git config --local user.name "${{ github.actor }}"

.github/workflows/update-sqlite.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ jobs:
2424
fetch-depth: 0
2525
- uses: actions/setup-node@v4
2626
with:
27-
node-version: 18
27+
node-version: 20
2828
- name: Create new update branch
2929
run: git checkout -b sqlite-update-${{ env.ENV_VERSION }}
3030
- name: Update download script

package.json

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@
1515
"lib/**",
1616
"deps/**"
1717
],
18+
"engines": {
19+
"node": "20.x || 22.x || 23.x || 24.x"
20+
},
1821
"dependencies": {
1922
"bindings": "^1.5.0",
2023
"prebuild-install": "^7.1.1"

0 commit comments

Comments
 (0)