ops(sync): add .npmrc to the file-sync map#40
Conversation
Phase 2 was half-done. `.nvmrc` has been mapped in every group since the original rollout — all 22 repos report 24.16.0, which also resolves the old caveat about dtl-sandbox and nswds-tokens running Node 22. `.npmrc` was never mapped: 8 repos carried engine-strict by hand, 12 had no .npmrc at all, and 2 had bespoke variants. Map it now, with two carve-outs rather than a blind whole-file sync. nswds-ui takes a variant source. Its .npmrc is `provenance=false`, not engine-strict: npm only supports provenance for public source repos, and this one is private. Overwriting it with the canonical would reintroduce the E422 publish failure that silently stranded v1.8.0-v2.1.0 as git tags that never reached npm. The variant preserves that directive verbatim and deliberately does not add engine-strict — that is a Turborepo monorepo whose workspace packages each declare their own engines, and turning it on there should be a considered pass, not a side effect of this change. The canonical .npmrc absorbs the rationale that ictds-portal-flows had written into its own copy, so the sync spreads that reasoning to every repo instead of stripping it from the one repo that had it. Adding engine-strict to the 12 repos without it is safe today: every repo's .nvmrc (24.16.0) satisfies its own declared engines.node, so nothing that installed before stops installing. It is load-bearing going forward — it turns a warning nobody reads into a failure in the `install / install` job that rulesets already require. Merging fans out `chore(ci):` PRs to 22 repos.
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
There was a problem hiding this comment.
Pull request overview
This PR wires .npmrc into the existing repo-file sync system so the fleet consistently enforces Node engine floors via engine-strict=true, while preserving an explicit nswds-ui exception via a variant .npmrc source.
Changes:
- Adds a canonical
repo-files/.npmrc(withengine-strict=trueand rationale) and arepo-files/.npmrc-nswds-uivariant (withprovenance=falseand explicit non-use ofengine-strict). - Updates
.github/sync.ymlto sync.npmrcinto each repo, using the variant source fornswds-ui. - Updates
docs/config-single-source-of-truth.mdto reflect that.nvmrcis already synced and.npmrcis now synced (with thenswds-uicarve-out).
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated no comments.
| File | Description |
|---|---|
repo-files/.npmrc-nswds-ui |
Introduces the nswds-ui-specific .npmrc variant to preserve provenance=false and avoid engine-strict side effects. |
repo-files/.npmrc |
Establishes the canonical synced .npmrc with engine-strict=true and documentation explaining why it matters. |
docs/config-single-source-of-truth.md |
Updates the single-source-of-truth documentation to reflect current sync status and the .npmrc variant handling. |
.github/sync.yml |
Wires .npmrc into the sync map across groups, with nswds-ui pointing at the variant source. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Reopened as a new PR from |
Turns on the half of Phase 2 that was never wired up.
What I found
.nvmrcwas already mapped in every group — my earlier read that Phase 2 was untouched was wrong. All 22 repos report24.16.0, which also resolves the doc's stale caveat about dtl-sandbox and nswds-tokens running Node 22..npmrcwas the missing half. Current state across the 22 sync targets:engine-strict=trueby hand.npmrcat allTwo carve-outs, not a blind sync
nswds-ui gets a variant source (
repo-files/.npmrc-nswds-ui). Its.npmrcisprovenance=false, not engine-strict — npm only supports provenance for public source repos and this one is private. A whole-file sync of the canonical would reintroduce theE422publish failure that, per its own comment, silently stranded v1.8.0–v2.1.0 as git tags that never reached npm. The variant preserves that directive verbatim.It deliberately does not add
engine-strictthere: nswds-ui is a Turborepo monorepo whose workspace packages each declare their own engines, so enabling it should be a considered pass rather than a side effect of this change.ictds-portal-flows' rationale is promoted, not destroyed. It had a 12-line explanation of why engine-strict matters written into its own
.npmrc. That reasoning now lives in the canonical, so the sync spreads it to all 21 repos instead of stripping it from the one that had it.Is adding engine-strict to 12 repos safe?
Yes, verified rather than assumed — every repo's
.nvmrcis24.16.0, and that satisfies every declaredengines.nodeacross the fleet. Nothing that installed before stops installing.It is load-bearing going forward: it converts an
engineswarning nobody reads into a failure in theinstall / installjob that rulesets already require. Without it, an innocuous.nvmrcedit could pass CI and then run unsupported code onmainmid-release.Verification
.github/sync.ymlparses as valid YAML; 5 groups intactrepo-files/.npmrc, nswds-ui →repo-files/.npmrc-nswds-uiprovenance=falseexactly (diffed against its current file)deleteOrphanedstill absent (only the warning comment)repo-files/**, so no workflow change neededBlast radius
Merging fans out
chore(ci):PRs to 22 repos. They are PRs, not direct pushes —SKIP_PR: false— so each is reviewable before it lands.