fix(@angular/cli): correctly report available package updates during bare ng update - #33713
Merged
Merged
Conversation
There was a problem hiding this comment.
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.
…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
force-pushed
the
fix/issue-33712
branch
from
July 31, 2026 08:10
d7d5a6a to
9435a67
Compare
dgp1130
approved these changes
Jul 31, 2026
Collaborator
Author
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.
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 bareng updateto list available workspace updates (wherepackages.size === 0),isUpdatingis 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
resolveUserUpdatePlanto include listing mode (packages.size === 0), ensuring cached registry metadata is used to list available package updates.Closes #33712