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: add identifier validation to inc() #754

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

Conversation

mbtools
Copy link
Contributor

@mbtools mbtools commented Jan 21, 2025

  • Adds a check of the identifier parameter for inc() when trying to increase pre-releases. This prevents the creation of an invalid semver.
  • Removes side-effects of inc() when it is throwing (it was changing the version)

Closes #349

@mbtools mbtools requested a review from a team as a code owner January 21, 2025 19:38
classes/semver.js Outdated Show resolved Hide resolved
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] inc() may produce invalid semver with ReleaseType: prerelease
2 participants