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

CLI accepts invalid increment specifiers with -i/--increment and treats them as 'patch' #108

Open
Tracked by #501
mklement0 opened this issue Oct 23, 2014 · 3 comments
Labels
semver:major backwards-incompatible breaking changes
Milestone

Comments

@mklement0
Copy link

E.g.:

semver -i nonesuch 1.0.0

outputs 1.0.1 and sets exit code to 0; i.e., it acts as if patch (or no argument) had been specified.

@mklement0 mklement0 changed the title CLI accepts invalid increment specifiers with -i/--increment and treats them as CLI accepts invalid increment specifiers with -i/--increment and treats them as 'patch' Oct 23, 2014
@lukekarrys
Copy link
Contributor

This is working by design. The default value of -i is patch and invalid versions are filtered out of the input.

@mklement0
Copy link
Author

Quietly accepting invalid input is problematic.

Another way of putting it: if this is by design, please reconsider the design.

Consider reporting an error if an invalid -i argument is specified.

@lukekarrys lukekarrys reopened this Jun 9, 2022
@lukekarrys
Copy link
Contributor

lukekarrys commented Jun 9, 2022

@mklement0 Thanks for the feedback. I closed this issue as a first pass through this repo, so maybe "by design" was the wrong choice of words. The code makes it clear that any invalid values passed to -i are ignored but I agree that erroring is a good idea.

For this project I believe in a very cautious approach to versioning, so I think this would be a breaking change so I'm going to tag it as such. I don't have any immediate plans to release a major version but surfacing this as a breaking change will help to batch this in when it's time.

@lukekarrys lukekarrys added the semver:major backwards-incompatible breaking changes label Jun 9, 2022
@darcyclarke darcyclarke added this to the v8 milestone Oct 31, 2022
@darcyclarke darcyclarke mentioned this issue Oct 31, 2022
14 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
semver:major backwards-incompatible breaking changes
Projects
None yet
Development

No branches or pull requests

3 participants