Commit d368d1a
committed
fix(@angular/cli): handle pnpm catalog: protocol in ng update
When using pnpm's `catalog:` protocol for dependency versions in
`package.json`, `ng update` would fail with "Package X was not found on
the registry" because the `catalog:` specifier is not a valid npm
package argument and cannot be resolved by the npm registry.
This change adds two fixes:
- `isPkgFromRegistry()` now recognizes `catalog:` as referencing
registry packages instead of rejecting them
- `_getAllDependencies()` resolves `catalog:` specifiers to `^<version>`
using the installed version from node_modules, providing a valid
semver range for downstream processing
Fixes angular#304431 parent 7fbc715 commit d368d1a
2 files changed
Lines changed: 55 additions & 1 deletion
Lines changed: 26 additions & 1 deletion
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
773 | 773 | | |
774 | 774 | | |
775 | 775 | | |
776 | | - | |
| 776 | + | |
777 | 777 | | |
778 | 778 | | |
779 | 779 | | |
780 | 780 | | |
| 781 | + | |
| 782 | + | |
| 783 | + | |
| 784 | + | |
| 785 | + | |
| 786 | + | |
| 787 | + | |
| 788 | + | |
| 789 | + | |
| 790 | + | |
| 791 | + | |
| 792 | + | |
| 793 | + | |
| 794 | + | |
| 795 | + | |
| 796 | + | |
| 797 | + | |
| 798 | + | |
| 799 | + | |
| 800 | + | |
781 | 801 | | |
782 | 802 | | |
783 | 803 | | |
| |||
804 | 824 | | |
805 | 825 | | |
806 | 826 | | |
| 827 | + | |
| 828 | + | |
| 829 | + | |
| 830 | + | |
| 831 | + | |
807 | 832 | | |
808 | 833 | | |
809 | 834 | | |
| |||
Lines changed: 29 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
97 | 97 | | |
98 | 98 | | |
99 | 99 | | |
| 100 | + | |
| 101 | + | |
| 102 | + | |
| 103 | + | |
| 104 | + | |
| 105 | + | |
| 106 | + | |
| 107 | + | |
| 108 | + | |
| 109 | + | |
| 110 | + | |
| 111 | + | |
| 112 | + | |
| 113 | + | |
| 114 | + | |
| 115 | + | |
| 116 | + | |
| 117 | + | |
| 118 | + | |
| 119 | + | |
| 120 | + | |
| 121 | + | |
| 122 | + | |
| 123 | + | |
| 124 | + | |
| 125 | + | |
| 126 | + | |
| 127 | + | |
| 128 | + | |
100 | 129 | | |
101 | 130 | | |
102 | 131 | | |
| |||
0 commit comments