Ship the Homebrew build as a cask, speed up the release, patch shipped deps - #3
Merged
mathieubrunpicard merged 3 commits intoSep 4, 2026
Merged
Conversation
Installing the formula on macOS fails before its install block runs: with no bottle, Homebrew treats the install as a source build and requires a current Xcode and Command Line Tools — for a tarball that only needs copying. Casks are the vehicle for prebuilt binaries and skip those checks. The release job now removes Formula/pipecorn.rb from the tap. A formula and a cask sharing the token would resolve to the formula, which is the broken path. Casks are macOS-only, so the cask covers darwin arm64 and x64 and the README sends Linux and Windows users to npm. It also documents brew trust, which Homebrew 6.0 requires once per machine for any third-party tap. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJDs7niXGGW2dmPXd1e93S
Cache the npm download directory in both release jobs, matching ci.yml. Pack with --parallel so the five targets build concurrently instead of in sequence, and with --no-xz: oclif emits .tar.gz and .tar.xz for every target, xz is the slowest part of the job, and only the .tar.gz assets are uploaded and referenced by the cask. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJDs7niXGGW2dmPXd1e93S
brace-expansion 5.0.6 -> 5.0.9 and fast-uri 3.1.2 -> 3.1.7, both transitive (via minimatch and ajv) and both present in the packed tarball. npm audit --omit=dev now reports no vulnerabilities. Lockfile only, no package.json change. The remaining advisories are all dev dependencies — the vitest/vite/esbuild cluster, which needs a test-runner major bump and never ships to users. Co-Authored-By: Claude Opus 5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01VJDs7niXGGW2dmPXd1e93S
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Follow-up to #2, which published a Homebrew formula. That formula cannot be installed on macOS.
Why the formula was broken
It ships no bottle, so
brew installclassifies it as a build from source, and the source-build path requires a current Xcode and Command Line Tools before the formula'sinstallblock runs — for a tarball that only needs unpacking:Casks are the vehicle for prebuilt binaries and skip those checks entirely.
Changes
Cask instead of formula (
ecb3bec)homebrew/pipecorn.cask.rb.tmplreplaceshomebrew/pipecorn.rb.tmpl. Thearch arm:/intel:stanza collapses the formula's fouron_macos/on_linuxblocks into oneurl, andzap trash:covers~/.config/pipecornand~/.local/share/pipecorn.scripts/render-homebrew-cask.shreplaces the formula renderer: two SHA256s instead of four, still failing hard on a missing tarball or an unrendered placeholder.Casks/pipecorn.rband deletesFormula/pipecorn.rbfrom the tap. A formula wins over a cask with the same token, so leaving the 0.1.3 formula in place would keep serving the error above.brew trust pipecorn/tap— Homebrew 6.0 requires that once per machine for any third-party tap.Faster releases (
d1aae82)The 0.1.3 run took ~12 minutes, ~6.5 of it in
oclif pack tarballs.--no-xz: oclif builds.tar.gzand.tar.xzfor all five targets; nothing consumes the xz ones and they dominate the step.--parallel: targets build concurrently rather than in sequence.cache: npmon both release jobs, matchingci.yml.Patch the advisories that actually reach users (
d3d79d3)Of the packages flagged on this repo, only two are present in the packed tarball:
brace-expansion(viaminimatch) andfast-uri(viaajv). Both bumped by patch releases, lockfile only.npm audit --omit=devnow reports no vulnerabilities.Everything still flagged is a dev dependency. The critical one is
vitest— "when Vitest UI server is listening, arbitrary file can be read and executed" — and this repo runsvitest runwith no UI package and no listening server. Clearing those needs avitest2 → 5 migration, which belongs on its own branch.Verification
#{version}/#{arch}interpolation surviving the placeholder pass; renderer exits 1 on a missing tarball.pipecorn-v0.1.3-linux-x64.tar.gzthat the archive root ispipecorn/containingbin/pipecorn, so thebinary "pipecorn/bin/pipecorn"path is right, and that oclif's shim resolves symlinks itself — it finds its bundlednodewhen invoked through the symlink a cask creates.--no-xzand--parallelchecked against oclif'spack/tarballs.tsflag definitions.npm ci,npm run lint,npm run typecheck,npm test(25/25),npm run buildall pass on the new lockfile.Untested: whether Gatekeeper blocks the first run. Casks quarantine their downloads where formulae do not, and the bundled
nodeis unsigned. If it does, the fix is apostflightthat strips the xattr — deliberately left out until the problem is observed rather than weakening a protection pre-emptively.The cask reaches the tap on the next tag push, not on merge.
🤖 Generated with Claude Code
https://claude.ai/code/session_01VJDs7niXGGW2dmPXd1e93S
Generated by Claude Code