Repository navigation
PFM-ISSUE-34294 - Use the new secrets and remove the stored DOT_NPMRC secret - #193
Open
vladimir-arsov wants to merge 5 commits into
Conversation
vladimir-arsov
requested review from
alekhya-cplace,
senthanal and
slaven3kopic
as code owners
December 3, 2026 16:07
…npmrc and DOT_NPMRC cutover Co-Authored-By: Claude Opus 5.5 <[email protected]>
…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 <[email protected]>
… 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 <[email protected]>
vladimir-arsov
force-pushed
the
improvement/PFM-ISSUE-34294-Use-the-new-secrets-and-remove-the-stored-DOT_NPMRC
branch
from
December 4, 2026 09:57
e48a4b3 to
b2feaa2
Compare
…hen a rebuild removed it nx restores a published library from its local cache when a later project depends on it, which replaces its dist directory without the dist .npmrc. promote() and the release flow's failure cleanup then ran against JFROG_URL with only ~/.npmrc. DOT_NPMRC used to cover that by accident; the generated ~/.npmrc authenticates only the cplace-npm read virtual, so both failed with E401 (live test B1 on clone-cplace-fe). Co-Authored-By: Claude Opus 5.5 <[email protected]>
…with its report Co-Authored-By: Claude Opus 5.5 <[email protected]>
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.
Implements PFM-ISSUE-34294. Relates to PFM-ISSUE-33675.
changelog: Frontend-Core: [PFM-ISSUE-34294] FE workflows generate ~/.npmrc from JFROG_TOKEN; DOT_NPMRC is deprecated [PR github-actions#193]Summary
use-npmrcno longer writes the stored whole-file secretDOT_NPMRC. It generates~/.npmrcfrom the repo's existingJFROG_TOKEN, chosen by which secret the caller passes:~/.npmrcJFROG_TOKEN(wins if both are passed)registry=thecplace-npmvirtual,_authTokenfor that path,replace-registry-host=never; mode600, the token never printed::notice::whenDOT_NPMRCis passed tooDOT_NPMRCreplace-registry-host=never, as before::warning::deprecation annotationUse .npmrcstep fails with::error::No npm credentials: …beforenpm ciThe registry URL comes from the committed
JFROG_NPM_PROXYconstant (tools/scripts/lockfile/lib.sh), so install auth is no longer hidden in secret text.Changes
.github/actions/use-npmrc/write-npmrc.sh(new): the generator, with the three paths above and a rejected token containing whitespace.action.ymltakes the optional inputsjfrog-tokenanddot-npmrcand delegates to it. The PFM-ISSUE-34453 comment moved there and is corrected (the masked prefix is theregistry=URL, notJFROG_URL).write-npmrc.bats(new, 11 tests), andpr-checks.ymlruns shellcheck and bats over it.fe-install-deps,fe-licenses,fe-sonar,fe-pr-snapshot,fe-pr-close,fe-cleanup-snapshots,fe-release,fe-release-flow) declareJFROG_TOKENandDOT_NPMRCas optional and pass both to everyuse-npmrccall.fe-release-flow's nestedinstall-depsgets both.tools/scripts/artifacts/nx-project.ts:promote()anddeleteArtifact()restore a dist.npmrcthat an nx rebuild removed (D4 below), plus 3 jest tests.JFROG_TOKENand noDOT_NPMRC. The README documentsJFROG_TOKENas the install credential (it needs read on thecplace-npmvirtual), marksDOT_NPMRCdeprecated and adds the migration steps. The lockfile README's auth wording is updated.research.md,design.md,plan.md,live-test-plan.mdunderspecs/2026-12-01_PFM-ISSUE-34294_jfrog-npmrc-secret-cutover/.The branch is rebased onto PFM-ISSUE-33676 (#192), which made
GIT_USER*optional infe-release-flow.Migration for consumers: at the merge, every caller that already passes
JFROG_TOKENswitches, because the token wins: the release flow (secrets: inherit) and the publish/delete jobs. In thefe-install-deps,fe-licensesandfe-sonarcallers, replace theDOT_NPMRC:line withJFROG_TOKEN: ${{ secrets.JFROG_TOKEN }}; in the others, delete it. Callers that still pass onlyDOT_NPMRCkeep working with the deprecation warning. Callers on@release/26.4and older are unaffected. Each repo'sJFROG_TOKENmust read thecplace-npmvirtual (pre-merge token check,live-test-plan.md§5). RemovingDOT_NPMRCfrom the reusables and deleting the repo secrets moves to a follow-up cleanup ticket.Live validation (
clone-cplace-fe, publishing tocplace-npm-test)Every install case forced a cache miss, so
npm cireally ran through the generated file.use-npmrcpath; cancelled after install (no Sonar token on the clone)~/.npmrcand 27 published via the dist.npmrcin one jobnpm search/npm viewwithout the E404 (D2 from 34293 is gone)26.4.14, tag pushed,::notice::::notice::DOT_NPMRConly::warning::DOT_NPMRConlyUse .npmrcwith the error annotation; nonpm ciAcross all runs: the token never appears in a log, the generated
~/.npmrcis never printed, and there is no unexpected auth error. Full report:live-test-plan.md§7.Found and fixed: D4. nx rebuilds a published library from its local cache when a later project depends on it, which replaces its dist directory without the dist
.npmrc.promote()and the release flow's failure cleanup then ran againstJFROG_URLwith only~/.npmrcand got E401.DOT_NPMRCused to cover that by accident; the generated file authenticates only the read virtual. Without the fix, every release whose libraries are rebuilt as dependencies would fail at merge.Deviation, test environment only (accepted): D3. The PR-close unpublish leaves
cf-devkitandcreate-cplace-workspace: withoutpublishConfigtheir unpublish goes to the default registry, which on the clone is not where the test versions live. In production the virtual's default deployment repo iscplace-npm-local, where they are published.Watch after the merge
secrets: inheritcallers: the notice says "Remove the DOT_NPMRC line from this caller", which an inherit caller does not have. It shows on every release run until the repo secret is deleted.Developer Checklist:
to Guidelines
🤖 Generated with Claude Code