A small tool to create and apply patches on your node_modules using node resolve and jsdiff
- Supports all package managers(npm,yarn,pnpm) via node resolve
- Backward compatibility with applying patches from
patch-package
- npm
npm i -D package-patcher
- Update the package inside your node_modules/packages folder
- Run
npx package-patcher create <package-name>
- It will create a patch file in patches folder
Run npx package-patcher apply
You can also add apply patch as your post install script package.json
{
"scripts":{
"apply-patch": "package-patcher apply",
"postinstall": "npm run apply-patch"
}
}
- Only supports npm registry for now
- Need to install in project as dev dependency to use it (global installation might not work)