Repository navigation
fix(release): pass the npm token through a temp userconfig - #2
Merged
Merged
Conversation
pnpm 11+ ignores npm_config_* auth variables, so the release workflow published without credentials and npm answered 404. Write the token to a mode-600 npmrc in a temp dir, name it with NPM_CONFIG_USERCONFIG, and remove it afterwards. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01GykcoiqQvD2ZC8e5VwyMYp
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. Note Currently processing new changes in this PR. This may take a few minutes, please wait... ⚙️ Run configuration
📒 Files selected for processing (1)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
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.
Before: the release workflow failed with
404 Not Foundon the first package, even with a valid read-and-write token inNPM_TOKEN.After: the token reaches npm and the release can publish.
pnpm 11+ no longer reads
npm_config_*auth variables, sorelease.mjswas publishing with no credentials at all. Against a local stub registry, the old way sent noAuthorizationheader; the new way sendsBearer <token>.How. After build and verify,
release.mjswrites//registry.npmjs.org/:_authToken=…to a mode-600npmrcin a temp dir, points the publish processes at it withNPM_CONFIG_USERCONFIG, and deletes the dir when publishing ends, even if it fails. The token still never appears on a command line. BotUI'srelease.mjsuses the same env-var approach and will hit the same problem with pnpm 12.🤖 Generated with Claude Code
https://claude.ai/code/session_01GykcoiqQvD2ZC8e5VwyMYp
Generated by Claude Code