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

Treat pre-release as minor to their unsuffixed version #22

Merged
merged 7 commits into from
May 16, 2024

Conversation

imgrant
Copy link
Contributor

@imgrant imgrant commented Jun 19, 2023

This is a suggested solution for issue #21 — where a semantic tag is incorrectly incremented when incrementing a modifier tag, and also when dropping a modifier tag. The example in the issue is for a format of YYYY.MM.MINOR.

Essentially, it treats, e.g. 2023.6.0 as later than pre-releases such as 2023.6.0-rc.0. Some tests are included.

Fixes #21

@imgrant
Copy link
Contributor Author

imgrant commented Jul 1, 2023

@muratgozel Would love to know whether you think this PR is correct/desirable/viable. I appreciate it does change the behaviour of node-calver.

I am using my fork of this locally, but it complicates things because although I think this is the right place to implement this, I'm actually really using another package which has this as its dependency. So I have to also use a fork of that package, so that I could alter its dependencies to use my fork of this package. Obviously, I'd rather not have the debt of carrying forks forward.

@imgrant imgrant mentioned this pull request Sep 13, 2023
@muratgozel
Copy link
Owner

@imgrant sorry for the late reply, im merging this pr but will also update the library to its next major version as there are things in this lib that doesn't fit to the calendar versioning scheme. thank you for the fixes. 🙏

@muratgozel muratgozel merged commit 9877f8d into muratgozel:master May 16, 2024
@imgrant
Copy link
Contributor Author

imgrant commented May 16, 2024

Hey @muratgozel many thanks, glad to see this project is still alive! I can also rebase my changes in #23 shortly

@muratgozel
Copy link
Owner

@imgrant no need to rebase or anything in #23 it isn't important regarding the next major release. if i may ask, do you still use calver in production? and what kind of project if so?

@imgrant
Copy link
Contributor Author

imgrant commented May 17, 2024

I see. Yes, I use node-calver in production (a micro services web site, Calver is used in the CICD pipeline because we preferred it over semantic), although I use my own fork because I need the functionality in this PR and #23. Be great if #23 was merged and then I could go back to using this upstream instead of maintaining a fork.

I'm using it with release-it! See eg: casmith/release-it-calver-plugin#28

@muratgozel
Copy link
Owner

I will merge the #23 but won't release it, you can use it by npm i github/... once i done that. I would like to have your opinions @imgrant on the next release, its a bit BREAKING, happy to see people actually using calver in their pipelines. i'm using it in my monorepo versioning too.

@imgrant
Copy link
Contributor Author

imgrant commented May 17, 2024

I will merge the #23 but won't release it, you can use it by npm i github/... once i done that. I would like to have your opinions @imgrant on the next release, its a bit BREAKING, happy to see people actually using calver in their pipelines. i'm using it in my monorepo versioning too.

Super thanks! Happy to review a PR or whatever on the next release, thanks for the heads-up.

@muratgozel
Copy link
Owner

hey @imgrant updates were made

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.

Level 2 semantic tags are incremented incorrectly for pre-releases
2 participants