diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 1027efa79677..c44609b1e2c8 100644 --- a/.github/workflows/build.yml +++ b/.github/workflows/build.yml @@ -509,7 +509,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 21] + node: [14, 16, 18, 20, 22] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -569,7 +569,7 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 21] + node: [14, 16, 18, 20, 22] steps: - name: Check out current commit (${{ needs.job_get_metadata.outputs.commit_label }}) uses: actions/checkout@v4 @@ -832,12 +832,12 @@ jobs: strategy: fail-fast: false matrix: - node: [14, 16, 18, 20, 21] + node: [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 }}) @@ -874,7 +874,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: @@ -1294,6 +1294,8 @@ jobs: node: 18 - os: ubuntu-20.04 node: 20 + - os: ubuntu-20.04 + node: 22 # x64 musl - os: ubuntu-20.04 @@ -1305,6 +1307,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 @@ -1316,6 +1321,9 @@ jobs: - os: ubuntu-20.04 arch: arm64 node: 20 + - os: ubuntu-20.04 + arch: arm64 + node: 22 # arm64 musl - os: ubuntu-20.04 @@ -1330,6 +1338,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 @@ -1341,35 +1353,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/packages/profiling-node/README.md b/packages/profiling-node/README.md index f2c9920f0ff1..7203752643ed 100644 --- a/packages/profiling-node/README.md +++ b/packages/profiling-node/README.md @@ -66,7 +66,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 0353281a8699..794fd0a8b6e7 100644 --- a/packages/profiling-node/package.json +++ b/packages/profiling-node/package.json @@ -82,11 +82,11 @@ "@sentry/types": "8.0.0-beta.5", "@sentry/utils": "8.0.0-beta.5", "detect-libc": "^2.0.2", - "node-abi": "^3.52.0" + "node-abi": "^3.61.0" }, "devDependencies": { "@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 f2769fe5be45..9b59848de5be 100644 --- a/packages/profiling-node/src/cpu_profiler.ts +++ b/packages/profiling-node/src/cpu_profiler.ts @@ -47,6 +47,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') { @@ -59,6 +62,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'); + } } } @@ -73,6 +79,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'); + } } } @@ -88,6 +97,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') { @@ -99,6 +111,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') { @@ -112,6 +127,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') { @@ -123,6 +141,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 174a823c5361..94c60f667db1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -8620,7 +8620,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== @@ -22960,10 +22960,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"