Skip to content

fix(@angular/cli): fix pnpm-workspace.yaml sanitization when using pnpm patches - #34681

Merged
alan-agius4 merged 1 commit into
angular:mainfrom
terencehonles:fix-ng-update-with-pnpm-patches
Nov 11, 2026
Merged

alan-agius4 merged 1 commit into
angular:mainfrom
terencehonles:fix-ng-update-with-pnpm-patches

Conversation

@terencehonles

Copy link
Copy Markdown
Contributor

This change removes pnpm patches from the sanitized pnpm-workspace.yaml.

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?

Running ng update in a pnpm workspace with patches creates a temporary install and then pnpm complains it can't find the patches defined in the pnpm-workspace.yaml for a path that a developer is unaware of (and it gets cleaned up so it can't be inspected).

What is the new behavior?

Running ng update with pnpm patches works normally.

Does this PR introduce a breaking change?

  • Yes
  • No

Other information

…pnpm patches

This change removes pnpm patches from the sanitized
`pnpm-workspace.yaml`.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the sanitizePnpmWorkspace function to correctly identify and remove patchedDependencies blocks during temporary installations, ensuring that relative patch paths do not interfere with the temporary environment. Documentation has been updated to reflect this change, and a corresponding test case has been added to verify the behavior. I have no further feedback to provide.

@alan-agius4 alan-agius4 added target: patch This PR is targeted for the next patch release action: merge The PR is ready for merge by the caretaker labels Nov 11, 2026
@alan-agius4
alan-agius4 merged commit 892a044 into angular:main Nov 11, 2026
41 of 42 checks passed
@alan-agius4

Copy link
Copy Markdown
Collaborator

This PR was merged into the repository. The changes were merged into the following branches:

@terencehonles
terencehonles deleted the fix-ng-update-with-pnpm-patches branch November 11, 2026 11:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

action: merge The PR is ready for merge by the caretaker area: @angular/cli target: patch This PR is targeted for the next patch release

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants