Skip to content

Conversation

@clydin
Copy link
Member

@clydin clydin commented Dec 29, 2025

This commit adds support for ignoring peer dependency warnings and errors during package installation. This is useful for commands like ng update where transient peer dependency conflicts may occur.

  • Added ignorePeerDependenciesFlag to the PackageManagerDescriptor interface.
  • Implemented the flag for npm (--legacy-peer-deps) and pnpm (--strict-peer-dependencies=false).
  • Updated PackageManager.install to accept and apply the ignorePeerDependencies option.

…manager

This commit adds support for ignoring peer dependency warnings and errors during package installation. This is useful for commands like `ng update` where transient peer dependency conflicts may occur.

- Added `ignorePeerDependenciesFlag` to the `PackageManagerDescriptor` interface.
- Implemented the flag for `npm` (`--legacy-peer-deps`) and `pnpm` (`--strict-peer-dependencies=false`).
- Updated `PackageManager.install` to accept and apply the `ignorePeerDependencies` option.
@clydin clydin added the target: minor This PR is targeted for the next minor release label Dec 29, 2025
This commit updates the `ng update` command to utilize the `ignorePeerDependencies` option when installing packages. Previously, the command forced the installation (`--force`) when NPM 7+ was detected to workaround peer dependency issues. Now, it uses the more specific `ignorePeerDependencies` option (mapping to `--legacy-peer-deps` for NPM), which is safer and cleaner.
@clydin clydin added the action: review The PR is still awaiting reviews from at least one requested reviewer label Dec 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: review The PR is still awaiting reviews from at least one requested reviewer area: @angular/cli target: minor This PR is targeted for the next minor release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant