When trying to add patch for package that has non semver compliant version in its package.json patch generation throws error:
Can't find lockfile entry for ...
For example:
plugin serverless-plugin-aws-alerts has version specified as v1.7.4, while in yarn.lock it's saved as 1.7.4. Because of this entry from yarn.lock is filtered out in following code:
When trying to add patch for package that has non semver compliant version in its package.json patch generation throws error:
For example: plugin
serverless-plugin-aws-alerts
has version specified asv1.7.4
, while inyarn.lock
it's saved as1.7.4
. Because of this entry fromyarn.lock
is filtered out in following code:Potential solution that I would like to propose is to coerce versions (
semver.coerce
) while searching for lockfile entry inyarn.lock
.