Skip to content

feat(renovate): pin npm deps to exact versions org-wide - #5

Merged
cewert merged 2 commits into
mainfrom
chore/pin-npm-deps
May 29, 2026
Merged

feat(renovate): pin npm deps to exact versions org-wide#5
cewert merged 2 commits into
mainfrom
chore/pin-npm-deps

Conversation

@cewert

@cewert cewert commented May 29, 2026

Copy link
Copy Markdown
Member

Why

config:recommended preserves whatever range style each manifest already uses, so the org has never enforced a version strategy for npm deps. That's why @astrojs/starlight stayed ^0.39.0 (caret) — Renovate just bumps the range, never pins. Within-range drift between installs is invisible in PRs.

Change

Add :pinAllExceptPeerDependencies to the preset extends:

  • dependencies + devDependencies → pinned exact (^0.39.00.39.0)
  • peerDependencies → stay as ranges (correct for any consumer)

The org has no published npm library (shared-ui is private, fetched from GitHub at build time), so no downstream consumer relies on these ranges — pinning is safe org-wide and gives reproducible installs + reviewable diffs.

Rollout

On Renovate's next scan, each repo gets one 'Pin dependencies' PR converting all carets to exact. That PR's update type is pin, which the automerge rule (patch/digest) does not match — so each is reviewed by a human, then ongoing patch bumps automerge as before.

Validated locally with renovate-config-validator --strict.

cewert added 2 commits May 29, 2026 00:03
Add :pinAllExceptPeerDependencies so dependencies/devDependencies pin
to exact versions (peerDependencies stay ranges). config:recommended
preserved whatever range style each manifest used, so deps like
@astrojs/starlight stayed on carets (^0.39.0) and silently drifted
within-range between installs.

The org has no published npm library (shared-ui is private, consumed
from GitHub at build time), so no downstream consumer depends on these
ranges — exact pins give reproducible installs and clean update diffs.
Enabling this opens a one-time 'Pin dependencies' PR per repo (update
type 'pin', which the automerge rule does not match, so each is
human-reviewed).
@cewert
cewert merged commit a8cf8d0 into main May 29, 2026
1 check passed
@cewert
cewert deleted the chore/pin-npm-deps branch May 29, 2026 05:14
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.

1 participant