Skip to content

Prototype prebuilt npm binary packaging#12

Merged
benvinegar merged 1 commit into
masterfrom
feat/prebuilt-npm-binaries-phase1
Mar 21, 2026
Merged

Prototype prebuilt npm binary packaging#12
benvinegar merged 1 commit into
masterfrom
feat/prebuilt-npm-binaries-phase1

Conversation

@benvinegar
Copy link
Copy Markdown
Member

Summary

  • add phase-1 prebuilt npm packaging scripts and a host-package staging flow
  • teach the hunk launcher to prefer installed prebuilt binaries before falling back to the current Bun-backed runtime
  • add Linux/macOS CI coverage that stages, verifies, and smoke-installs the prebuilt packages without Bun on PATH

What this lands

This is the first shipping phase of the prebuilt-binary plan from docs/prebuilt-binaries-plan.md.

It does not switch the published npm package over yet. Instead it gives us a working, validated packaging path inside the repo:

  • scripts/stage-prebuilt-npm.ts generates:
    • a tiny top-level hunkdiff package
    • the current host's platform package (for example hunkdiff-linux-x64)
  • scripts/check-prebuilt-pack.ts verifies the staged tarballs
  • scripts/smoke-prebuilt-install.ts proves a clean global install works without Bun on PATH
  • bin/hunk.cjs now prefers an installed prebuilt binary package, but still falls back to the existing Bun-backed path so current releases keep working during rollout

Validation

  • bun run typecheck
  • bun test
  • bun run test:tty-smoke
  • bun run check:pack
  • bun run build:prebuilt:npm
  • bun run check:prebuilt-pack
  • bun run smoke:prebuilt-install

Follow-up

A later PR still needs to wire up the full multi-platform publish workflow:

  • artifact fan-in
  • platform package publish order
  • tag-driven npm release automation
  • wider platform matrix (musl / Windows / extra variants as needed)

@benvinegar benvinegar merged commit e3017d0 into master Mar 21, 2026
9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant