fix(ci): stop modifying .npmrc during publish to avoid lerna EUNCOMMIT [EXT-00]#10729
Merged
Jared Jolton (jjolton-contentful) merged 1 commit intomasterfrom Mar 20, 2026
Merged
Conversation
Copilot started reviewing on behalf of
Jared Jolton (jjolton-contentful)
March 20, 2026 20:01
View session
Contributor
There was a problem hiding this comment.
Pull request overview
Updates the CircleCI publish flow to avoid creating a dirty git working tree during releases by no longer moving/restoring the repo-level .npmrc, and instead relying on per-package publishConfig.registry while adding only the GitHub Packages auth token to the user npm config.
Changes:
- Remove CI steps that temporarily rename/restore the project
.npmrcduring publishing. - Stop writing scope/registry overrides into
~/.npmrc; only append the GitHub Packages auth token. - Keep publishing behavior directed via
publishConfig.registryin each publishable package.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
ryunsong-contentful
approved these changes
Mar 20, 2026
Contributor
ryunsong-contentful
left a comment
There was a problem hiding this comment.
NO MORE .NPMRC
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.
Purpose
I didn't anticipate the
EUNCOMMITlerna quirk introduced in #10709.publishConfig.registryin package.json already has the highest precedence fornpm publish, so we were solving a problem thatpublishConfigalready handles - we just needed the auth token available.Approach
Remove .npmrc manipulation entirely; rely on publishConfig.registry (already in each package) to direct npm publish to GitHub Packages, and just append the auth token to ~/.npmrc.
Testing steps
Ensure packages release and build succeeds
Breaking Changes
n/a
Dependencies and/or References
npm publishConfig docs.
Deployment
n/a