fix(@angular/cli): fixes Yarn v2 support for registry configuration
Adds support for yarnrc.yml files so that users of Yarn v2+ who attempt to run ng add or ng update do not experience a bug where the incorrect registry file extension (.yarnrc) is selected.
Fixes #23448
PR Checklist
Please check to confirm your PR fulfills the following requirements:
- [x] The commit message follows our guidelines: https://github.com/angular/angular-cli/blob/main/CONTRIBUTING.md#-commit-message-guidelines
- [x] Tests for the changes have been added (for bug fixes / features)
- [x] Docs have been added / updated (for bug fixes / features)
PR Type
What kind of change does this PR introduce?
- [x] Bugfix
- [ ] Feature
- [ ] Code style update (formatting, local variables)
- [ ] Refactoring (no functional changes, no api changes)
- [ ] Build related changes
- [ ] CI related changes
- [ ] Documentation content changes
- [ ] Other... Please describe:
What is the current behavior?
Currently repositories using Yarn v2 or higher do not use the correct registry configuration file format, which causes issues when running ng-cli commands that require access to private repositories. See: https://github.com/angular/angular-cli/issues/23448
Issue Number: 23448
What is the new behavior?
The ng add and ng update commands check the correct file format (yarnrc.yml) for any repositories using Yarn version 2 or higher.
Does this PR introduce a breaking change?
- [ ] Yes
- [x] No