Scope the blit binary npm packages under @blit-sh#67
Merged
Conversation
Rename the npm launcher and per-platform packages from the unscoped
blit-bin / blit-bin-<platform> to @blit-sh/bin and
@blit-sh/bin-<os>-<cpu>[-musl], matching the existing @blit-sh/* scope
(browser, core, react, solid).
import blit from "@blit-sh/bin";
spawn(blit, ["open"], { stdio: "inherit" });
Moves npm/blit-bin -> npm/bin and updates the generator, publisher,
resolver, entry points, CLI, types, and README. The release job path is
unchanged. Verified generation, scoped node_modules resolution (ESM/CJS/
CLI/spawn), publisher ordering, prettier, and npm pack.
pcarrier
added a commit
that referenced
this pull request
Jun 12, 2026
## What
Rename the npm packages that ship the `blit` binary from the unscoped
`blit-bin` / `blit-bin-<platform>` to the **`@blit-sh`** scope, matching
the existing `@blit-sh/*` packages (`browser`, `core`, `react`,
`solid`).
| before | after |
| --- | --- |
| `blit-bin` | `@blit-sh/bin` |
| `blit-bin-linux-x64` | `@blit-sh/bin-linux-x64` |
| `blit-bin-linux-x64-musl` | `@blit-sh/bin-linux-x64-musl` |
| `blit-bin-linux-arm64[-musl]` | `@blit-sh/bin-linux-arm64[-musl]` |
| `blit-bin-darwin-arm64` | `@blit-sh/bin-darwin-arm64` |
| `blit-bin-win32-x64` | `@blit-sh/bin-win32-x64` |
The launcher still installs **exactly one** prebuilt binary for the host
via `optionalDependencies` + `os`/`cpu`/`libc` filters.
## Import API (unchanged shape)
Default export is the absolute path to the platform `blit` executable:
```js
import blit from "@blit-sh/bin";
import { spawn } from "node:child_process";
spawn(blit, ["open"], { stdio: "inherit" });
```
Identical in CommonJS (`require("@blit-sh/bin")`). Helpers remain
available as named exports and on `@blit-sh/bin/resolve`.
## Changes
- `git mv npm/blit-bin -> npm/bin`; rewrote package names across the
resolver, ESM/CJS entries, CLI, `.d.ts`, README, and both
`bin/*-npm-bin-packages` scripts.
- `release.yml` is untouched: the `publish-bin-npm` job already calls
the scripts by path and publishes with `--provenance --access public`
(scoped packages need `--access public`, already passed).
## Verified locally
- Generator emits `@blit-sh/bin` + 6 `@blit-sh/bin-<platform>` packages
into the nested `@blit-sh/` dir layout, with correct `os`/`cpu`/`libc`,
version pinning, and `optionalDependencies`.
- Scoped `node_modules/@blit-sh/*` resolution: ESM default import, CJS
`require`, `@blit-sh/bin/resolve` subpath, spawn, and CLI all work.
- Publisher walks the nested dirs in order (platform packages first,
launcher last).
- `prettier --check .` clean; `npm pack --dry-run` produces
`blit-sh-bin-<ver>.tgz` with the expected 8-file list.
Follow-up to #66 (now merged); branches off latest `main`.
Coverage
|
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.
What
Rename the npm packages that ship the
blitbinary from the unscopedblit-bin/blit-bin-<platform>to the@blit-shscope, matching the existing@blit-sh/*packages (browser,core,react,solid).blit-bin@blit-sh/binblit-bin-linux-x64@blit-sh/bin-linux-x64blit-bin-linux-x64-musl@blit-sh/bin-linux-x64-muslblit-bin-linux-arm64[-musl]@blit-sh/bin-linux-arm64[-musl]blit-bin-darwin-arm64@blit-sh/bin-darwin-arm64blit-bin-win32-x64@blit-sh/bin-win32-x64The launcher still installs exactly one prebuilt binary for the host via
optionalDependencies+os/cpu/libcfilters.Import API (unchanged shape)
Default export is the absolute path to the platform
blitexecutable:Identical in CommonJS (
require("@blit-sh/bin")). Helpers remain available as named exports and on@blit-sh/bin/resolve.Changes
git mv npm/blit-bin -> npm/bin; rewrote package names across the resolver, ESM/CJS entries, CLI,.d.ts, README, and bothbin/*-npm-bin-packagesscripts.release.ymlis untouched: thepublish-bin-npmjob already calls the scripts by path and publishes with--provenance --access public(scoped packages need--access public, already passed).Verified locally
@blit-sh/bin+ 6@blit-sh/bin-<platform>packages into the nested@blit-sh/dir layout, with correctos/cpu/libc, version pinning, andoptionalDependencies.node_modules/@blit-sh/*resolution: ESM default import, CJSrequire,@blit-sh/bin/resolvesubpath, spawn, and CLI all work.prettier --check .clean;npm pack --dry-runproducesblit-sh-bin-<ver>.tgzwith the expected 8-file list.Follow-up to #66 (now merged); branches off latest
main.