Skip to content

Install the Homebrew formula from npm on Homebrew's Node - #485

Merged
bkeepers merged 2 commits into
mainfrom
homebrew-npm-formula
Oct 26, 2026
Merged

bkeepers merged 2 commits into
mainfrom
homebrew-npm-formula

Conversation

@bkeepers

Copy link
Copy Markdown
Member

Follow-up to #480. Instead of documenting the Linux binary's libstdc++/libatomic requirement, Homebrew now declares the runtime itself.

Homebrew formula (packages/cli/homebrew/slackwater.rb): installs the published @slackwater/cli npm tarball with depends_on "node" and std_npm_args, the standard pattern for Node CLIs. Homebrew supplies the runtime, so the formula no longer depends on system libraries, and it now covers Intel macOS and arm64 Linux, which it previously refused.

Release workflow: update-homebrew renders the formula from the npm tarball's SHA-256 and no longer waits on the binary build. The release workflow publishes to npm before it dispatches build-binaries.yml; the download retries in case the registry lags. The CI formula check renders the new placeholders.

Shell installer: runs the downloaded binary with --version before installing it. If it can't start, the installer prints the loader error, and on a missing shared library it prints the apt-get command and the npm alternative, then exits without installing.

The SEA binaries still back install.sh and the Releases page; the trade-off is that brew users now follow Homebrew's node rather than the pinned Node 26.

Validation

  • Ran the formula's install step (npm install -ddd --global --build-from-source --prefix=… cli-1.0.0-beta.4.tgz) from the published tarball on Node 22; slackwater --version and extremes --station noaa/9414290 work.
  • Ran install.sh end to end against the real 1.0.0-beta.4 linux-x64 archive (served locally): installs and runs. Then against the same archive with libatomic.so.1 patched to an absent library via patchelf: prints the loader error and apt hint, exits 1, installs nothing.
  • shellcheck install.sh and Prettier pass.
  • Not run: brew install, brew style, or brew readall. Homebrew's bottle registry isn't reachable from where this was written, so the macOS homebrew CI job is the first real check of the formula. One thing to watch there: brew style may flag version as redundant if Homebrew parses 1.0.0-beta.4 from the npm URL.

Generated by Claude Code

The formula installed the SEA binary, which on Linux relies on the
system's libstdc++ and libatomic, and only covered Apple Silicon macOS
and x86_64 Linux. It now installs the published npm package with
depends_on "node", so Homebrew supplies the runtime on every platform it
supports. The tap update renders the formula from the npm tarball's
checksum and no longer waits on the binaries.

The SEA binaries still serve install.sh and the Releases page.
install.sh now runs the downloaded binary before installing it, and on a
missing shared library prints the apt command instead of installing a
binary that can't start.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016sqnGa837NoKsxhNefCgnC
Copilot AI lite review requested due to automatic review settings October 26, 2026 17:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟡 Changes recommended

Address the musl loader error matching and remove the redundant Homebrew formula version declaration.

1 open issue
What changed in this PR

This pull request changes Homebrew distribution to install the published @slackwater/cli npm package using Homebrew’s Node runtime, while retaining standalone binaries for the shell installer and GitHub Releases.

Changes:

  • Replaces Homebrew binary downloads with the npm tarball and checksum.
  • Updates release automation and CI formula rendering.
  • Adds shell-installer binary validation and Linux runtime guidance.
  • Refreshes documentation, contributor guidance, and release notes.
File Description
README.md Updates CLI installation guidance for Homebrew on macOS and Linux.
packages/​cli/​README.md Documents Homebrew’s Node runtime and standalone binary requirements.
packages/​cli/​homebrew/​slackwater.rb Installs the npm package using Homebrew’s Node dependency.
install.sh Validates the downloaded binary and reports runtime-library guidance on failure.
CONTRIBUTING.md Updates distribution and release workflow documentation.
.github/​workflows/​ci.yml Renders the Homebrew formula with the npm checksum placeholder.
.github/​workflows/​build-binaries.yml Downloads the npm tarball and updates the Homebrew tap formula independently of binary builds.
.changeset/​homebrew-npm.md Records the Homebrew and installer changes for the CLI release.

Review effort: Lite

Comment thread packages/cli/homebrew/slackwater.rb Resolved
Homebrew parses prerelease versions from npm tarball URLs, so the
explicit version line duplicated the URL and brew style flags it.

Homebrew and npm installs no longer use the standalone binary, and the
shell installer now prints the library instructions itself, so the CLI
README keeps one sentence under "Download binary" for direct downloads.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_016sqnGa837NoKsxhNefCgnC
@pkg-pr-new

pkg-pr-new Bot commented Oct 26, 2026

Copy link
Copy Markdown

Open in StackBlitz

@slackwater/api

npm i https://pkg.pr.new/openwatersio/slackwater/@slackwater/api@485

@slackwater/cli

npm i https://pkg.pr.new/openwatersio/slackwater/@slackwater/cli@485

@slackwater/engine

npm i https://pkg.pr.new/openwatersio/slackwater/@slackwater/engine@485

@slackwater/react

npm i https://pkg.pr.new/openwatersio/slackwater/@slackwater/react@485

slackwater

npm i https://pkg.pr.new/openwatersio/slackwater@485

commit: 1ec6f45

@bkeepers
bkeepers merged commit 880a7fd into main Oct 26, 2026
22 checks passed
@bkeepers
bkeepers deleted the homebrew-npm-formula branch October 26, 2026 18:23
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.

2 participants