Repository navigation
feat: add COREPACK_MINIMUM_RELEASE_AGE gate for version resolution - #908
Closed
Aschenbath wants to merge 1 commit into
Closed
Aschenbath wants to merge 1 commit into
Aschenbath wants to merge 1 commit into
Conversation
When resolving tags or ranges from registry metadata, only consider versions whose registry publish time (time field) is at least COREPACK_MINIMUM_RELEASE_AGE minutes old, selecting the newest qualifying version. Unset/empty/0 keeps today's behavior. Exact versions are never gated (deliberate user choice). Invalid values fail fast; unknown or malformed timestamps never bypass the gate. Full (non-abbreviated) metadata is fetched when the gate is active so timestamps are available. Closes nodejs#850.
Contributor
|
This account has opened more than 10 PRs in the last 24 hours. This looks like bot activity, and will result in a ban if the behavior continues. |
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.
Summary
Implements #850: a minimum-release-age gate for registry version resolution, so a just-published (potentially compromised) package-manager release is not silently installed via
@latest/range resolution.COREPACK_MINIMUM_RELEASE_AGE(integer minutes). Unset/empty/0keeps today's behavior (no gate).timefield) is at least the configured age old are considered; the newest qualifying version is selected.Tests
tests/releaseAgeUtils.test.ts(parsing, filtering, tag resolution, edge cases) andtests/MinimumReleaseAge.test.ts(CLI regression against the fixture registry).yarn typecheckandyarn lintclean.NOCK_ENV=replay yarn test run: 234 passed, 4 failed — the 4 failures are the pre-existingcustom registry with auth PROXYdownload tests, which fail identically on the clean tree in this sandbox (network environment), plus 1 expected fail.Closes #850.