patch-package
patch-package copied to clipboard
Semver support for ranged patches?
I noticed that a warning is being printed when package version has a mismatch.
In my example, I would like to create a patch that will be applied over ^3 version, without having the need to specify it manually.
I guess the actual change should be done here: https://github.com/ds300/patch-package/blob/master/src/applyPatches.ts#L152 , and use semver library to compare the versions and check for match. This way I'll be able to create my-patch+^3.0.0 and it will be applied over ^3.0.1 as well.
This would be great.
Having to rename the patch files on every revsion/minor update is tedious. Especially with automated updates coming with dependabot or alike.
Not sure about adding version range constraints inside the file name.
I'd be happy to accept a PR to add a cli option that prevents the mismatch warnings from being printed. --disable-version-mismatch-warning or something.