Skip to content

Commit 213b6bc

Browse files
authored
feat: Support Node v26 (#38)
1 parent 6c29f13 commit 213b6bc

2 files changed

Lines changed: 76 additions & 1 deletion

File tree

.github/workflows/ci.yml

Lines changed: 55 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,8 @@ jobs:
2222
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2323
with:
2424
node-version-file: "package.json"
25+
- name: Install Yarn (if not yet installed)
26+
run: yarn --version || npm install -g yarn@1.22.22
2527
- name: Install dependencies
2628
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
2729
- name: Lint
@@ -54,6 +56,10 @@ jobs:
5456
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
5557
node: 24
5658
binary: linux-x64-glibc-137
59+
- os: ubuntu-22.04
60+
container: ghcr.io/getsentry/sentry-test-ubuntu-20.04-amd64:0dd255f3d41d013c1db4c4e08ffd22ee7959c3cc
61+
node: 26
62+
binary: linux-x64-glibc-147
5763

5864
# x64 musl
5965
- os: ubuntu-22.04
@@ -72,6 +78,10 @@ jobs:
7278
container: node:24-alpine3.20
7379
node: 24
7480
binary: linux-x64-musl-137
81+
- os: ubuntu-22.04
82+
container: node:26-alpine3.22
83+
node: 26
84+
binary: linux-x64-musl-147
7585

7686
# arm64 glibc
7787
- os: ubuntu-22.04
@@ -90,6 +100,10 @@ jobs:
90100
arch: arm64
91101
node: 24
92102
binary: linux-arm64-glibc-137
103+
- os: ubuntu-22.04
104+
arch: arm64
105+
node: 26
106+
binary: linux-arm64-glibc-147
93107

94108
# arm64 musl
95109
- os: ubuntu-22.04
@@ -112,6 +126,11 @@ jobs:
112126
container: node:24-alpine3.20
113127
node: 24
114128
binary: linux-arm64-musl-137
129+
- os: ubuntu-22.04
130+
arch: arm64
131+
container: node:26-alpine3.22
132+
node: 26
133+
binary: linux-arm64-musl-147
115134

116135
# macos x64
117136
- os: macos-15-intel
@@ -130,6 +149,10 @@ jobs:
130149
node: 24
131150
arch: x64
132151
binary: darwin-x64-137
152+
- os: macos-15-intel
153+
node: 26
154+
arch: x64
155+
binary: darwin-x64-147
133156

134157
# macos arm64
135158
- os: macos-15
@@ -152,6 +175,11 @@ jobs:
152175
node: 24
153176
target_platform: darwin
154177
binary: darwin-arm64-137
178+
- os: macos-15
179+
arch: arm64
180+
node: 26
181+
target_platform: darwin
182+
binary: darwin-arm64-147
155183

156184
# windows x64
157185
- os: windows-2022
@@ -170,6 +198,10 @@ jobs:
170198
node: 24
171199
arch: x64
172200
binary: win32-x64-137
201+
- os: windows-2022
202+
node: 26
203+
arch: x64
204+
binary: win32-x64-147
173205

174206
steps:
175207
- name: Setup (alpine)
@@ -191,6 +223,9 @@ jobs:
191223
with:
192224
node-version: ${{ matrix.node }}
193225

226+
- name: Install Yarn (if not yet installed)
227+
run: yarn --version || npm install -g yarn@1.22.22
228+
194229
- name: Increase yarn network timeout on Windows
195230
if: contains(matrix.os, 'windows')
196231
run: yarn config set network-timeout 600000 -g
@@ -209,6 +244,22 @@ jobs:
209244
with:
210245
python-version: "3.9.13"
211246

247+
# Node 26 V8 headers include <source_location>, which requires a newer C++ toolchain.
248+
# Our ubuntu-20.04 glibc container defaults to an older compiler, so upgrade only this target.
249+
- name: Setup compiler (Node 26 glibc x64)
250+
if: matrix.binary == 'linux-x64-glibc-147'
251+
run: |
252+
# The base container ships a stale Yarn apt source with an expired/missing key.
253+
# Remove it so apt-get update can succeed for toolchain installation.
254+
rm -f /etc/apt/sources.list.d/yarn.list
255+
apt-get update
256+
apt-get install -y software-properties-common
257+
add-apt-repository -y ppa:ubuntu-toolchain-r/test
258+
apt-get update
259+
apt-get install -y gcc-12 g++-12
260+
echo "CC=gcc-12" >> "$GITHUB_ENV"
261+
echo "CXX=g++-12" >> "$GITHUB_ENV"
262+
212263
- name: Setup (arm64| ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }})
213264
if: matrix.arch == 'arm64' && !contains(matrix.container, 'alpine') && matrix.target_platform != 'darwin'
214265
run: |
@@ -286,6 +337,9 @@ jobs:
286337
with:
287338
node-version-file: "package.json"
288339

340+
- name: Install Yarn (if not yet installed)
341+
run: yarn --version || npm install -g yarn@1.22.22
342+
289343
- name: Install dependencies
290344
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
291345

@@ -324,7 +378,7 @@ jobs:
324378
macos-15-intel, # macOS x64
325379
windows-latest,
326380
]
327-
node: [18, 20, 22, 24, 25]
381+
node: [18, 20, 22, 24, 26]
328382
steps:
329383
- name: Check out current commit
330384
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

src/index.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -93,6 +93,9 @@ function getNativeModule(): Native {
9393
if (abi === '137') {
9494
return require('./stack-trace-darwin-x64-137.node');
9595
}
96+
if (abi === '147') {
97+
return require('./stack-trace-darwin-x64-147.node');
98+
}
9699
}
97100

98101
if (arch === 'arm64') {
@@ -108,6 +111,9 @@ function getNativeModule(): Native {
108111
if (abi === '137') {
109112
return require('./stack-trace-darwin-arm64-137.node');
110113
}
114+
if (abi === '147') {
115+
return require('./stack-trace-darwin-arm64-147.node');
116+
}
111117
}
112118
}
113119

@@ -125,6 +131,9 @@ function getNativeModule(): Native {
125131
if (abi === '137') {
126132
return require('./stack-trace-win32-x64-137.node');
127133
}
134+
if (abi === '147') {
135+
return require('./stack-trace-win32-x64-147.node');
136+
}
128137
}
129138
}
130139

@@ -143,6 +152,9 @@ function getNativeModule(): Native {
143152
if (abi === '137') {
144153
return require('./stack-trace-linux-x64-musl-137.node');
145154
}
155+
if (abi === '147') {
156+
return require('./stack-trace-linux-x64-musl-147.node');
157+
}
146158
}
147159
if (stdlib === 'glibc') {
148160
if (abi === '108') {
@@ -157,6 +169,9 @@ function getNativeModule(): Native {
157169
if (abi === '137') {
158170
return require('./stack-trace-linux-x64-glibc-137.node');
159171
}
172+
if (abi === '147') {
173+
return require('./stack-trace-linux-x64-glibc-147.node');
174+
}
160175
}
161176
}
162177
if (arch === 'arm64') {
@@ -173,6 +188,9 @@ function getNativeModule(): Native {
173188
if (abi === '137') {
174189
return require('./stack-trace-linux-arm64-musl-137.node');
175190
}
191+
if (abi === '147') {
192+
return require('./stack-trace-linux-arm64-musl-147.node');
193+
}
176194
}
177195

178196
if (stdlib === 'glibc') {
@@ -188,6 +206,9 @@ function getNativeModule(): Native {
188206
if (abi === '137') {
189207
return require('./stack-trace-linux-arm64-glibc-137.node');
190208
}
209+
if (abi === '147') {
210+
return require('./stack-trace-linux-arm64-glibc-147.node');
211+
}
191212
}
192213
}
193214
}

0 commit comments

Comments
 (0)