Skip to content

refactor(@angular/cli): move update version resolution directly to CLI command#33326

Open
clydin wants to merge 1 commit into
angular:mainfrom
clydin:refactor-update-command-remove-schematic
Open

refactor(@angular/cli): move update version resolution directly to CLI command#33326
clydin wants to merge 1 commit into
angular:mainfrom
clydin:refactor-update-command-remove-schematic

Conversation

@clydin

@clydin clydin commented Jun 8, 2026

Copy link
Copy Markdown
Member

Removes the @schematics/update:update schematic and moves the package version resolution, group expansion, and peer dependency validation logic directly into the CLI's update command.

This simplifies the command execution flow, eliminates sharing state via global variables, and enables direct unit testing of the resolution plan in isolated temporary directories without host monorepo package leakage.

@clydin clydin force-pushed the refactor-update-command-remove-schematic branch 6 times, most recently from fefbfa4 to dc1e98f Compare June 8, 2026 20:37
…I command

Removes the @schematics/update:update schematic and moves the package version resolution, group expansion, and peer dependency validation logic directly into the CLI's update command.

This simplifies the command execution flow, eliminates sharing state via global variables, and enables direct unit testing of the resolution plan in isolated temporary directories without host monorepo package leakage.
@clydin clydin force-pushed the refactor-update-command-remove-schematic branch from dc1e98f to 63ee75d Compare June 8, 2026 20:56
@clydin clydin marked this pull request as ready for review June 8, 2026 22:32

@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 refactors the Angular CLI update command by extracting the update resolution logic from the schematic into a standalone update-resolver.ts module and updating cli.ts to use it directly. Feedback on these changes highlights several issues in the refactored validation and resolution logic: the omission of the ignoredPackages list for reverse peer dependency validation, a missing warning for non-optional peer dependencies, inconsistent prerelease handling via the next parameter in forward peer dependency checks, a regression in dependency resolution precedence due to the reversed order of allRawDeps, and confusing variable shadowing of migrations in cli.ts.

Comment thread packages/angular/cli/src/commands/update/update-resolver.ts
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts
Comment thread packages/angular/cli/src/commands/update/update-resolver.ts
Comment thread packages/angular/cli/src/commands/update/cli.ts
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Jun 8, 2026
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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant