refactor(@angular/cli): move update version resolution directly to CLI command#33326
Open
clydin wants to merge 1 commit into
Open
refactor(@angular/cli): move update version resolution directly to CLI command#33326clydin wants to merge 1 commit into
clydin wants to merge 1 commit into
Conversation
fefbfa4 to
dc1e98f
Compare
…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.
dc1e98f to
63ee75d
Compare
There was a problem hiding this comment.
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.
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.
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.