Skip to content

fix(ci): stop modifying .npmrc during publish to avoid lerna EUNCOMMIT [EXT-00]#10729

Merged
Jared Jolton (jjolton-contentful) merged 1 commit intomasterfrom
fix/ci/avoid-lerna-euncommit
Mar 20, 2026
Merged

fix(ci): stop modifying .npmrc during publish to avoid lerna EUNCOMMIT [EXT-00]#10729
Jared Jolton (jjolton-contentful) merged 1 commit intomasterfrom
fix/ci/avoid-lerna-euncommit

Conversation

@jjolton-contentful
Copy link
Contributor

@jjolton-contentful Jared Jolton (jjolton-contentful) commented Mar 20, 2026

Purpose

I didn't anticipate the EUNCOMMIT lerna quirk introduced in #10709. publishConfig.registry in package.json already has the highest precedence for npm publish, so we were solving a problem that publishConfig already 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

Copilot AI review requested due to automatic review settings March 20, 2026 20:00
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 .npmrc during publishing.
  • Stop writing scope/registry overrides into ~/.npmrc; only append the GitHub Packages auth token.
  • Keep publishing behavior directed via publishConfig.registry in each publishable package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copy link
Contributor

@ryunsong-contentful ryunsong-contentful left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

NO MORE .NPMRC

@jjolton-contentful Jared Jolton (jjolton-contentful) merged commit 56029a4 into master Mar 20, 2026
19 checks passed
@jjolton-contentful Jared Jolton (jjolton-contentful) deleted the fix/ci/avoid-lerna-euncommit branch March 20, 2026 20:12
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.

3 participants