From a81617417849a0f5b10655cef64645508cf02b1c Mon Sep 17 00:00:00 2001 From: thesiti92 Date: Sun, 27 Sep 2026 14:12:03 -0400 Subject: [PATCH 1/2] Build and package diffr for Intel Macs --- .github/workflows/release.yml | 4 +++- diffr-ts/bin/fetch.mjs | 2 +- diffr-ts/scripts/pin.mjs | 2 +- diffr-ts/src/fetch.test.ts | 2 +- scripts/release.py | 15 ++++++++++----- 5 files changed, 16 insertions(+), 9 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 43c6a2732..e1c071494 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -22,6 +22,8 @@ jobs: include: - target: aarch64-apple-darwin os: macos-14 + - target: x86_64-apple-darwin + os: macos-15-intel - target: x86_64-unknown-linux-gnu os: ubuntu-22.04 runs-on: ${{ matrix.os }} @@ -81,7 +83,7 @@ jobs: strategy: fail-fast: false matrix: - os: [macos-14, ubuntu-22.04] + os: [macos-14, macos-15-intel, ubuntu-22.04] runs-on: ${{ matrix.os }} timeout-minutes: 15 env: diff --git a/diffr-ts/bin/fetch.mjs b/diffr-ts/bin/fetch.mjs index 2e5fba1f2..e579b4241 100755 --- a/diffr-ts/bin/fetch.mjs +++ b/diffr-ts/bin/fetch.mjs @@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url"; import { parseArgs } from "node:util"; const root = resolve(dirname(fileURLToPath(import.meta.url)), ".."); -const targets = { "darwin-arm64": "aarch64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" }; +const targets = { "darwin-arm64": "aarch64-apple-darwin", "darwin-x64": "x86_64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" }; try { await main(); diff --git a/diffr-ts/scripts/pin.mjs b/diffr-ts/scripts/pin.mjs index 60301e977..423770def 100755 --- a/diffr-ts/scripts/pin.mjs +++ b/diffr-ts/scripts/pin.mjs @@ -7,7 +7,7 @@ import { fileURLToPath } from "node:url"; const here = dirname(fileURLToPath(import.meta.url)); const root = join(here, ".."); const version = JSON.parse(readFileSync(join(root, "package.json"), "utf8")).version; -const targets = ["aarch64-apple-darwin", "x86_64-unknown-linux-gnu"]; +const targets = ["aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu"]; const sha256 = {}; for (const target of targets) { const url = `https://github.com/devdotfast/diffr/releases/download/${version}/diffr-${version}-${target}.tar.gz`; diff --git a/diffr-ts/src/fetch.test.ts b/diffr-ts/src/fetch.test.ts index d32bdbbd5..3ba87f302 100644 --- a/diffr-ts/src/fetch.test.ts +++ b/diffr-ts/src/fetch.test.ts @@ -6,7 +6,7 @@ import { join } from "node:path"; const fetchScript = join(import.meta.dir, "..", "bin", "fetch.mjs"); const { version } = JSON.parse(readFileSync(join(import.meta.dir, "..", "package.json"), "utf8")); -const targets: Record = { "darwin-arm64": "aarch64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" }; +const targets: Record = { "darwin-arm64": "aarch64-apple-darwin", "darwin-x64": "x86_64-apple-darwin", "linux-x64": "x86_64-unknown-linux-gnu" }; const target = targets[`${process.platform}-${process.arch}`]; const dirs: string[] = []; afterEach(() => { diff --git a/scripts/release.py b/scripts/release.py index 65f37dac1..3d8848b37 100644 --- a/scripts/release.py +++ b/scripts/release.py @@ -6,7 +6,7 @@ import subprocess import tarfile -TARGETS = ("aarch64-apple-darwin", "x86_64-unknown-linux-gnu") +TARGETS = ("aarch64-apple-darwin", "x86_64-apple-darwin", "x86_64-unknown-linux-gnu") ROOT = Path(__file__).resolve().parent.parent @@ -41,15 +41,20 @@ def formula(version, output): license all_of: ["MIT", "MPL-2.0"] on_macos do - depends_on arch: :arm64 - url "{url}-aarch64-apple-darwin.tar.gz" - sha256 "{checksums[TARGETS[0]]}" + on_arm do + url "{url}-aarch64-apple-darwin.tar.gz" + sha256 "{checksums['aarch64-apple-darwin']}" + end + on_intel do + url "{url}-x86_64-apple-darwin.tar.gz" + sha256 "{checksums['x86_64-apple-darwin']}" + end end on_linux do depends_on arch: :x86_64 url "{url}-x86_64-unknown-linux-gnu.tar.gz" - sha256 "{checksums[TARGETS[1]]}" + sha256 "{checksums['x86_64-unknown-linux-gnu']}" end def install From 4059d397985c5d1f4973dd77b8ec804b08cdf030 Mon Sep 17 00:00:00 2001 From: thesiti92 Date: Sun, 27 Sep 2026 14:12:58 -0400 Subject: [PATCH 2/2] Document Intel Mac support --- README.md | 2 +- diffr-ts/README.md | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index ae78569cc..3885554d2 100644 --- a/README.md +++ b/README.md @@ -30,7 +30,7 @@ diffr main...HEAD -- src/ # merge-base comparison ## Installation -CLI and terminal UI (Apple Silicon macOS and x64 Linux): +CLI and terminal UI (Apple Silicon macOS, Intel macOS, and x64 Linux): ```sh brew install devdotfast/tap/diffr diff --git a/diffr-ts/README.md b/diffr-ts/README.md index 2b0504167..47ef23396 100644 --- a/diffr-ts/README.md +++ b/diffr-ts/README.md @@ -12,7 +12,7 @@ const event = decodeStructuralDiffEvent(line); npx --package @dev.fast/diffr@0.1.3 diffr-fetch --into ./bin --required ``` -Supports macOS arm64 and Linux x64. `--check` verifies an existing install without +Supports macOS arm64, macOS x64, and Linux x64. `--check` verifies an existing install without network access. Downloads warn on network failure unless `--required`; invalid hashes or archives always fail.