Repository navigation
npm: publish musl packages and fix exit code on spawn failure - #1371
Merged
Merged
Conversation
sbdchd#1130 added this exit, but it was dropped when the wrapper moved to js/index.js in sbdchd#1133. Without it a spawn error (for example the glibc binary on Alpine) prints the error and exits 0, so CI passes without linting anything.
The release already builds squawk-linux-musl-x64 and squawk-linux-musl-arm64, but they weren't published to npm, so `npm install squawk-cli` on Alpine got the glibc binary, which can't run. Add @squawk-cli/linux-x64-musl and @squawk-cli/linux-arm64-musl with "libc": ["musl"], mark the existing linux packages as glibc, and pick the musl package in the wrapper when running on musl.
馃懛 Deploy request for squawkhq pending review.Visit the deploys page to approve it
|
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.
The release already builds squawk-linux-musl-x64 and squawk-linux-musl-arm64, but npm only gets the glibc linux packages. On Alpine,
npm install squawk-cliinstalls@squawk-cli/linux-x64, which can't run there:It also exits 0, so a lint step in CI passes without checking anything. The
process.exit(1)from #1130 got lost when the wrapper moved tojs/index.jsin #1133.Changes:
@squawk-cli/linux-x64-musland@squawk-cli/linux-arm64-muslwith"libc": ["musl"], and mark the existing linux packages as"libc": ["glibc"]so npm installs only one-muslpackage when it detects musl (same checks as detect-libc)xtask update-versionTested by packing the packages with the v2.66.0 release binaries and installing them in
node:26-alpineandnode:26-slim: npm installs only the matching package, squawk runs, and a failing migration exits 1 on both. I didn't test arm64.One thing on your side: since publishing uses trusted publishing, I think the two new package names need to exist on npm with the trusted publisher set up before the next release.