Skip to content

fix(inc): fully capture prerelease identifier #764

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

Merged
merged 1 commit into from
Feb 3, 2025

Conversation

wraithgar
Copy link
Member

Closes: #763

@wraithgar wraithgar requested a review from a team as a code owner February 3, 2025 17:31
@wraithgar wraithgar force-pushed the gar/prerelease-regex branch from 4c533fa to a367dcc Compare February 3, 2025 17:36
@wraithgar
Copy link
Member Author

There is probably something deeper going on here that explains why the prerelease regex on its own doesn't capture the whole string, that may be worth looking into but if it's gonna take more than a day I think we ship this as-is and fix it later.

@wraithgar wraithgar merged commit af761c0 into main Feb 3, 2025
29 checks passed
@wraithgar wraithgar deleted the gar/prerelease-regex branch February 3, 2025 21:02
@github-actions github-actions bot mentioned this pull request Feb 3, 2025
wraithgar pushed a commit that referenced this pull request Feb 3, 2025
🤖 I have created a release *beep* *boop*
---


## [7.7.1](v7.7.0...v7.7.1)
(2025-02-03)
### Bug Fixes
*
[`af761c0`](af761c0)
[#764](#764) inc: fully capture
prerelease identifier (#764) (@wraithgar)

---
This PR was generated with [Release
Please](https://github.com/googleapis/release-please). See
[documentation](https://github.com/googleapis/release-please#release-please).

Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
wraithgar pushed a commit that referenced this pull request May 8, 2025
Closes #775

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.

Related: #764 (comment)
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] 7.6.0 --> 7.7.0 inc behavior change
2 participants