patch-package icon indicating copy to clipboard operation
patch-package copied to clipboard

Packages with leading 'v' in package.json result in "Unrecognized patch file" error

Open mogzol opened this issue 1 year ago • 1 comments

I'm trying to create a patch for the redlock package, which specifies the version in it's package.json as v5.0.0-beta.2. The leading 'v' in that seems to break patch-package, causing it to output an error:

Unrecognized patch file in patches directory redlock+v5.0.0-beta.2.patch

I can work around this by manually renaming the generated patch file to remove the leading v from the version, which makes it work properly, but it would be nice if this manual step wasn't necessary.

mogzol avatar Dec 14 '22 21:12 mogzol

Having the same issue with mimetext https://www.npmjs.com/package/mimetext

felixfbecker avatar Nov 27 '23 21:11 felixfbecker