Skip to content

Commit 5dd37a6

Browse files
authored
feat: Support Node 24 (#16236)
resolves #16058 Profiling binary bump: getsentry/sentry-javascript-profiling-node-binaries#12
1 parent db2f604 commit 5dd37a6

File tree

5 files changed

+27
-21
lines changed

5 files changed

+27
-21
lines changed

.github/workflows/build.yml

+3-3
Original file line numberDiff line numberDiff line change
@@ -475,7 +475,7 @@ jobs:
475475
strategy:
476476
fail-fast: false
477477
matrix:
478-
node: [18, 20, 22]
478+
node: [18, 20, 22, 24]
479479
steps:
480480
- name: Check out base commit (${{ github.event.pull_request.base.sha }})
481481
uses: actions/checkout@v4
@@ -713,12 +713,12 @@ jobs:
713713
strategy:
714714
fail-fast: false
715715
matrix:
716-
node: ['18.20.5', 20, 22]
716+
node: ['18.20.5', 20, 22, 24]
717717
typescript:
718718
- false
719719
include:
720720
# Only check typescript for latest version (to streamline CI)
721-
- node: 22
721+
- node: 24
722722
typescript: '3.8'
723723
steps:
724724
- name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }})

packages/profiling-node/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@
6262
"test:watch": "vitest --watch"
6363
},
6464
"dependencies": {
65-
"@sentry-internal/node-cpu-profiler": "^2.0.0",
65+
"@sentry-internal/node-cpu-profiler": "^2.2.0",
6666
"@sentry/core": "9.17.0",
6767
"@sentry/node": "9.17.0"
6868
},

packages/profiling-node/src/integration.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -632,12 +632,12 @@ class ContinuousProfiler {
632632

633633
/** Exported only for tests. */
634634
export const _nodeProfilingIntegration = ((): ProfilingIntegration<NodeClient> => {
635-
if (![16, 18, 20, 22].includes(NODE_MAJOR)) {
635+
if (![16, 18, 20, 22, 24].includes(NODE_MAJOR)) {
636636
consoleSandbox(() => {
637637
// eslint-disable-next-line no-console
638638
console.warn(
639639
`[Sentry Profiling] You are using a Node.js version that does not have prebuilt binaries (${NODE_VERSION}).`,
640-
'The @sentry/profiling-node package only has prebuilt support for the following LTS versions of Node.js: 16, 18, 20, 22.',
640+
'The @sentry/profiling-node package only has prebuilt support for the following LTS versions of Node.js: 16, 18, 20, 22, 24.',
641641
'To use the @sentry/profiling-node package with this version of Node.js, you will need to compile the native addon from source.',
642642
'See: https://github.com/getsentry/sentry-javascript/tree/develop/packages/profiling-node#building-the-package-from-source',
643643
);

scripts/ci-unit-tests.ts

+7-1
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import * as path from 'path';
44

55
const UNIT_TEST_ENV = process.env.UNIT_TEST_ENV as 'node' | 'browser' | undefined;
66
const RUN_AFFECTED = process.argv.includes('--affected');
7-
const NODE_VERSION = process.env.NODE_VERSION as '18' | '20' | '22';
7+
const NODE_VERSION = process.env.NODE_VERSION as '18' | '20' | '22' | '24';
88

99
// These packages are tested separately in CI, so no need to run them here
1010
const DEFAULT_SKIP_PACKAGES = ['@sentry/bun', '@sentry/deno'];
@@ -29,6 +29,8 @@ const BROWSER_TEST_PACKAGES = [
2929
// Packages that cannot run in Node 18
3030
const SKIP_NODE_18_PACKAGES = ['@sentry/react-router'];
3131

32+
const SKIP_NODE_24_PACKAGES = ['@sentry/google-cloud-serverless'];
33+
3234
function getAllPackages(): string[] {
3335
const { workspaces }: { workspaces: string[] } = JSON.parse(
3436
fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8'),
@@ -63,6 +65,10 @@ function runTests(): void {
6365
if (NODE_VERSION === '18') {
6466
SKIP_NODE_18_PACKAGES.forEach(pkg => ignores.add(pkg));
6567
}
68+
69+
if (NODE_VERSION === '24') {
70+
SKIP_NODE_24_PACKAGES.forEach(pkg => ignores.add(pkg));
71+
}
6672
}
6773

6874
if (RUN_AFFECTED) {

yarn.lock

+14-14
Original file line numberDiff line numberDiff line change
@@ -6394,13 +6394,13 @@
63946394
"@angular-devkit/schematics" "14.2.13"
63956395
jsonc-parser "3.1.0"
63966396

6397-
"@sentry-internal/node-cpu-profiler@^2.0.0":
6398-
version "2.0.0"
6399-
resolved "https://registry.yarnpkg.com/@sentry-internal/node-cpu-profiler/-/node-cpu-profiler-2.0.0.tgz#76a0d363055876b91663769daee2d4b12321ba3b"
6400-
integrity sha512-0pZId+HY/AbNs1+CoCi8wogBWTrRv+DYeOgbevhekzMr5HYsA6PRY21NtHBXMbu0WcswFwaveDKR+sOW1EDHAA==
6397+
"@sentry-internal/node-cpu-profiler@^2.2.0":
6398+
version "2.2.0"
6399+
resolved "https://registry.yarnpkg.com/@sentry-internal/node-cpu-profiler/-/node-cpu-profiler-2.2.0.tgz#0640d4aebb4d36031658ccff83dc22b76f437ede"
6400+
integrity sha512-oLHVYurqZfADPh5hvmQYS5qx8t0UZzT2u6+/68VXsFruQEOnYJTODKgU3BVLmemRs3WE6kCJjPeFdHVYOQGSzQ==
64016401
dependencies:
6402-
detect-libc "^2.0.2"
6403-
node-abi "^3.61.0"
6402+
detect-libc "^2.0.3"
6403+
node-abi "^3.73.0"
64046404

64056405
"@sentry-internal/[email protected]":
64066406
version "2.34.0"
@@ -13212,10 +13212,10 @@ detect-libc@^1.0.3:
1321213212
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b"
1321313213
integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg==
1321413214

13215-
detect-libc@^2.0.0, detect-libc@^2.0.2:
13216-
version "2.0.2"
13217-
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d"
13218-
integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==
13215+
detect-libc@^2.0.0, detect-libc@^2.0.2, detect-libc@^2.0.3:
13216+
version "2.0.4"
13217+
resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8"
13218+
integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA==
1321913219

1322013220
1322113221
version "3.1.0"
@@ -21606,10 +21606,10 @@ nock@^13.5.5:
2160621606
json-stringify-safe "^5.0.1"
2160721607
propagate "^2.0.0"
2160821608

21609-
node-abi@^3.3.0, node-abi@^3.61.0:
21610-
version "3.61.0"
21611-
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.61.0.tgz#9248f8b8e35dbae2fafeecd6240c5a017ea23f3f"
21612-
integrity sha512-dYDO1rxzvMXjEMi37PBeFuYgwh3QZpsw/jt+qOmnRSwiV4z4c+OLoRlTa3V8ID4TrkSQpzCVc9OI2sstFaINfQ==
21609+
node-abi@^3.3.0, node-abi@^3.73.0:
21610+
version "3.75.0"
21611+
resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.75.0.tgz#2f929a91a90a0d02b325c43731314802357ed764"
21612+
integrity sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg==
2161321613
dependencies:
2161421614
semver "^7.3.5"
2161521615

0 commit comments

Comments
 (0)