We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
When creating a new instance of the SemVer class form a version string with a build, the build segment is included in the raw field.
SemVer
The build segment should either be or not be part of the raw field, but not a mix of both.
Copy and run the following example code which should log true but instead logs false.
true
false
const { SemVer } = require("semver"); const freshInstance = new SemVer("1.0.0-rc.2+build.4"); const modifiedInstance = new SemVer("1.0.0-rc.1+build.4"); modifiedInstance.inc("prerelease", "rc"); console.log(freshInstance.raw === modifiedInstance.raw);
The text was updated successfully, but these errors were encountered:
semver in the node ecosystem doesn't really use the build segment. just curious, what's your use case?
Sorry, something went wrong.
We actually use it in GitHub Actions within my companies organization to automatically validate and generate releases.
The only reason I noticed this inconsistency has to do with the fact that it broke the unit tests when adding a new feature.
fix: preserve build in raw after inc
985a584
Fixes: #562
3aaf239
fix: preserve build in raw after inc (#565)
5c8efbc
Successfully merging a pull request may close this issue.
Is there an existing issue for this?
Current Behavior
When creating a new instance of the
SemVer
class form a version string with a build, the build segment is included in the raw field.Expected Behavior
The build segment should either be or not be part of the raw field, but not a mix of both.
Steps To Reproduce
Copy and run the following example code which should log
true
but instead logsfalse
.Environment
The text was updated successfully, but these errors were encountered: