fix(publish): pin yarn publish to registry.npmjs.org#41
Merged
Conversation
yarn 1.x defaults to https://registry.yarnpkg.com, which is a read-only npm mirror. The auth token configured at the top of the script targets registry.npmjs.org, so the publish PUT request was failing with "Not found" against yarnpkg.com. Recent runs for v0.1.0-alpha.28 and v0.1.0-alpha.29 both failed for this reason and never made it to npm (npm latest is stuck at 0.1.0-alpha.27). Passing --registry https://registry.npmjs.org explicitly forces yarn to hit the same endpoint the token is scoped to. After this lands, re-run the Publish NPM workflow against the v0.1.0-alpha.29 tag to actually publish the release. Generated with [Indent](https://indent.com) Co-Authored-By: Indent <noreply@indent.com>
|
Merged
sigmachirality
added a commit
that referenced
this pull request
May 18, 2026
#41 fixed yarn's default registry but the v0.1.0-alpha.29 publish run still failed: + yarn publish --tag latest --registry https://registry.npmjs.org error Couldn't publish package: "https://registry.npmjs.org/@sfcompute%2fnodes-sdk-alpha: Not found" `yarn publish` is not picking up the `_authToken` entry that the script writes via `npm config set` at the top — the PUT request goes out unauthenticated and npm responds with 404. `npm publish` reads the same ~/.npmrc that `npm config set` wrote to, so it actually authenticates. publishConfig.access is already "public" in package.json so no flag is required. Generated with [Indent](https://indent.com) Co-authored-by: Indent <noreply@indent.com>
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.
Context
yarn publishinbin/publish-npmwas hittinghttps://registry.yarnpkg.com— yarn 1.x's default registry, which is a read-only npm mirror — instead ofhttps://registry.npmjs.org. The auth token configured on line 5 (npm config set '//registry.npmjs.org/:_authToken' "$NPM_TOKEN") only scopes auth forregistry.npmjs.org, so the publish PUT against yarnpkg.com fell through to an unauthenticated 404:This silently broke the last two releases — both
v0.1.0-alpha.28andv0.1.0-alpha.29failed identically and never made it to npm.npm view @sfcompute/nodes-sdk-alpha versionstill returns0.1.0-alpha.27, and downstream consumers (sfcompute/cli) cannot bump until this is fixed.The last successful publish was
0.1.0-alpha.27on 2025-12-06, so something between then and now started pushing yarn toward the default registry — likely a runner image change or a tooling update — but the explicit--registryflag makes the publish robust to that drift.Description of changes
Adds
--registry https://registry.npmjs.orgto theyarn publishinvocation inbin/publish-npm, with a short comment explaining why it's required.Testing
The publish-npm script only runs in CI on a release tag, so I can't dry-run it locally. After this PR lands:
v0.1.0-alpha.29tag (Actions → Publish NPM → Run workflow, or re-run the failed run for that release).npm view @sfcompute/nodes-sdk-alpha versiononce the run succeeds.v0.1.0-alpha.28if you want both versions on npm.Review Callouts
Tag
@indentto continue the conversation here.