Skip to content

fix: prerelease identifier #781

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

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mbtools
Copy link
Contributor

@mbtools mbtools commented Apr 24, 2025

Closes #775

@wraithgar your suspicion was correct. The regex for the prerelease identifier was not precise enough. Changing the order of numeric and non-numeric parts fixes the issue. I reverted the change to inc function in semver.js. The tests still pass 😃

I added tests that check the exact result of parsing valid versions in particular the pre-release and build parts which was somehow missing. We might want to add edge cases here.

@mbtools
Copy link
Contributor Author

mbtools commented Apr 24, 2025

Looks like the lint errors are related to template, not this change

@mbtools mbtools marked this pull request as ready for review April 24, 2025 20:14
@mbtools mbtools requested a review from a team as a code owner April 24, 2025 20:14
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.

[BUG] Coercing version with prerelease identifier that starts with digits returns truncated identifier
1 participant