.npmrc files are not merged in package_metadata.ts #21406
Labels
area: @angular/cli
freq1: low
Only reported by a handful of users who observe it rarely
severity5: regression
type: bug/fix
Milestone
🐞 Bug report
Command (mark with an
x
)Is this a regression?
Yes, this seems to be new issue in 12.1.3
Description
The configuration-loading code in package-metadata.ts no longer merges options loaded across multiple .npmrc files. This means that if the updated project contains .npmrc with less options than the $home .npmrc (typically: contains registry configuration, but not authentication tokens), the attempt to fetch metadata will fail.
In our case, this results in failed authorization and abort of the update process (the error message comes from azure, which is what we use to host our repo)
🔬 Minimal Reproduction
Given the authorization requirements, your steps might differ, but basically
🔥 Exception or Error
🌍 Your Environment
Anything else relevant?
The problem seems to be caused by this commit 6b00d12#diff-1fe35077f343d441cac1946e85d88adf8808fa6b3a0898e85209cc7143e6b9c0
Notice how the original code kept on updating the options variable in the loop across configuration files, but the new one doesn't merge it anywhere
Package manager: npm
The text was updated successfully, but these errors were encountered: