Skip to content

fix(@angular/cli): expand package groups for newly added peer dependencies in update schematic#33269

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:fix/update-angular
May 29, 2026
Merged

fix(@angular/cli): expand package groups for newly added peer dependencies in update schematic#33269
alan-agius4 merged 1 commit into
angular:mainfrom
alan-agius4:fix/update-angular

Conversation

@alan-agius4
Copy link
Copy Markdown
Collaborator

@alan-agius4 alan-agius4 commented May 29, 2026

Previously, the package group stabilization loop (_addPackageGroup) ran completely before the peer dependencies resolution loop (_addPeerDependencies). If a peer dependency was newly added during the peer dependencies loop (such as @angular/core when updating @angular/build), its corresponding package group members (such as @angular/router and @angular/common) were never expanded, leaving them outdated.

Now, we wrap the package group and peer dependencies stabilization logic in a single outer loop so that newly added peer dependencies also get their package groups correctly stabilized and expanded.

…ncies in update schematic

Previously, the package group stabilization loop ran completely before the peer dependencies resolution loop. If a peer dependency was newly added during the peer dependencies loop (e.g., @angular/core), its corresponding package group members (e.g., @angular/router) were never expanded, leaving them at outdated versions.

Now, wrap the package group and peer dependencies stabilization logic in a single outer loop so that newly added peer dependencies are also stabilized and their package groups are correctly expanded.
@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: review The PR is still awaiting reviews from at least one requested reviewer labels May 29, 2026
@alan-agius4 alan-agius4 requested a review from clydin May 29, 2026 06:32
@alan-agius4 alan-agius4 marked this pull request as ready for review May 29, 2026 06:32
Copy link
Copy Markdown

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

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 modifies the package update schematic to nest the package group resolution loop inside the peer dependencies resolution loop. This change ensures that any new peer dependencies introduced during an iteration can correctly trigger the resolution of their corresponding package groups in subsequent iterations, preventing incomplete dependency resolution. There are no review comments, and I have no feedback to provide.

@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 May 29, 2026
@alan-agius4 alan-agius4 merged commit 4b1b899 into angular:main May 29, 2026
42 of 43 checks passed
@alan-agius4 alan-agius4 deleted the fix/update-angular branch May 29, 2026 11:10
@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.

2 participants