Skip to content

[v10.32.1] pnpm fetch does not apply patches #11034

@daniele-orlando

Description

@daniele-orlando

Verify latest release

  • I verified that the issue exists in the latest pnpm release

pnpm version

10.32.1

Which area(s) of pnpm are affected? (leave empty if unsure)

CLI

Link to the code that reproduces this issue or a replay of the bug

https://github.com/user-attachments/files/26130074/Reproduction.zip

Reproduction steps

1a) download and extract Reproduction.zip
1b) or visit https://codesandbox.io/p/devbox/vigilant-neco-yyr5jt?file=%2Fdemo.sh
2) Run sh ./demo.sh

Describe the Bug

pnpm fetch does not apply the patches nor fail. It just silently skips patching even though allowUnusedPatches=false and ignorePatchFailures=false are explicitly set.

grep 'function handleChildren(element, props' ./apps/example-app/node_modules/.pnpm/docxtemplater-html-module@*/node_modules/docxtemplater-html-module/js/paragraph.js

should show the patched source

function handleChildren(element, props=[]) {

but instead matches the original (not patched) source code

function handleChildren(element, props) {

Expected Behavior

pnpm fetch should match the pnpm install behavior about patches applications: it should apply the patches or it should report an error when patches are not applied. In this case it should apply patches, because pnpm install does it correctly.

Which Node.js version are you using?

24.14

Which operating systems have you used?

  • macOS
  • Windows
  • Linux

If your OS is a Linux based, which one it is? (Include the version if relevant)

Debian

Metadata

Metadata

Assignees

Labels

Type

No fields configured for Bug.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions