subpatch
v0.3.0
Published
Patch your dependencies in dependents (and more)
Readme
Subpatch
Subpatch is a package designed to help you patch dependents in production. For example, let's say you need to patch typescript for an extra feature that will be needed. Since npm's built-in patch functionality explicitly disallows publishing patch information, this means consumers of your package would be missing the patch.
Visually:
example-dependent
├─┬ your-package
└── dependency-needing-patch <-- need to patch this oneYou can use subpatch by adding a postinstall script and then defining the patches you want to be applied in the subpatch field in your package.json:
{
"scripts": {
"postinstall": "subpatch"
},
"subpatch": {
"patches": {
"@sveltejs/kit": "patches/sveltekit-feature-a.patch",
"typescript": ["patches/typescript-a.patch", "patches/typescript-b.patch"]
}
}
}