Skip to content

Commit c62c0f2

Browse files
committed
Merge remote-tracking branch 'origin/main' into timfish/feat/no-install-script
2 parents 13c725e + 45bc131 commit c62c0f2

15 files changed

Lines changed: 102 additions & 19 deletions

.github/workflows/ci.yml

Lines changed: 68 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: |
@@ -227,6 +278,19 @@ jobs:
227278
if: matrix.arch != 'arm64'
228279
run: yarn build:bindings:configure
229280

281+
- name: Remove unsupported Node LTO flags
282+
if: matrix.os == 'windows-2022' && matrix.node == 26 && matrix.arch != 'arm64'
283+
shell: pwsh
284+
run: |
285+
$projectFiles = Get-ChildItem -Path build -Filter *.vcxproj -Recurse
286+
foreach ($file in $projectFiles) {
287+
$content = Get-Content -Raw -Path $file.FullName
288+
$content = $content -replace '(?i)\s*-flto=(thin|full)', ''
289+
$content = $content -replace '(?i)\s*/flto=(thin|full)', ''
290+
$content = $content -replace '(?i)\s*/opt:lldltojobs=\d+', ''
291+
Set-Content -Path $file.FullName -Value $content -NoNewline
292+
}
293+
230294
- name: Configure node-gyp (arm64, ${{ contains(matrix.container, 'alpine') && 'musl' || 'glibc' }})
231295
if: matrix.arch == 'arm64' && matrix.target_platform != 'darwin'
232296
run: yarn build:bindings:configure:arm64
@@ -286,6 +350,9 @@ jobs:
286350
with:
287351
node-version-file: "package.json"
288352

353+
- name: Install Yarn (if not yet installed)
354+
run: yarn --version || npm install -g yarn@1.22.22
355+
289356
- name: Install dependencies
290357
run: yarn install --ignore-engines --ignore-scripts --frozen-lockfile
291358

@@ -324,7 +391,7 @@ jobs:
324391
macos-15-intel, # macOS x64
325392
windows-latest,
326393
]
327-
node: [18, 20, 22, 24, 25]
394+
node: [18, 20, 22, 24, 26]
328395
steps:
329396
- name: Check out current commit
330397
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4

CHANGELOG.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
# Changelog
22

3+
## 0.5.1
4+
5+
### Internal Changes 🔧
6+
7+
- Rename node native stacktrace package by @logaretm in [#40](https://github.com/getsentry/sentry-javascript-node-native-stacktrace/pull/40)
8+
9+
## 0.5.0
10+
11+
### New Features ✨
12+
13+
- Support Node v26 by @timfish in [#38](https://github.com/getsentry/sentry-javascript-node-native-stacktrace/pull/38)
14+
15+
### Internal Changes 🔧
16+
17+
- Remove changelog-preview.yml by @chargome in [#37](https://github.com/getsentry/sentry-javascript-node-native-stacktrace/pull/37)
18+
319
## 0.4.1
420

521
### Bug Fixes 🐛

README.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# `@sentry-internal/node-native-stacktrace`
1+
# `@sentry/node-native-stacktrace`
22

33
A native Node.js module that can capture JavaScript stack traces for registered
44
main or worker threads from any other thread, even if event loops are blocked.
@@ -22,7 +22,7 @@ feature.
2222
In your main thread or worker threads:
2323

2424
```ts
25-
import { registerThread } from "@sentry-internal/node-native-stacktrace";
25+
import { registerThread } from "@sentry/node-native-stacktrace";
2626

2727
// Register this thread for monitoring
2828
registerThread();
@@ -31,7 +31,7 @@ registerThread();
3131
### 2. Capture stack traces from any thread
3232

3333
```ts
34-
import { captureStackTrace } from "@sentry-internal/node-native-stacktrace";
34+
import { captureStackTrace } from "@sentry/node-native-stacktrace";
3535

3636
// Capture stack traces from all registered threads
3737
const stacks = captureStackTrace();
@@ -115,7 +115,7 @@ Send regular heartbeats:
115115
import {
116116
registerThread,
117117
threadPoll,
118-
} from "@sentry-internal/node-native-stacktrace";
118+
} from "@sentry/node-native-stacktrace";
119119
import { AsyncLocalStorage } from "node:async_hooks";
120120

121121
// Create async local storage for state tracking
@@ -140,7 +140,7 @@ Monitor all registered threads from a dedicated thread:
140140
import {
141141
captureStackTrace,
142142
getThreadsLastSeen,
143-
} from "@sentry-internal/node-native-stacktrace";
143+
} from "@sentry/node-native-stacktrace";
144144

145145
const THRESHOLD = 1000; // 1 second
146146

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
2-
"name": "@sentry-internal/node-native-stacktrace",
3-
"version": "0.4.1",
2+
"name": "@sentry/node-native-stacktrace",
3+
"version": "0.5.1",
44
"main": "lib/index.js",
55
"types": "lib/index.d.ts",
66
"repository": "git://github.com/getsentry/sentry-javascript-node-native-stacktrace.git",

test/async-storage.mjs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
import { AsyncLocalStorage } from 'node:async_hooks';
22
import { Worker } from 'node:worker_threads';
3-
import { registerThread } from '@sentry-internal/node-native-stacktrace';
3+
import { registerThread } from '@sentry/node-native-stacktrace';
44
import { longWork } from './long-work.js';
55

66
const asyncLocalStorage = new AsyncLocalStorage();

test/package.json.template

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,6 @@
22
"name": "node-native-stacktrace-test",
33
"license": "MIT",
44
"dependencies": {
5-
"@sentry-internal/node-native-stacktrace": "{{path}}"
5+
"@sentry/node-native-stacktrace": "{{path}}"
66
}
77
}

test/stack-traces.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const { Worker } = require('node:worker_threads');
22
const { longWork } = require('./long-work.js');
3-
const { registerThread } = require('@sentry-internal/node-native-stacktrace');
3+
const { registerThread } = require('@sentry/node-native-stacktrace');
44

55
registerThread();
66

test/stalled-disabled.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
const { Worker } = require('node:worker_threads');
22
const { AsyncLocalStorage } = require('node:async_hooks');
33
const { longWork } = require('./long-work.js');
4-
const { registerThread, threadPoll } = require('@sentry-internal/node-native-stacktrace');
4+
const { registerThread, threadPoll } = require('@sentry/node-native-stacktrace');
55

66
const asyncLocalStorage = new AsyncLocalStorage();
77
asyncLocalStorage.enterWith({ some_property: 'some_value' });

test/stalled-forever.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
const { Worker } = require('node:worker_threads');
2-
const { registerThread, threadPoll } = require('@sentry-internal/node-native-stacktrace');
2+
const { registerThread, threadPoll } = require('@sentry/node-native-stacktrace');
33

44
registerThread();
55

test/stalled-watchdog.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
const { captureStackTrace, getThreadsLastSeen } = require('@sentry-internal/node-native-stacktrace');
1+
const { captureStackTrace, getThreadsLastSeen } = require('@sentry/node-native-stacktrace');
22

33
const THRESHOLD = 500; // 1 second
44

0 commit comments

Comments
 (0)