-
Notifications
You must be signed in to change notification settings - Fork 5
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
[usability issue] Doesn't return either distance
or semver
#27
Comments
Ok, I've resolved the issue after investigating source code. We don't use I would recommend not using any mask by default. |
distance
or semver
distance
or semver
I think the reason for the default mask is that several popular tools produce versions in that format. It could perhaps be better highlighted, or intelligently fall back by default. |
The reason is that this was initially developed for a specific use case, and the defaults were chosen to fit that particular use case. Publishing it for reuse by others was more of an afterthought. Over time I did add options and made some tweaks to make it more suitable for other use cases as well, but the defaults are not optimized for the broadest possible audience. So basically it boils down to a legacy issue. I wouldn't mind changing this, but I don't think it's worth breaking compatibility over. Maybe it could be bundled if there is ever a more fundamental reason for a semver-major update. @TimothyJones I'm not sure how an intelligent fallback would work, do you have an idea of how that could be achieved without breaking compatibility with code that relies on this default? |
I think bringing in a fallback would be a breaking change. What I was thinking was it might be nice if the default was I think the ideal might be a warning of "hey we didn't find anything, but we did find X.Y.Z without the prefix", but I'm not sure how that warning would best be presented - printing to standard error won't be what everyone wants, and throwing an error seems a bit harsh. We could add a I made the claim that All of these include the The semver spec doesn't mention any prefix, but I think the reason the |
I created a simple js file in the root of my project:
which returns:
like it couldn't acquire either of those. But
git describe
w/o params properly returns:The text was updated successfully, but these errors were encountered: