Commit 44ff584
committed
fix(@angular/cli): correctly report available package updates during 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 #337121 parent ef75f6a commit 44ff584
2 files changed
Lines changed: 26 additions & 6 deletions
Lines changed: 3 additions & 6 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
942 | 942 | | |
943 | 943 | | |
944 | 944 | | |
945 | | - | |
946 | | - | |
947 | | - | |
948 | | - | |
949 | | - | |
| 945 | + | |
950 | 946 | | |
951 | 947 | | |
952 | 948 | | |
| |||
999 | 995 | | |
1000 | 996 | | |
1001 | 997 | | |
| 998 | + | |
1002 | 999 | | |
1003 | 1000 | | |
1004 | 1001 | | |
1005 | 1002 | | |
1006 | 1003 | | |
1007 | | - | |
| 1004 | + | |
1008 | 1005 | | |
1009 | 1006 | | |
1010 | 1007 | | |
| |||
Lines changed: 23 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
289 | 289 | | |
290 | 290 | | |
291 | 291 | | |
| 292 | + | |
| 293 | + | |
| 294 | + | |
| 295 | + | |
| 296 | + | |
| 297 | + | |
| 298 | + | |
| 299 | + | |
| 300 | + | |
| 301 | + | |
| 302 | + | |
| 303 | + | |
| 304 | + | |
| 305 | + | |
| 306 | + | |
| 307 | + | |
| 308 | + | |
| 309 | + | |
| 310 | + | |
| 311 | + | |
| 312 | + | |
| 313 | + | |
| 314 | + | |
292 | 315 | | |
293 | 316 | | |
294 | 317 | | |
| |||
0 commit comments