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: correctly increase version for "pre" versions by fjcasternao · Pull Request #643 · npm/node-semver

Conversation

@fjcasternao

@fjcasternao fjcasternao commented Oct 18, 2023

Copy link
Copy Markdown

We are using this plugin to bump versions every time we release using our CI. It happens for us that we use to create prereleases for QA to test and it can happen that we have several preminors before reaching the final one.

We realised, there were some issues with the version calculation on this specific scenario, so wanted to submit the fix.

Failing test reflecting the issue is the one on line 130, but the fix was also affecting some of the existing tests so I had to modify them also.

Sorry, something went wrong.

Uh oh!

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

All reactions
@fjcasternaoclv
fix: correctly increase version for premajor, preminor and prepatch r…
a4e3546
…eleases
@fjcasternao
fjcasternao requested a review from a team as a code owner October 18, 2023 20:12
@wraithgar

wraithgar commented Oct 18, 2023

Copy link
Copy Markdown
Contributor

The existing tests are correct, I'm not sure what this change is trying to fix.

1.2.0-0 is the pre-release for 1.2.0 not 1.2.1. If I bump 1.2.0-0 by a patch I should go up to 1.2.0. There is a significant amount of prior discussion on this in these PRs:

  • fix: incorrect results from diff sometimes with prerelease versions #546
  • feat: allow identifierBase to be false #548
mbtools reacted with thumbs up emoji
All reactions
  • 👍 1 reaction

Sorry, something went wrong.

Uh oh!

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

@fjcasternao

fjcasternao commented Oct 18, 2023

Copy link
Copy Markdown
Author

Maybe I am wrong, but to me, 1.2.0-0 is a preminor bump from let’s say 1.1.9

in #546 on your last comment you mention this 1.2.0-pre inc: 1.2.1-0 diff: prepatch that I guess is consistent with my approach here

All reactions

Sorry, something went wrong.

Uh oh!

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

@fjcasternao fjcasternao mentioned this pull request Oct 19, 2023
[BUG] Inc function give incorrect version when bumping subsequent pre versions #644
Closed
1 task done
@fjcasternao fjcasternao closed this Nov 3, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

No reviews

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.

Uh oh!

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

3 participants

@fjcasternao @wraithgar @fjcasternaoclv
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.