Skip to content

owlstronaut/fix min release age zero#9378

Merged
owlstronaut merged 2 commits into
release/v11from
backport/v11/9368
May 20, 2026
Merged

owlstronaut/fix min release age zero#9378
owlstronaut merged 2 commits into
release/v11from
backport/v11/9368

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

Backport of #9368 to release/v11.

raazkhnl and others added 2 commits May 20, 2026 16:28
When the user has `min-release-age=N` in their `.npmrc`, the config flatten
function derives a `before` date used by pacote. Whenever pacote spawns a
child npm process (e.g. preparing a `git:` or `github:` dep), it forwards
`--before=<date>` to the child. The child then loads the same `.npmrc` and
the previously declared mutual-exclusivity between `before` and
`min-release-age` caused a hard configuration error.

This makes the two options coexist: the `exclusive` constraints are
removed and both flatten functions resolve to the earlier of the two
effective dates, never widening the user's most conservative bound.
The `min-release-age` flatten no longer mutates the per-source config
object (the prior `obj.before = ...` / `delete obj['min-release-age']`
mutations were vestigial and only masked the conflict at the parent
level, not in spawned children).

`min-release-age` is also added to the `params` arrays for `outdated`
and `update` so it remains visible in their command help; it was
previously displayed implicitly via the `before` exclusive grouping.

Fixes: #9291
(cherry picked from commit ca585c8)
@github-actions github-actions Bot requested review from a team as code owners May 20, 2026 16:28
@owlstronaut owlstronaut reopened this May 20, 2026
@owlstronaut owlstronaut merged commit 25708d3 into release/v11 May 20, 2026
52 checks passed
@owlstronaut owlstronaut deleted the backport/v11/9368 branch May 20, 2026 16:33
@github-actions github-actions Bot mentioned this pull request May 20, 2026
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