Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix: use loose semver to eliminate unnecessary errors #561

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

Speedrunyourknowledge
Copy link

@Speedrunyourknowledge Speedrunyourknowledge commented Mar 25, 2025

I recently used patch-package in production, and I got the “Version string cannot be parsed” error because one of my npm packages had the version 0.10.1a in its package.json. Specifically, this was the “mathquill” npm package. The “a” at the end of the version number was causing the error. As a result, patch-package was unable to patch this npm package when doing a fresh npm install and postinstall.

I propose using the “loose” option when checking if the semantic version of an npm package is valid. In my tests using the “loose” option, the mathquill npm package with version 0.10.1a was correctly given a patch with version 0.10.1-a.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant