ds300 / patch-package

Fix broken node modules instantly 🏃🏽‍♀️💨
MIT License
10.26k stars 287 forks source link

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

Open mogzol opened 1 year ago

mogzol commented 1 year ago

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.

felixfbecker commented 8 months ago

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