patch-package icon indicating copy to clipboard operation
patch-package copied to clipboard

Does not support pnpm

Open arobinson opened this issue 2 years ago • 2 comments

patch-package 6.4.7

**ERROR** No package-lock.json, npm-shrinkwrap.json, or yarn.lock file.

You must use either npm@>=5, yarn, or npm-shrinkwrap to manage this project's
dependencies.

pnpm does not use any of these files. It uses pnpm-lock.yaml

arobinson avatar Aug 15 '22 16:08 arobinson

I'm not sure it really should support it well. pnpm will hard-link these files, so if the package is patched, it is patched for the entire computer, not just the working copy. As a result the patch will affect the entire computer.

arobinson avatar Aug 15 '22 16:08 arobinson

latest version of pnpm has this built-in https://pnpm.io/cli/patch and for old versions I have used a community maintained for of this package https://www.npmjs.com/package/@milahu/patch-package

saihaj avatar Aug 16 '22 14:08 saihaj

Closing as this works well in pnpm natively 👍🏻 and we document this in the README

orta avatar Sep 28 '22 09:09 orta