fix(@angular/cli): abort and guide manual mitigation when updating catalog packages#33566
fix(@angular/cli): abort and guide manual mitigation when updating catalog packages#33566clydin wants to merge 1 commit into
Conversation
There was a problem hiding this comment.
Code Review
This pull request introduces a check for packages configured to use catalogs (e.g., using the catalog: specifier) during the ng update process. Since catalogs are shared across monorepos and cannot be modified directly by ng update, the new checkCatalogUpdates function blocks the update and provides clear instructions on how to manually update the catalog configuration and run the migration schematics. A corresponding unit test has been added to verify this behavior. Feedback on this PR highlights a critical issue where package names containing version suffixes (e.g., @angular/core@16) will bypass the catalog check and cause metadata lookup failures. A code suggestion is provided to parse the package name and version before performing the checks.
a1d1bb9 to
d6c223a
Compare
d6c223a to
0dc269f
Compare
…talog packages When packages to be updated are configured to use catalogs (e.g. '@angular/core': 'catalog:'), ng update cannot modify the shared catalog configuration files directly without potentially breaking other monorepo projects. Detect catalog updates early in resolveUserUpdatePlan, resolve the target versions from the registry, and abort with a detailed step-by-step instruction on how to manually update their catalog config file, run package manager install, and execute migration schematics via 'ng update --migrate-only --from <installed-version>'.
0dc269f to
790e090
Compare
When packages to be updated are configured to use catalogs (e.g. '@angular/core': 'catalog:'), ng update cannot modify the shared catalog configuration files directly without potentially breaking other monorepo projects.
Detect catalog updates early in resolveUserUpdatePlan, resolve the target versions from the registry, and abort with a detailed step-by-step instruction on how to manually update their catalog config file, run package manager install, and execute migration schematics via 'ng update --migrate-only --from '.
Closes #31780