GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — fix: prerelease identifier starting with digits by mbtools · Pull Request #781 · npm/node-semver

Conversation

@mbtools

@mbtools mbtools commented Apr 24, 2025

Copy link
Copy Markdown
Contributor

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.

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

nhedger reacted with heart emoji
All reactions
  • ❤️ 1 reaction
mbtools added 2 commits April 24, 2025 21:50
@mbtools
fix: prerelease identifier
cbca3e5
@mbtools
revert semver.inc
14325dd
@mbtools

mbtools commented Apr 24, 2025

Copy link
Copy Markdown
Contributor Author

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

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@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
@wraithgar

wraithgar commented May 8, 2025

Copy link
Copy Markdown
Contributor

Thanks, good move using the re that's already being exported instead of trying to make a new one.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

wraithgar
wraithgar approved these changes May 8, 2025
View reviewed changes
@wraithgar wraithgar changed the title fix: prerelease identifier fix: prerelease identifier starting with digits May 8, 2025
@wraithgar
wraithgar merged commit c99f336 into npm:main May 8, 2025
@github-actions github-actions Bot mentioned this pull request May 8, 2025
chore: release 7.7.2 #783
Merged
@mbtools
mbtools deleted the prerelease-identifier branch May 8, 2025 18:52
owlstronaut pushed a commit that referenced this pull request May 12, 2025
@github-actions
chore: release 7.7.2 (#783)
281055e
🤖 I have created a release *beep* *boop*
---


## [7.7.2](v7.7.1...v7.7.2)
(2025-05-12)
### Bug Fixes
*
[`fcafb61`](fcafb61)
[#780](#780) add missing `'use
strict'` directives (#780) (@Fdawgs)
*
[`c99f336`](c99f336)
[#781](#781) prerelease
identifier starting with digits (#781) (@mbtools)
### Chores
*
[`c760403`](c760403)
[#784](#784) template-oss-apply
for workflow permissions (#784) (@wraithgar)
*
[`2677f2a`](2677f2a)
[#778](#778) bump
@npmcli/template-oss from 4.23.6 to 4.24.3 (#778) (@dependabot[bot],
@npm-cli-bot)

---
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>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

1 more reviewer
@wraithgar wraithgar wraithgar approved these changes
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

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

Uh oh!

There was an error while loading. Please reload this page.

2 participants

@mbtools @wraithgar
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402775 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.