Skip to content

fix(@angular/cli): fixes Yarn v2 support for registry configuration #26860

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 1 commit into from

Conversation

petomi
Copy link

@petomi petomi commented Jan 12, 2024

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:

PR Type

What kind of change does this PR introduce?

  • 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:
#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
  • No

Other information

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 angular#23448
@petomi petomi marked this pull request as ready for review January 12, 2024 16:14
@alan-agius4
Copy link
Collaborator

Hey @petomi, thanks for the PR. However, it seems it's not sufficient to support Yarn 2.0, as discussed in #23448 (comment). The option names in yarnrc.yml differs from that in yarnrc, and npmrc settings are no longer taken into account when using Yarn 2.0.

@alan-agius4 alan-agius4 closed this Mar 6, 2024
@angular-automatic-lock-bot
Copy link

This issue has been automatically locked due to inactivity.
Please file a new issue if you are encountering a similar or related problem.

Read more about our automatic conversation locking policy.

This action has been performed automatically by a bot.

@angular-automatic-lock-bot angular-automatic-lock-bot bot locked and limited conversation to collaborators Apr 6, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng add doesn't use the proper yarn registry.
2 participants