Skip to content

ci: write the npm token at release time - #905

Merged
Kikobeats merged 2 commits into
masterfrom
ci/release-token-just-in-time
Aug 25, 2026
Merged

ci: write the npm token at release time#905
Kikobeats merged 2 commits into
masterfrom
ci/release-token-just-in-time

Conversation

@Kikobeats

@Kikobeats Kikobeats commented Aug 25, 2026

Copy link
Copy Markdown
Member

Summary

  • Remove ${NPM_TOKEN} from the committed .npmrc so pnpm 11 stops warning on every install.
  • At release, write the token to both pnpm and npm user config (pnpm config set + npm config set). lerna publishes via npm; pnpm's store alone is not enough. Neither write touches the repo, so lerna stays EUNCOMMIT-clean.

Test plan

  • CI logs have no "Ignored project-level auth setting" warning
  • Next real release authenticates (E404/E401 gone)

Note

Low Risk
CI-only credential wiring and .npmrc cleanup; no runtime or application logic changes.

Overview
Removes the committed //registry.npmjs.org/:_authToken=${NPM_TOKEN} line from .npmrc so routine pnpm install on pnpm 11 no longer logs ignored project-level auth warnings.

The release job in .github/workflows/main.yml now sets the registry token with npm config set (user config) instead of pnpm config set, so lerna publish can authenticate without touching the repo and keeping the working tree clean for release.

Reviewed by Cursor Bugbot for commit 680b2d5. Bugbot is set up for automated code reviews on this repo. Configure here.

Summary by CodeRabbit

  • Chores
    • Improved release publishing authentication configuration.
    • Removed the registry token from project configuration to support safer credential handling.

Drop ${NPM_TOKEN} from the project .npmrc so pnpm stops warning.
Write it to both pnpm and npm user config so lerna can publish
without dirtying the tree.
lerna publishes via npm; pnpm config set is unused.
@coderabbitai

coderabbitai Bot commented Aug 25, 2026

Copy link
Copy Markdown

Review Change Stack

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: defaults

Review profile: CHILL

Plan: Pro Plus

Run ID: d7fe811a-164b-40b2-8c2f-a5e60ed17c41

📥 Commits

Reviewing files that changed from the base of the PR and between a82ea00 and 680b2d5.

📒 Files selected for processing (2)
  • .github/workflows/main.yml
  • .npmrc

📝 Walkthrough

Walkthrough

The release workflow now sets the npm registry authentication token with npm config set. The repository .npmrc no longer contains the registry token setting.

Changes

Release authentication

Layer / File(s) Summary
Configure the release token
.github/workflows/main.yml, .npmrc
The release workflow uses npm config set for the registry authentication token. The .npmrc file removes the token configuration line.

Estimated code review effort: 1 (Trivial) | ~2 minutes

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch ci/release-token-just-in-time

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.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@Kikobeats
Kikobeats merged commit 002da8a into master Aug 25, 2026
12 of 13 checks passed
@Kikobeats
Kikobeats deleted the ci/release-token-just-in-time branch August 25, 2026 07:34
@coveralls

coveralls commented Aug 25, 2026

Copy link
Copy Markdown

Coverage Status

Coverage is 79.564%ci/release-token-just-in-time into master. No base build found for master.

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