From 7407752ecfc64a3f3b6e89bba1c1926a0e0fa1c9 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 8 May 2025 11:11:58 -0400 Subject: [PATCH 1/4] feat: Support Node 24 --- .github/workflows/build.yml | 8 +++---- packages/profiling-node/package.json | 2 +- packages/profiling-node/src/integration.ts | 4 ++-- scripts/ci-unit-tests.ts | 2 +- yarn.lock | 26 ++++++++++++++++------ 5 files changed, 27 insertions(+), 15 deletions(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 978e728e1f56..7cfcdb449ea6 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -475,7 +475,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + node: [18, 20, 22, 24] steps: - name: Check out base commit (${{ github.event.pull_request.base.sha }}) uses: actions/checkout@v4 @@ -713,12 +713,12 @@ jobs: strategy: fail-fast: false matrix: - node: ['18.20.5', 20, 22] + node: ['18.20.5', 20, 22, 24] typescript: - false include: # Only check typescript for latest version (to streamline CI) - - node: 22 + - node: 24 typescript: '3.8' steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) @@ -760,7 +760,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22] + node: [18, 20, 22, 24] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index 2a2fb0d31c67..738b429b00dd 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -62,7 +62,7 @@ "test:watch": "vitest --watch" }, "dependencies": { - "@sentry-internal/node-cpu-profiler": "^2.0.0", + "@sentry-internal/node-cpu-profiler": "^2.2.0", "@sentry/core": "9.17.0", "@sentry/node": "9.17.0" }, diff --git a/packages/profiling-node/src/integration.ts b/packages/profiling-node/src/integration.ts index fc94694c383e..67ad0c0ed2e3 100644 --- a/packages/profiling-node/src/integration.ts +++ b/packages/profiling-node/src/integration.ts @@ -632,12 +632,12 @@ class ContinuousProfiler { /** Exported only for tests. */ export const _nodeProfilingIntegration = ((): ProfilingIntegration => { - if (![16, 18, 20, 22].includes(NODE_MAJOR)) { + if (![16, 18, 20, 22, 24].includes(NODE_MAJOR)) { consoleSandbox(() => { // eslint-disable-next-line no-console console.warn( `[Sentry Profiling] You are using a Node.js version that does not have prebuilt binaries (${NODE_VERSION}).`, - 'The @sentry/profiling-node package only has prebuilt support for the following LTS versions of Node.js: 16, 18, 20, 22.', + 'The @sentry/profiling-node package only has prebuilt support for the following LTS versions of Node.js: 16, 18, 20, 22, 24.', 'To use the @sentry/profiling-node package with this version of Node.js, you will need to compile the native addon from source.', 'See: https://github.com/getsentry/sentry-javascript/tree/develop/packages/profiling-node#building-the-package-from-source', ); diff --git a/scripts/ci-unit-tests.ts b/scripts/ci-unit-tests.ts index cd53df2dfd68..2802bde62fa6 100644 --- a/scripts/ci-unit-tests.ts +++ b/scripts/ci-unit-tests.ts @@ -4,7 +4,7 @@ import * as path from 'path'; const UNIT_TEST_ENV = process.env.UNIT_TEST_ENV as 'node' | 'browser' | undefined; const RUN_AFFECTED = process.argv.includes('--affected'); -const NODE_VERSION = process.env.NODE_VERSION as '18' | '20' | '22'; +const NODE_VERSION = process.env.NODE_VERSION as '18' | '20' | '22' | '24'; // These packages are tested separately in CI, so no need to run them here const DEFAULT_SKIP_PACKAGES = ['@sentry/bun', '@sentry/deno']; diff --git a/yarn.lock b/yarn.lock index 5952c9d32733..4ac9a34d33b9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6394,13 +6394,13 @@ "@angular-devkit/schematics" "14.2.13" jsonc-parser "3.1.0" -"@sentry-internal/node-cpu-profiler@^2.0.0": - version "2.0.0" - resolved "https://registry.yarnpkg.com/@sentry-internal/node-cpu-profiler/-/node-cpu-profiler-2.0.0.tgz#76a0d363055876b91663769daee2d4b12321ba3b" - integrity sha512-0pZId+HY/AbNs1+CoCi8wogBWTrRv+DYeOgbevhekzMr5HYsA6PRY21NtHBXMbu0WcswFwaveDKR+sOW1EDHAA== +"@sentry-internal/node-cpu-profiler@^2.2.0": + version "2.2.0" + resolved "https://registry.yarnpkg.com/@sentry-internal/node-cpu-profiler/-/node-cpu-profiler-2.2.0.tgz#0640d4aebb4d36031658ccff83dc22b76f437ede" + integrity sha512-oLHVYurqZfADPh5hvmQYS5qx8t0UZzT2u6+/68VXsFruQEOnYJTODKgU3BVLmemRs3WE6kCJjPeFdHVYOQGSzQ== dependencies: - detect-libc "^2.0.2" - node-abi "^3.61.0" + detect-libc "^2.0.3" + node-abi "^3.73.0" "@sentry-internal/rrdom@2.34.0": version "2.34.0" @@ -13217,6 +13217,11 @@ detect-libc@^2.0.0, detect-libc@^2.0.2: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== +detect-libc@^2.0.3: + version "2.0.4" + resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8" + integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA== + detect-newline@3.1.0: version "3.1.0" resolved "https://registry.yarnpkg.com/detect-newline/-/detect-newline-3.1.0.tgz#576f5dfc63ae1a192ff192d8ad3af6308991b651" @@ -21606,13 +21611,20 @@ nock@^13.5.5: json-stringify-safe "^5.0.1" propagate "^2.0.0" -node-abi@^3.3.0, node-abi@^3.61.0: +node-abi@^3.3.0: version "3.61.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.61.0.tgz#9248f8b8e35dbae2fafeecd6240c5a017ea23f3f" integrity sha512-dYDO1rxzvMXjEMi37PBeFuYgwh3QZpsw/jt+qOmnRSwiV4z4c+OLoRlTa3V8ID4TrkSQpzCVc9OI2sstFaINfQ== dependencies: semver "^7.3.5" +node-abi@^3.73.0: + version "3.75.0" + resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.75.0.tgz#2f929a91a90a0d02b325c43731314802357ed764" + integrity sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg== + dependencies: + semver "^7.3.5" + node-abort-controller@^3.0.1: version "3.1.1" resolved "https://registry.yarnpkg.com/node-abort-controller/-/node-abort-controller-3.1.1.tgz#a94377e964a9a37ac3976d848cb5c765833b8548" From fb2e77c53713c9318edbad72d265c359342f597c Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 8 May 2025 14:48:23 -0400 Subject: [PATCH 2/4] yarn dedupe --- yarn.lock | 16 ++-------------- 1 file changed, 2 insertions(+), 14 deletions(-) diff --git a/yarn.lock b/yarn.lock index 4ac9a34d33b9..644150b45d72 100644 --- a/yarn.lock +++ b/yarn.lock @@ -13212,12 +13212,7 @@ detect-libc@^1.0.3: resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-1.0.3.tgz#fa137c4bd698edf55cd5cd02ac559f91a4c4ba9b" integrity sha512-pGjwhsmsp4kL2RTz08wcOlGN83otlqHeD/Z5T8GXZB+/YcpQ/dgo+lbU8ZsGxV0HIvqqxo9l7mqYwyYMD9bKDg== -detect-libc@^2.0.0, detect-libc@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.2.tgz#8ccf2ba9315350e1241b88d0ac3b0e1fbd99605d" - integrity sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw== - -detect-libc@^2.0.3: +detect-libc@^2.0.0, detect-libc@^2.0.2, detect-libc@^2.0.3: version "2.0.4" resolved "https://registry.yarnpkg.com/detect-libc/-/detect-libc-2.0.4.tgz#f04715b8ba815e53b4d8109655b6508a6865a7e8" integrity sha512-3UDv+G9CsCKO1WKMGw9fwq/SWJYbI0c5Y7LU1AXYoDdbhE2AHQ6N6Nb34sG8Fj7T5APy8qXDCKuuIHd1BR0tVA== @@ -21611,14 +21606,7 @@ nock@^13.5.5: json-stringify-safe "^5.0.1" propagate "^2.0.0" -node-abi@^3.3.0: - version "3.61.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.61.0.tgz#9248f8b8e35dbae2fafeecd6240c5a017ea23f3f" - integrity sha512-dYDO1rxzvMXjEMi37PBeFuYgwh3QZpsw/jt+qOmnRSwiV4z4c+OLoRlTa3V8ID4TrkSQpzCVc9OI2sstFaINfQ== - dependencies: - semver "^7.3.5" - -node-abi@^3.73.0: +node-abi@^3.3.0, node-abi@^3.73.0: version "3.75.0" resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.75.0.tgz#2f929a91a90a0d02b325c43731314802357ed764" integrity sha512-OhYaY5sDsIka7H7AtijtI9jwGYLyl29eQn/W623DiN/MIv5sUqc4g7BIDThX+gb7di9f6xK02nkp8sdfFWZLTg== From b53d233564d29e8dca653349ca5802e8b220b23e Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 8 May 2025 15:43:47 -0400 Subject: [PATCH 3/4] skip google-cloud-serverless in node 24 --- scripts/ci-unit-tests.ts | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/scripts/ci-unit-tests.ts b/scripts/ci-unit-tests.ts index 2802bde62fa6..a86ac0f6358f 100644 --- a/scripts/ci-unit-tests.ts +++ b/scripts/ci-unit-tests.ts @@ -29,6 +29,8 @@ const BROWSER_TEST_PACKAGES = [ // Packages that cannot run in Node 18 const SKIP_NODE_18_PACKAGES = ['@sentry/react-router']; +const SKIP_NODE_24_PACKAGES = ['@sentry/google-cloud-serverless']; + function getAllPackages(): string[] { const { workspaces }: { workspaces: string[] } = JSON.parse( fs.readFileSync(path.join(process.cwd(), 'package.json'), 'utf-8'), @@ -63,6 +65,10 @@ function runTests(): void { if (NODE_VERSION === '18') { SKIP_NODE_18_PACKAGES.forEach(pkg => ignores.add(pkg)); } + + if (NODE_VERSION === '24') { + SKIP_NODE_24_PACKAGES.forEach(pkg => ignores.add(pkg)); + } } if (RUN_AFFECTED) { From f321c2073bf6ed7acacce4224a774945dab57915 Mon Sep 17 00:00:00 2001 From: Abhijeet Prasad Date: Thu, 8 May 2025 16:15:58 -0400 Subject: [PATCH 4/4] disable remix integration tests on node 24 --- .github/workflows/build.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 7cfcdb449ea6..8996e5f5cf5f 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -760,7 +760,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 22, 24] + node: [18, 20, 22] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4