ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.31k stars 288 forks source link

Support PNPM & PNPM workspaces in patch-generation #399

Closed jorenbroekema closed 2 years ago

jorenbroekema commented 2 years ago

image

patch-package doesn't support pnpm-lock.yaml / pnpm-workspace.yaml.

Can support be added for PNPM?

muuvmuuv commented 2 years ago

Ah no, I really wished this was resolved already, :D Such an useful package...

miikebar commented 2 years ago

Using the patches seems to be working fine with pnpm (tested both locally and on Vercel). The problem is with patch generation - for that you could simply switch to npm / yarn (remove node_modules, install using npm / yarn), generate the patch and then switch back to pnpm. It's a hacky workaround but works for now

muuvmuuv commented 2 years ago

Just noticed that pnpm has generation and initialization built-in since 7.4 😅

jorenbroekema commented 2 years ago

Just noticed that pnpm has generation and initialization built-in since 7.4 😅

Do you have a link to what you're referring to?

muuvmuuv commented 2 years ago

Sure @jorenbroekema https://github.com/pnpm/pnpm/issues/3077

Jolg42 commented 2 years ago

Note: pnpm added a patch command 2 days ago 🎁

See https://pnpm.io/cli/patch https://github.com/pnpm/pnpm/releases/tag/v7.4.0

jorenbroekema commented 2 years ago

That's awesome @Jolg42 , no need for patch-package to explicitly support it then if it's built-in