diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index f6ac07ee2532..32c603850edd 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -533,7 +533,7 @@ jobs: strategy: fail-fast: false matrix: - node: [8, 10, 12, 14, 16, 18, 20, 21] + node: [8, 10, 12, 14, 16, 18, 20, 22] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -595,7 +595,7 @@ jobs: strategy: fail-fast: false matrix: - node: [10, 12, 14, 16, 18, 20, 21] + node: [10, 12, 14, 16, 18, 20, 22] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -884,12 +884,12 @@ jobs: strategy: fail-fast: false matrix: - node: [10, 12, 14, 16, 18, 20, 21] + node: [10, 12, 14, 16, 18, 20, 22] typescript: - false include: # Only check typescript for latest version (to streamline CI) - - node: 20 + - node: 22 typescript: '3.8' steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) @@ -925,7 +925,7 @@ jobs: strategy: fail-fast: false matrix: - node: [18, 20, 21] + node: [18, 20, 22] remix: [1, 2] # Remix v2 only supports Node 18+, so run Node 14, 16 tests separately include: @@ -1338,6 +1338,8 @@ jobs: node: 18 - os: ubuntu-20.04 node: 20 + - os: ubuntu-20.04 + node: 22 # x64 musl - os: ubuntu-20.04 @@ -1349,6 +1351,9 @@ jobs: - os: ubuntu-20.04 container: node:20-alpine3.17 node: 20 + - os: ubuntu-20.04 + container: node:22-alpine3.18 + node: 22 # arm64 glibc - os: ubuntu-20.04 @@ -1360,6 +1365,9 @@ jobs: - os: ubuntu-20.04 arch: arm64 node: 20 + - os: ubuntu-20.04 + arch: arm64 + node: 22 # arm64 musl - os: ubuntu-20.04 @@ -1374,6 +1382,10 @@ jobs: arch: arm64 container: node:20-alpine3.17 node: 20 + - os: ubuntu-20.04 + arch: arm64 + container: node:22-alpine3.18 + node: 22 # macos x64 - os: macos-11 @@ -1385,35 +1397,42 @@ jobs: - os: macos-11 node: 20 arch: x64 + - os: macos-11 + node: 22 + arch: x64 # macos arm64 - os: macos-12 arch: arm64 node: 16 target_platform: darwin - - os: macos-12 arch: arm64 node: 18 target_platform: darwin - - os: macos-12 arch: arm64 node: 20 target_platform: darwin + - os: macos-12 + arch: arm64 + node: 22 + target_platform: darwin # windows x64 - os: windows-2022 node: 16 arch: x64 - - os: windows-2022 node: 18 arch: x64 - - os: windows-2022 node: 20 arch: x64 + - os: windows-2022 + node: 22 + arch: x64 + steps: - name: Setup (alpine) if: contains(matrix.container, 'alpine') diff --git a/CHANGELOG.md b/CHANGELOG.md index 77a2e3d54ad5..2f082ae89ff3 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -4,6 +4,14 @@ - "You miss 100 percent of the chances you don't take. — Wayne Gretzky" — Michael Scott +## 7.113.0 + +- **feat(node): Support Node 22 (#11754)** + +This release adds support for Node 22! 🎉 + +It also adds prebuilt-binaries for Node 22 to `@sentry/profiling-node`. + ## 7.112.2 - fix(nextjs|sveltekit): Ensure we can pass `browserTracingIntegration` (#11765) diff --git a/packages/profiling-node/README.md b/packages/profiling-node/README.md index 734f080ba402..90e15b738a56 100644 --- a/packages/profiling-node/README.md +++ b/packages/profiling-node/README.md @@ -68,7 +68,7 @@ npm i -g windows-build-tools ### Prebuilt binaries -We currently ship prebuilt binaries for a few of the most common platforms and node versions (v16-20). +We currently ship prebuilt binaries for a few of the most common platforms and node versions (v16-22). - macOS x64 - Linux ARM64 (musl) diff --git a/packages/profiling-node/binding.gyp b/packages/profiling-node/binding.gyp index fd2322db4e94..1c1aad075e39 100644 --- a/packages/profiling-node/binding.gyp +++ b/packages/profiling-node/binding.gyp @@ -6,5 +6,15 @@ # Silence gcc8 deprecation warning https://github.com/nodejs/nan/issues/807#issuecomment-455750192 "cflags": ["-Wno-cast-function-type"] }, - ] + ], + 'conditions': [ + [ 'OS=="win"', { + 'defines': [ + # Stop from defining macros that conflict with + # std::min() and std::max(). We don't use (much) + # but we still inherit it from uv.h. + 'NOMINMAX', + ] + }], + ], } diff --git a/packages/profiling-node/bindings/cpu_profiler.cc b/packages/profiling-node/bindings/cpu_profiler.cc index f269990f425b..64a82ba61910 100644 --- a/packages/profiling-node/bindings/cpu_profiler.cc +++ b/packages/profiling-node/bindings/cpu_profiler.cc @@ -1,3 +1,6 @@ +#ifndef NOMINMAX +#define NOMINMAX +#endif #include #include diff --git a/packages/profiling-node/package.json b/packages/profiling-node/package.json index c36c6f0211d5..45657b792d64 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -65,7 +65,7 @@ }, "dependencies": { "detect-libc": "^2.0.2", - "node-abi": "^3.52.0" + "node-abi": "^3.61.0" }, "devDependencies": { "@sentry/core": "7.112.2", @@ -73,7 +73,7 @@ "@sentry/types": "7.112.2", "@sentry/utils": "7.112.2", "@types/node": "16.18.70", - "@types/node-abi": "^3.0.0", + "@types/node-abi": "^3.0.3", "clang-format": "^1.8.0", "cross-env": "^7.0.3", "node-gyp": "^9.4.1", diff --git a/packages/profiling-node/src/cpu_profiler.ts b/packages/profiling-node/src/cpu_profiler.ts index e4ee11fee6a4..9a715feef0c2 100644 --- a/packages/profiling-node/src/cpu_profiler.ts +++ b/packages/profiling-node/src/cpu_profiler.ts @@ -48,6 +48,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings { if (abi === '115') { return require('./sentry_cpu_profiler-darwin-x64-115.node'); } + if (abi === '127') { + return require('./sentry_cpu_profiler-darwin-x64-127.node'); + } } if (arch === 'arm64') { @@ -60,6 +63,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings { if (abi === '115') { return require('./sentry_cpu_profiler-darwin-arm64-115.node'); } + if (abi === '127') { + return require('./sentry_cpu_profiler-darwin-arm64-127.node'); + } } } @@ -74,6 +80,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings { if (abi === '115') { return require('./sentry_cpu_profiler-win32-x64-115.node'); } + if (abi === '127') { + return require('./sentry_cpu_profiler-win32-x64-127.node'); + } } } @@ -89,6 +98,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings { if (abi === '115') { return require('./sentry_cpu_profiler-linux-x64-musl-115.node'); } + if (abi === '127') { + return require('./sentry_cpu_profiler-linux-x64-musl-127.node'); + } } if (stdlib === 'glibc') { if (abi === '93') { @@ -100,6 +112,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings { if (abi === '115') { return require('./sentry_cpu_profiler-linux-x64-glibc-115.node'); } + if (abi === '127') { + return require('./sentry_cpu_profiler-linux-x64-glibc-127.node'); + } } } if (arch === 'arm64') { @@ -113,6 +128,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings { if (abi === '115') { return require('./sentry_cpu_profiler-linux-arm64-musl-115.node'); } + if (abi === '127') { + return require('./sentry_cpu_profiler-linux-arm64-musl-127.node'); + } } if (stdlib === 'glibc') { if (abi === '93') { @@ -124,6 +142,9 @@ export function importCppBindingsModule(): PrivateV8CpuProfilerBindings { if (abi === '115') { return require('./sentry_cpu_profiler-linux-arm64-glibc-115.node'); } + if (abi === '127') { + return require('./sentry_cpu_profiler-linux-arm64-glibc-127.node'); + } } } } diff --git a/yarn.lock b/yarn.lock index 11fe18b72dd1..bb919bb52363 100644 --- a/yarn.lock +++ b/yarn.lock @@ -6769,7 +6769,7 @@ dependencies: "@types/unist" "^2" -"@types/node-abi@^3.0.0": +"@types/node-abi@^3.0.3": version "3.0.3" resolved "https://registry.yarnpkg.com/@types/node-abi/-/node-abi-3.0.3.tgz#a8334d75fe45ccd4cdb2a6c1ae82540a7a76828c" integrity sha512-5oos6sivyXcDEuVC5oX3+wLwfgrGZu4NIOn826PGAjPCHsqp2zSPTGU7H1Tv+GZBOiDUY3nBXY1MdaofSEt4fw== @@ -23205,10 +23205,10 @@ node-abi@^3.3.0: dependencies: semver "^7.3.5" -node-abi@^3.52.0: - version "3.54.0" - resolved "https://registry.yarnpkg.com/node-abi/-/node-abi-3.54.0.tgz#f6386f7548817acac6434c6cba02999c9aebcc69" - integrity sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA== +node-abi@^3.61.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"