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

Incrementing "1.0" does not work, returns undefined #224

Closed
hansemannn opened this issue Dec 9, 2017 · 1 comment
Closed

Incrementing "1.0" does not work, returns undefined #224

hansemannn opened this issue Dec 9, 2017 · 1 comment

Comments

@hansemannn
Copy link

Hey guys!

We noticed that when specifying a version like 1.0 instead of 1.0.0 to semver -i / semver.inc(), it does not increment it properly and returns undefined. Example:

$ semver 1.0.0 -i major
2.0.0
$ semver 1.0 -i major

Is there an option to bump it anyway or do we need to manually repair it? It feels overhead to do it but would of course be possible as well. Thank you!

@isaacs
Copy link
Contributor

isaacs commented Dec 11, 2017

1.0 isn't a "version", it's a "range". (That is, it's equivalent to 1.0.x, and matches any non-prerelease versions from 1.0.0 up to but not including 1.1.0.)

A better error message and non-zero exit code would be great, though.

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

No branches or pull requests

2 participants