ReviewOS

also looking at this

chris/very-good-adblock

refactor(safari): migrate the safari pipeline to the framework buddy commands

#3
Merged chris wants to merge chore/safari-framework-migration into main
4 files +28 -6
9 days ago

Summary

Migrates the Safari pipeline from repo-local scripts to the framework commands added in stacksjs/stacks#2008 (+ #2011 for beta-toolchain support). The Safari abstraction now lives in one place — @stacksjs/browser-extension — and this repo keeps only what is genuinely app-specific.

BeforeAfter
scripts/build-safari.tsbuddy extension:build --target safari (npm script build:safari, same name)
scripts/safari-build-app.ts + scripts/safari-sync-resources.tsbuddy extension:safari:app (safari:app) — builds, syncs Resources, xcodebuilds
scripts/generate-app-icons.ts (icons:app)rendered by buddy extension:safari:init / scaffold (safari:init added)
exclusions hardcoded in the sync scriptsafariExclude in config/extension.ts

validate:extension:safari and the package-extension.ts zip stay: the validator's DNR-rule accounting and the versioned zip naming are app-specific and buddy has no equivalent.

Behavior change: privacy.html is now also excluded from the appex Resources (it leaked in before; only popup.html + options.html ship, which is what the manifest references). safari:app no longer produces the zip first — use package:safari for that (CI does).

⚠️ Blocked until the next stacks release

The new buddy commands exist on stacks main (merged) but not in a published npm release yet. After the release:

bun update stacks   # ^0.70.73 already permits the new 0.70.x

then this PR's CI goes green and it's ready to merge. Until then build:safari / safari:app will fail on the old installed buddy — expected.

Verification

  • Ran the new commands end-to-end from a local stacks checkout: extension:build --target safari → dist-safari (previously proven byte-equivalent to the old script's output), extension:safari:app --skip-xcodebuild → Resources synced with exactly popup.html + options.html.
  • Signed container app build verified separately on main with Xcode 27 beta (** BUILD SUCCEEDED **, team cert on app + appex).

4 changed files on the files tab, with 0 review threads.

Sign in to comment on this pull request.