Skip to content

fix(@angular/cli): correctly report available package updates during bare ng update - #33713

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:fix/issue-33712
Jul 31, 2026
Merged

fix(@angular/cli): correctly report available package updates during bare ng update#33713
alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:fix/issue-33712

Conversation

@alan-agius4

Copy link
Copy Markdown
Collaborator

In v22.0.1, a performance optimization (4510dae) was introduced to fetch registry metadata lazily during ng update, only querying the registry for packages actively being updated or uninstalled. However, during a bare ng update to list available workspace updates (where packages.size === 0), isUpdating is false for every dependency. For installed dependencies with locked versions in package.json (no carets/tildes), localPkgJson exists, causing the resolver to fall back to local mock package info without registry versions or dist-tags.

This commit updates the registry metadata check in resolveUserUpdatePlan to include listing mode (packages.size === 0), ensuring cached registry metadata is used to list available package updates.

Closes #33712

@alan-agius4
alan-agius4 requested a review from dgp1130 July 31, 2026 08:07
@alan-agius4 alan-agius4 added action: review The PR is still awaiting reviews from at least one requested reviewer target: patch This PR is targeted for the next patch release and removed area: @angular/cli labels Jul 31, 2026

@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 optimizes the package metadata fetching process in update-resolver.ts by simplifying the Array.from mapping and ensuring registry metadata is included when listing updates. A new test case was added to verify this behavior. The review comment regarding the use of Array.from was addressed as a valid improvement opportunity.

Comment thread packages/angular/cli/src/commands/update/update-resolver.ts Outdated
…bare ng update

In v22.0.1, a performance optimization (4510dae) was introduced to fetch registry metadata lazily during `ng update`, only querying the registry for packages actively being updated or uninstalled. However, during a bare `ng update` to list available workspace updates (where `packages.size === 0`), `isUpdating` is false for every dependency. For installed dependencies with locked versions in package.json (no carets/tildes), localPkgJson exists, causing the resolver to fall back to local mock package info without registry versions or dist-tags.

This commit updates the registry metadata check in `resolveUserUpdatePlan` to include listing mode (`packages.size === 0`), ensuring cached registry metadata is used to list available package updates.

Closes angular#33712
@alan-agius4 alan-agius4 added action: merge The PR is ready for merge by the caretaker and removed action: review The PR is still awaiting reviews from at least one requested reviewer labels Jul 31, 2026
@alan-agius4
alan-agius4 merged commit 44ff584 into angular:main Jul 31, 2026
41 checks passed
@alan-agius4
alan-agius4 deleted the fix/issue-33712 branch July 31, 2026 17:20
@alan-agius4

Copy link
Copy Markdown
Collaborator Author

This PR was merged into the repository. The changes were merged into the following branches:

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

ng update not reporting new patch or minor versions since v22.0.1 with locked dependency versions in package.json

2 participants