Skip to content

release: publish the GPL binaries to npm as @blit-sh/bin-gpl - #157

Merged
pcarrier merged 1 commit into
mainfrom
npm-bin-skip-gpl
Aug 3, 2026
Merged

release: publish the GPL binaries to npm as @blit-sh/bin-gpl#157
pcarrier merged 1 commit into
mainfrom
npm-bin-skip-gpl

Conversation

@pcarrier

@pcarrier pcarrier commented Aug 2, 2026

Copy link
Copy Markdown
Contributor

publish-bin-npm has been red since 0.43.0, so npm still has @blit-sh/bin 0.42.0 while @blit-sh/core and @blit-sh/browser are at 0.43.0:

scanning /home/runner/work/blit/blit/artifacts for release artifacts...
error: conflicting versions in artifacts: 0.43.0 vs blit-gpl

#152/#154 added blit-gpl_* tarballs to the release, and bin/build-npm-bin-packages scans every *.tar.gz; stripping the blit_ prefix off blit-gpl_0.43.0_linux_x86_64 leaves the name untouched, so it read blit-gpl as the version.

Rather than skipping those artifacts, this publishes them: @blit-sh/bin-gpl plus @blit-sh/bin-gpl-linux-{x64,arm64}[-musl], licensed GPL-2.0-or-later, so anyone who wants the x264 build can take it off npm instead of unpacking a release tarball behind a hand-maintained digest pin.

Details worth a look:

  • Both launchers ship the same npm/bin sources. resolve.js used to hardcode @blit-sh/bin-…; it now reads its own package name, so one copy serves both flavors and the "no prebuilt binary" message names the right package.
  • The GPL launcher has no bin field. Two packages claiming the blit shim would collide wherever both are installed (neo will have both: GPL for linux boxes, MIT for the macOS desktop). Spawn its default export, or use curl -sf https://install.blit.sh | BLIT_GPL=1 sh for a CLI.
  • license is GPL-2.0-or-later on the GPL packages and stays MIT on the rest. Windows and macOS have no GPL build, so that set is unchanged.
  • The first publish of each new package name has to be manual — npm only lets you configure trusted publishing on a package that already exists — so the script's usage comment now spells out the local bootstrap.

Verified

Ran the script over a fixture artifact set holding both flavors (blit_0.43.0_{linux,linux-musl}_{x86_64,aarch64}, blit_0.43.0_darwin_aarch64, blit_0.43.0_windows_x86_64.zip, and the four blit-gpl_*): it generates the ten platform packages plus both launchers at 0.43.0, with .publish-order listing platform packages first. The same fixtures reproduce the CI error on main.

npm packed @blit-sh/bin, @blit-sh/bin-gpl and their linux-x64 platform packages and installed all four into one project: require/import of each launcher resolves to its own binary (@blit-sh/bin → the MIT one, @blit-sh/bin-gpl → the GPL one), candidatePackages() returns the right prefixes, and node_modules/.bin holds exactly one blit.

View in Indent
Tag @indent to continue the conversation here.

@indent

indent Bot commented Aug 2, 2026

Copy link
Copy Markdown
PR Summary

Generating summary...

Issues

Review closed.

CI Checks

7 CI checks failed on 3bf9d29.

Failing build-packages / build-packages (blacksmith-12vcpu-macos-latest, macos-aarch64, false)
  • build-packages / build-packages (blacksmith-12vcpu-macos-latest, macos-aarch64, false) finished with cancelled.
Failing build-packages / build-packages (blacksmith-16vcpu-ubuntu-2404-arm, linux-aarch64, arm64, true)
  • build-packages / build-packages (blacksmith-16vcpu-ubuntu-2404-arm, linux-aarch64, arm64, true) finished with cancelled.
Failing build-packages / build-packages (blacksmith-16vcpu-ubuntu-2404, linux-x86_64, amd64, true)
  • build-packages / build-packages (blacksmith-16vcpu-ubuntu-2404, linux-x86_64, amd64, true) finished with failure.
Failing coverage
  • coverage finished with failure.
Failing e2e
  • e2e finished with failure.
Failing lint
  • lint finished with failure.
Failing test
  • test finished with failure.

@indent
indent Bot force-pushed the npm-bin-skip-gpl branch from 3bf9d29 to 5522b83 Compare August 2, 2026 23:40
@indent indent Bot changed the title release: keep the GPL tarballs out of the npm bin packaging release: publish the GPL binaries to npm as @blit-sh/bin-gpl Aug 2, 2026
@github-actions

github-actions Bot commented Aug 2, 2026

Copy link
Copy Markdown

Coverage

Crate Lines Functions Regions
alacritty-driver 69.7% (698/1002) 72.0% (54/75) 71.7% (1050/1464)
browser 0.0% (0/807) 0.0% (0/65) 0.0% (0/1370)
cli 17.2% (1521/8821) 28.1% (200/712) 20.1% (2730/13555)
compositor 2.6% (246/9558) 7.3% (32/439) 2.7% (352/12801)
fonts 81.4% (721/886) 88.6% (70/79) 83.0% (1427/1719)
fssync 92.5% (4880/5274) 94.1% (445/473) 92.5% (8926/9647)
gateway 26.1% (375/1437) 29.9% (38/127) 19.9% (470/2360)
git 87.3% (4163/4771) 88.2% (328/372) 86.9% (6590/7582)
lsp 76.0% (2503/3295) 78.2% (248/317) 73.8% (3886/5266)
proxy 19.3% (172/892) 20.5% (26/127) 21.2% (293/1381)
remote 90.2% (8628/9561) 92.9% (619/666) 88.0% (14359/16310)
sd-notify 73.9% (68/92) 100.0% (6/6) 83.2% (109/131)
server 37.3% (6504/17458) 51.0% (624/1224) 39.9% (11112/27824)
ssh 1.9% (7/374) 3.2% (1/31) 0.7% (4/613)
upsidedown 31.4% (391/1247) 27.8% (55/198) 34.8% (797/2287)
webrtc-forwarder 2.7% (72/2624) 2.1% (4/187) 1.2% (50/4335)
webserver 60.3% (1051/1742) 64.7% (156/241) 63.1% (1800/2851)
Total 45.8% (32000/69841) 54.4% (2906/5339) 48.4% (53955/111496)

Comment thread bin/build-npm-bin-packages
The 0.43.0 release added blit-gpl_* tarballs, and build-npm-bin-packages, which
scans every *.tar.gz, read "blit-gpl" as a version and aborted ("conflicting
versions in artifacts: 0.43.0 vs blit-gpl") — so publish-bin-npm failed and
@blit-sh/bin is still 0.42.0 while core/browser are 0.43.0.

Give those artifacts their own package set instead of skipping them:
@blit-sh/bin-gpl plus @blit-sh/bin-gpl-linux-<cpu>[-musl], licensed
GPL-2.0-or-later, so a consumer can take the x264 build off npm rather than
unpacking a release tarball behind a hand-maintained digest pin. Both launchers
ship the same npm/bin sources, and resolve.js now reads its own package name to
know which platform packages to look for. The GPL launcher omits the CLI shim so
it installs alongside @blit-sh/bin without both claiming the `blit` bin name.
@indent
indent Bot force-pushed the npm-bin-skip-gpl branch from 5522b83 to b12e673 Compare August 2, 2026 23:48
@pcarrier
pcarrier merged commit 363fae4 into main Aug 3, 2026
11 checks passed
@pcarrier
pcarrier deleted the npm-bin-skip-gpl branch August 3, 2026 00:03
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