Skip to content

fix: increment dotted prerelease identifiers - #870

Merged
owlstronaut merged 1 commit into
npm:mainfrom
liuzemei:fix-dotted-prerelease-id
Jun 4, 2026
Merged

owlstronaut merged 1 commit into
npm:mainfrom
liuzemei:fix-dotted-prerelease-id

Conversation

@liuzemei

@liuzemei liuzemei commented Jun 4, 2026

Copy link
Copy Markdown
Contributor

Fixes #226.

Summary

  • treat a dotted prerelease identifier as a prefix when deciding whether to continue incrementing the existing prerelease sequence
  • keep replacing the prerelease when the matched prefix is followed by a non-numeric segment
  • add fixtures for dotted identifiers such as alpha.beta and alpha.beta.5

Testing

  • npm test

@liuzemei
liuzemei requested a review from a team as a code owner June 4, 2026 04:09

@owlstronaut owlstronaut left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@liuzemei thanks for casually fixing a 9 year old bug!

@owlstronaut
owlstronaut merged commit bea6028 into npm:main Jun 4, 2026
35 checks passed
@github-actions github-actions Bot mentioned this pull request Jun 4, 2026
@stephenlacy

Copy link
Copy Markdown

Nice! totally forgot about this one

owlstronaut pushed a commit that referenced this pull request Jun 4, 2026
🤖 I have created a release *beep* *boop*
---


## [7.8.2](v7.8.1...v7.8.2)
(2026-06-04)
### Bug Fixes
*
[`bea6028`](bea6028)
[#870](#870) increment dotted
prerelease identifiers (#870) (@liuzemei, @SheldonNeo)

---
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>
social4hyq pushed a commit to social4hyq/homebrew-core that referenced this pull request Sep 20, 2026
semver 7.8.2

Created-by: HarmonybrewBot
Commit-by: HarmonybrewBot
Merged-by: HarmonybrewBot
Description: Created by `brew bump`

---

Created with `brew bump-formula-pr`.<details>
  <summary>release notes</summary>
  <pre>## [7.8.2](npm/node-semver@v7.8.1...v7.8.2) (2026-06-04)
### Bug Fixes
* [`bea6028`](npm/node-semver@bea6028) [#870](npm/node-semver#870) increment dotted prerelease identifiers (#870) (@liuzemei, @SheldonNeo)</pre>
  <p>View the full release notes at <a href="https://github.com/npm/node-semver/releases/tag/v7.8.2">https://github.com/npm/node-semver/releases/tag/v7.8.2</a>.</p>
</details>
<hr>

See merge request: Harmonybrew/homebrew-core!10573
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.

Pre-release id version do not update with a provided pre-release id

4 participants