Skip to content

PFM-ISSUE-34294 - Research and design for the runtime-generated .npmrc and DOT_NPMRC cutover - #193

Open
vladimir-arsov wants to merge 3 commits into
masterfrom
improvement/PFM-ISSUE-34294-Use-the-new-secrets-and-remove-the-stored-DOT_NPMRC
Open

vladimir-arsov wants to merge 3 commits into
masterfrom
improvement/PFM-ISSUE-34294-Use-the-new-secrets-and-remove-the-stored-DOT_NPMRC

Conversation

@vladimir-arsov

Copy link
Copy Markdown
Contributor

Relates to PFM-ISSUE-34294 and PFM-ISSUE-33675

Specs only, no workflow or code changes. The implementation follows in later PRs.

Summary

This PR adds the research and design for replacing the stored DOT_NPMRC secret with a ~/.npmrc that is generated while the workflow runs. Both documents are under specs/2026-12-01_PFM-ISSUE-34294_jfrog-npmrc-secret-cutover/.

Key design decisions:

  1. One token per repo: each repo's existing JFROG_TOKEN is used for both installing and publishing. No separate read secret is introduced, and 33675 AC1 and AC3 (separate read and publish secrets) are dropped on purpose.
  2. use-npmrc is rewritten in place: it writes registry= and _authToken for the cplace-npm virtual into ~/.npmrc, with the URL taken from the committed JFROG_NPM_PROXY constant. It keeps the replace-registry-host=never line and the foreign-registry warning.
  3. Dual-support window: if JFROG_TOKEN is passed, it wins. If only DOT_NPMRC is passed, it is used as a fallback with a deprecation warning. If neither is passed, the job fails with an explicit error. This mirrors the 34293 pattern.
  4. Removal on master in two PRs: the first adds dual support and updates the templates and README. The second removes every DOT_NPMRC reference once callers have migrated. Release branches pin their own use-npmrc, so they are not affected. Deleting the repo secrets is left to a separate cleanup ticket.
  5. Validation: a pre-merge read check of all 14 tokens, then a live test matrix on clone-cplace-fe, then cplace-remote-filesystem-fe and cplace-project-planning-fe as the reference repos.

Developer Checklist:

  • Updated documentation if needed
  • Created Changelog according
    to Guidelines (specs only, no changelog entry)

🤖 Generated with Claude Code

…npmrc and DOT_NPMRC cutover

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>

@Kaltenbach Kaltenbach left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

✅ Design approved.

vladimir-arsov and others added 2 commits December 3, 2026 16:03
…T_NPMRC becomes a deprecated fallback

use-npmrc delegates to write-npmrc.sh: with jfrog-token it writes the
cplace-npm virtual as registry plus the token as _authToken; with only
dot-npmrc it writes that content with a deprecation warning; with neither
it fails before npm ci. fe-install-deps passes both secrets, both optional.
pr-checks runs shellcheck and bats over the new script.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
… templates and README drop DOT_NPMRC

All eight reusables that run use-npmrc declare JFROG_TOKEN and DOT_NPMRC as
optional and pass both; fe-release-flow's nested install-deps gets both.
write-npmrc.bats covers every input case, whitespace tokens, overwrite and
mode 600. The templates pass JFROG_TOKEN and no DOT_NPMRC; the README
documents JFROG_TOKEN as the install credential (read on the cplace-npm
virtual), marks DOT_NPMRC deprecated and adds the migration steps.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
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