feat(packaging): distribute szr via npm and PyPI#58
Merged
Conversation
Add wrapper packaging that ships the prebuilt GoReleaser binaries through npm and PyPI, so users can `npm install -g @devr-tools/szr` or `pip install szr` without a Go toolchain and without any network access at install time. - npm: esbuild-style optionalDependencies. A launcher package (@devr-tools/szr) resolves and execs the matching @devr-tools/szr-<os>-<cpu> platform package. No postinstall. - PyPI: one wheel per platform, each bundling the binary as a data-script so pip drops `szr` onto PATH. Stdlib-only builder; ships manylinux2014 + musllinux_1_1 for Linux. - release.yml: publish-npm and publish-pypi jobs, stable-only (matching the Homebrew gate), both via OIDC trusted publishing (no long-lived tokens). - extract-binaries.sh stages release binaries; bootstrap-publish.sh handles the one-time npm publish required before trusted publishers can be added. Verified end-to-end against v0.16.0: launcher run, npm publish --dry-run, wheel install (executable) + twine check, and a live `npm install -g @devr-tools/szr` from the registry. Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
This was referenced Jul 3, 2026
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.
Summary
Adds wrapper packaging so
szris installable from npm and PyPI using the prebuilt GoReleaser binaries — no Go toolchain and no install-time network for users.npm install -g @devr-tools/szr. esbuild-styleoptionalDependencies: the launcher package resolves and execs the matching@devr-tools/szr-<os>-<cpu>platform package. No postinstall.pip install szr. One wheel per platform, each bundling the binary as a data-script so pip dropsszronto PATH (no Python shim). Linux shipsmanylinux2014+musllinux_1_1.publish-npmandpublish-pypijobs inrelease.yml, gated stable-only (matching the Homebrew job), both via OIDC trusted publishing (no long-lived tokens; npm job upgrades to npm ≥ 11.5.1 and setsid-token: write).Files
packaging/extract-binaries.sh— stage release binaries per platform (shared by both builders)packaging/npm/— launcher source,build.sh, one-timebootstrap-publish.shpackaging/pypi/build_wheels.py— stdlib-only per-platform wheel builderpackaging/README.md— architecture + one-time registry setup.gitignore— ignore build artifacts, keep the launcher source trackedREADME.md— npm/pip install instructionsVerification
szr 0.16.0); clear error when the platform package is absentnpm publish --dry-runclean for launcher + platform packagestwine checkPASSED on all 70.16.0and confirmednpm install -g @devr-tools/szr→szr 0.16.0from the public registry🤖 Generated with Claude Code