From f3780d6189d37f722dfce29cf0bee51a4b5bb9ef Mon Sep 17 00:00:00 2001 From: Gilson Urbano Date: Fri, 30 Oct 2026 10:44:40 +0000 Subject: [PATCH] Add darwin-arm64 prebuild --- .github/workflows/ci.yml | 20 +++++++++++++++++++- .github/workflows/release.yml | 2 +- binding.gyp | 3 +-- package-lock.json | 3 +++ 4 files changed, 24 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 660acf5..04892e4 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,10 +17,19 @@ jobs: strategy: fail-fast: false matrix: - os: [ubuntu-latest, windows-latest, macos-latest, macos-15-intel] + os: [ubuntu-latest, windows-latest, macos-15-intel] node-version: [20.x, 22.x, 24.x] arch: [x64] include: + - os: macos-latest + node-version: 20.x + arch: arm64 + - os: macos-latest + node-version: 22.x + arch: arm64 + - os: macos-latest + node-version: 24.x + arch: arm64 - os: windows-latest node-version: 20.x arch: x86 @@ -50,3 +59,12 @@ jobs: - name: Prebuild run: npm run prebuild + + # Consumers resolve node-addon-api from our semver range, not our lockfile, + # so also build against the newest release to catch header changes early. + - name: Build and test against latest node-addon-api + shell: bash + run: | + npm install --no-save node-addon-api@latest + npm run build + npm run test diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 140a371..10d5201 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -21,7 +21,7 @@ jobs: - os: windows-latest arch: x86 - os: macos-latest - arch: x64 + arch: arm64 - os: macos-15-intel arch: x64 diff --git a/binding.gyp b/binding.gyp index d2db4cc..363d45a 100644 --- a/binding.gyp +++ b/binding.gyp @@ -15,8 +15,7 @@ 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'CLANG_CXX_LIBRARY': 'libc++', - 'MACOSX_DEPLOYMENT_TARGET': '10.7', - 'OTHER_CPLUSPLUSFLAGS' : [ '-std=c++11', '-stdlib=libc++' ], + 'MACOSX_DEPLOYMENT_TARGET': '10.15', }, 'msvs_settings': { 'VCCLCompilerTool': { 'ExceptionHandling': 1 }, diff --git a/package-lock.json b/package-lock.json index 53a3bb7..af12688 100644 --- a/package-lock.json +++ b/package-lock.json @@ -61,6 +61,7 @@ "integrity": "sha512-e7jT4DxYvIDLk1ZHmU/m/mB19rex9sv0c2ftBtjSBv+kVM/902eh0fINUzD7UwLLNR+jU585GxUJ8/EBfAM5fw==", "dev": true, "license": "MIT", + "peer": true, "dependencies": { "@babel/code-frame": "^7.27.1", "@babel/generator": "^7.28.5", @@ -837,6 +838,7 @@ } ], "license": "MIT", + "peer": true, "dependencies": { "baseline-browser-mapping": "^2.8.19", "caniuse-lite": "^1.0.30001751", @@ -4928,6 +4930,7 @@ "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", "dev": true, "license": "MIT", + "peer": true, "engines": { "node": ">=12" },