Skip to content
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

fix(@angular/cli): fix ng update for Yarn Pnp #26695

Open
wants to merge 2 commits into
base: main
Choose a base branch
from

Conversation

dominicbachmann
Copy link
Contributor

Extend findPackageJson function to also work when using Yarn PnP

Fixes #26505

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?

When trying to run ng update in a porject that uses Yarn PnP the cli does not detect the project dependencies because it cannot resolve the package.json paths.

Issue Number: 26505

What is the new behavior?

The cli resolves the package.json paths through .pnp.js when the project is using Yarn PnP.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

Not sure if this is a desired solution.

Extend findPackageJson function to also work when using Yarn PnP

Fixes angular#26505
@clydin
Copy link
Member

clydin commented Jan 12, 2024

Thank you for the contribution.
It appears that Yarn PnP has an API available (https://yarnpkg.com/advanced/pnpapi). Would you be interested in converting this PR to use that?

@dominicbachmann
Copy link
Contributor Author

@clydin Will do!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ng update doesn't work with Yarn PnP
2 participants