Skip to content

fix(@angular/cli): respect client-side release age settings during update resolution#33468

Open
clydin wants to merge 1 commit into
angular:mainfrom
clydin:fix-update-resolver-release-age
Open

fix(@angular/cli): respect client-side release age settings during update resolution#33468
clydin wants to merge 1 commit into
angular:mainfrom
clydin:fix-update-resolver-release-age

Conversation

@clydin

@clydin clydin commented Jun 25, 2026

Copy link
Copy Markdown
Member

Query the active package manager's release age gate configuration (like pnpm's minimum-release-age or yarn's npmMinimalAgeGate) and parse it into milliseconds.

This config limit is passed to the RegistryClient in resolveUserUpdatePlan and is used to filter out version candidates that violate the release-age gate by checking the package's publish timestamps in the metadata time record. This guarantees that ng update resolves targeting versions that satisfy all active client-side release-age restrictions.

@clydin clydin force-pushed the fix-update-resolver-release-age branch 3 times, most recently from dc88f1f to b4ea3b0 Compare June 25, 2026 20:54
@clydin clydin marked this pull request as ready for review June 25, 2026 21:03

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request introduces support for a minimum release age gate configuration (such as minimum-release-age for pnpm, npmMinimalAgeGate for yarn, or environment variables) to filter out package versions that were published too recently. It updates the RegistryClient and PackageManager to retrieve and respect this configuration when resolving package versions, and adds corresponding tests and parsers. The review feedback suggests extracting the release age validation logic into a reusable helper function isReleaseAgeSatisfied to reduce code duplication across several functions and safely handle potential NaN values from Date.parse.

Comment thread packages/angular/cli/src/commands/update/update-resolver.ts Outdated
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts Outdated
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts Outdated
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts Outdated
…date resolution

Query the active package manager's release age gate configuration (like pnpm's `minimum-release-age` or yarn's `npmMinimalAgeGate`) and parse it into milliseconds.

This config limit is passed to the `RegistryClient` in `resolveUserUpdatePlan` and is used to filter out version candidates that violate the release-age gate by checking the package's publish timestamps in the metadata `time` record. This guarantees that `ng update` resolves targeting versions that satisfy all active client-side release-age restrictions.
@clydin clydin force-pushed the fix-update-resolver-release-age branch from b4ea3b0 to f4ad109 Compare June 25, 2026 21:06
@clydin clydin added target: minor This PR is targeted for the next minor release action: review The PR is still awaiting reviews from at least one requested reviewer labels Jun 25, 2026
@clydin clydin requested a review from alan-agius4 June 25, 2026 21:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: @angular/cli target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant