Commit 5139035
committed
fix(@angular/cli): gracefully skip unfetchable packages during ng update
When package.json contains packages from non-npmjs registries (JSR, AWS
CodeArtifact, private registries, local workspace packages), the registry
fetch inside Promise.all would reject and hard-fail the entire update
command with a 404 or network error.
Wrap each per-package getNpmPackageJson call in a .catch() so that fetch
failures emit a warning and return a partial sentinel object. The existing
reduce step already handles partial objects correctly: auto-discovered
packages are silently skipped while explicitly-requested packages still
produce a clear SchematicsException, preserving intentional error
visibility.
Closes #288341 parent 7fbc715 commit 5139035
File tree
2 files changed
+52
-0
lines changed- packages/angular/cli/src/commands/update/schematic
2 files changed
+52
-0
lines changedLines changed: 10 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
854 | 854 | | |
855 | 855 | | |
856 | 856 | | |
| 857 | + | |
| 858 | + | |
| 859 | + | |
| 860 | + | |
| 861 | + | |
| 862 | + | |
| 863 | + | |
| 864 | + | |
| 865 | + | |
| 866 | + | |
857 | 867 | | |
858 | 868 | | |
859 | 869 | | |
| |||
Lines changed: 42 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
336 | 336 | | |
337 | 337 | | |
338 | 338 | | |
| 339 | + | |
| 340 | + | |
| 341 | + | |
| 342 | + | |
| 343 | + | |
| 344 | + | |
| 345 | + | |
| 346 | + | |
| 347 | + | |
| 348 | + | |
| 349 | + | |
| 350 | + | |
| 351 | + | |
| 352 | + | |
| 353 | + | |
| 354 | + | |
| 355 | + | |
| 356 | + | |
| 357 | + | |
| 358 | + | |
| 359 | + | |
| 360 | + | |
| 361 | + | |
| 362 | + | |
| 363 | + | |
| 364 | + | |
| 365 | + | |
| 366 | + | |
| 367 | + | |
| 368 | + | |
| 369 | + | |
| 370 | + | |
| 371 | + | |
| 372 | + | |
| 373 | + | |
| 374 | + | |
| 375 | + | |
| 376 | + | |
| 377 | + | |
| 378 | + | |
| 379 | + | |
| 380 | + | |
339 | 381 | | |
340 | 382 | | |
341 | 383 | | |
| |||
0 commit comments