diff --git a/CHANGELOG.md b/CHANGELOG.md index f50a076..1ad5325 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -51,6 +51,10 @@ All notable changes to this project are documented here. The format is based on - Removed dead code surfaced by an unused-export scan (a few unused motion, color, and UI helpers) and fixed a stale "four modes" comment in `packages/shared/src/modes.ts`. +- Release build: `onnxruntime-node` (pulled in by the on-device mic via + `@huggingface/transformers`) ships no darwin/x64 prebuilt, which broke the + `darwin-x64` binary build and blocked the release. It is now marked external + for that target only; the mic's lazy import degrades gracefully on Intel Macs. ## [2.0.2] - 2026-06-18 diff --git a/scripts/build.ts b/scripts/build.ts index 03f1ab4..353cb74 100644 --- a/scripts/build.ts +++ b/scripts/build.ts @@ -191,8 +191,17 @@ for (const t of targets) { // on launch. `Bun.build({ plugins })` lets us load the Solid babel plugin // directly, producing the correct lazy-children shape (and matching dev // mode, where bunfig.toml's preload registers the same plugin). + // onnxruntime-node (pulled in by @huggingface/transformers for the on-device + // mic) ships no darwin/x64 prebuilt — its bin/napi-v6/ has darwin/arm64 only. + // Its binding.js does `require(`../bin/napi-v6/${platform}/${arch}/…node`)`, + // so bundling on the Intel-mac runner can't resolve darwin/x64 and the build + // fails. Mark it external there: the binary still builds, and the mic's lazy + // `import("@huggingface/transformers")` (mic.ts) catches the missing module + // and degrades gracefully — Intel Macs can't run the native runtime anyway. + const external = t.name === "darwin-x64" ? ["onnxruntime-node"] : undefined const result = await Bun.build({ entrypoints: [ENTRY], + external, compile: { target: t.bun as Bun.Build.CompileTarget, outfile: outBase,