Replies: 2 comments 1 reply
-
Ngl native patching in npm sounds great since I’m using patch-package a ton, and it’s clear lots of others are too. Yarn and pnpm already achieved their patch commands, and it will be nice for npm to catch up, especially for bigger projects like monorepos imo. Maybe something like an npm patch command that saves patches in a .npm/patches folder? Tying it to package-lock.json would make sure patches stick across installs, and an npm patch-update could help keep things tidy when deps update |
Beta Was this translation helpful? Give feedback.
-
Hi YasharF! Thanks for bringing up such a useful topic. You’re absolutely right—tools like patch-package are great for managing dependency patches, and having native patching support built directly into the npm CLI would definitely simplify workflows for many developers. As of now, npm doesn’t have built-in patching functionality like Yarn’s or pnpm’s native patch support. However, the idea has come up in community discussions before because patching can be super helpful for fixing bugs or making quick tweaks without waiting for upstream package updates. The npm team tends to prioritize stability and simplicity, so adding native patching would require careful design to keep the tool easy to use while being powerful. That said, community feedback like yours is important, and such features could be considered for future releases if enough interest builds up. In the meantime, tools like patch-package remain a great solution, and using them alongside npm works smoothly. I’d recommend keeping an eye on the official npm GitHub repository and discussion forums where feature requests and ideas often get shared and discussed. |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
I've been using patch-package to manage dependency patches, and I think this type of functionality could be valuable as a native feature in the npm CLI. Other package managers, such as yarn and pnpm, have built-in patching capabilities, so I wanted to explore whether npm has considered something similar.
Has this been discussed before? Would love to hear your thoughts.
Beta Was this translation helpful? Give feedback.
All reactions