Skip to content

ci: drop the unscoped _authToken line that npm 10 rejects - #145

Merged
dianaKhortiuk-frontegg merged 1 commit into
masterfrom
claude/fix-npm-auth-node22
Oct 29, 2026
Merged

dianaKhortiuk-frontegg merged 1 commit into
masterfrom
claude/fix-npm-auth-node22

Conversation

@dianaKhortiuk-frontegg

@dianaKhortiuk-frontegg dianaKhortiuk-frontegg commented Oct 29, 2026 •

Copy link
Copy Markdown
Collaborator

Problem

Change

Removes echo "_authToken=$NPM_TOKEN" >> .npmrc from onPullRequestMerged.yaml and onReleaseMerged.yaml. The next line in both files already writes the registry-scoped //registry.npmjs.org/:_authToken=$NPM_TOKEN, so npm still gets the token. Ionic Capacitor's workflows write only the scoped line.

Testing

I ran npm whoami locally on Node 22.22 / npm 10.9 with a dummy token and the same .npmrc lines as CI:

  • With the unscoped line: ERR_INVALID_AUTH, the CI error.
  • Without it: the config is accepted, and npm only rejects the dummy token (E401).

The real check is merging this PR: it should run "Create Release Pull Request" and open the release PR for the changes since v1.2.25.


Generated by Claude Code


Note

Low Risk
CI-only .npmrc tweak with no application or runtime behavior change; publishing still uses the same scoped registry token line.

Overview
Fixes release automation that broke after CI moved to Node 22 / npm 10: both merge workflows were writing a legacy unscoped _authToken line into .npmrc, which npm 10 rejects and caused npm whoami to fail in Create Release Pull Request and would block release publish.

This PR removes echo "_authToken=$NPM_TOKEN" >> .npmrc from onPullRequestMerged.yaml and onReleaseMerged.yaml. Auth is unchanged in practice—the workflows still set //registry.npmjs.org/:_authToken=$NPM_TOKEN, which is what npm 10 requires.

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

Since CI moved to Node 22 (5bcd03e), npm rejects a bare _authToken in
.npmrc with ERR_INVALID_AUTH, so creating the release PR and publishing
both fail at npm whoami. The registry-scoped line written right after it
already carries the token.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01S2yW3aohcrkGZ96iyLpv3a
@dianaKhortiuk-frontegg
dianaKhortiuk-frontegg marked this pull request as ready for review October 29, 2026 11:35
@dianaKhortiuk-frontegg
dianaKhortiuk-frontegg merged commit ff93e0a into master Oct 29, 2026
6 checks passed
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