SIGN IN SIGN UP

[BRE-2024] Fix x86_64 macOS NAPI build producing ARM64 binaries (#1531)

## 🎟️ Tracking

https://bitwarden.atlassian.net/browse/BRE-2024

## 📔 Objective

When [BRE-1302](https://bitwarden.atlassian.net/browse/BRE-1302)
upgraded the macOS runner from `macos-13` (Intel) to `macos-15` (ARM64),
the `x86_64` build job began running on ARM64 hardware. The build
command `npm run build` uses the `--platform` flag, which auto-detects
the host architecture rather than respecting the target triple. This
caused the `x86_64` job to build `ARM64` binaries instead.

Changes:
- Add `build-x64` script to `package.json` that explicitly targets
`x86_64-apple-darwin`, mirroring the existing `build-arm64` pattern
- Update `build-napi.yml` to use `npm run build-x64` for the `x86_64`
job

This ensures the `x86_64 job` produces `sdk-napi.darwin-x64.node`
(Intel) instead of incorrectly producing `sdk-napi.darwin-arm64.node`
(ARM).

## 🚨 Breaking Changes

<!-- If this PR introduces a breaking change for any downstream
consumer, call it out clearly.

For breaking changes:
1. Describe what changed in the public interface
2. Explain why the change was necessary
3. Provide migration steps for consumers
4. Link to any paired consumer PRs if needed

Otherwise, you can remove this section. -->


[BRE-1302]:
https://bitwarden.atlassian.net/browse/BRE-1302?atlOrigin=eyJpIjoiNWRkNTljNzYxNjVmNDY3MDlhMDU5Y2ZhYzA5YTRkZjUiLCJwIjoiZ2l0aHViLWNvbS1KU1cifQ
B
brandonbiete committed
e8987051df28cb3af85550ab35e782d0fda3cfc9
Parent: 2f2c866
Committed by GitHub <noreply@github.com> on 6/17/2026, 2:21:29 PM