feat: more sensible counter and version color #86
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
It's important to determine what
major
,minor
,patch
mean.Case 1: If major refers to the change of
x
ofx.y.z
(this is whatsemver.diff
use):Note:
semver.diff
has other types:premajor, preminor, prepatch, prerelease
, e.g.:Case 2: If major refers to "break the
^
"(this is whatchangeVersionRange
use):Note:
^
simply means allowing changes that do not modify the left-most non-zero version number.Case 3: If major refers to "any change below 1.0.0"(this is what
colorizeVersionDiff
use):colorizeVersionDiff
:Which one is more sensible?
Solution
From the aspect of user, when I run
taze major
, I'm saying I can accept breaking change,when I run
taze minor
, I'm saying I cannot accept breaking change but I want more features, when I runtaze patch
, I'm saying I want only fixes.The first one I want to eliminate is
Case 1
. At first, it's not a thing users care much. Secondly, the design ofnpm-semver
'sReleaseType
has many pitfalls, as to cause many issues about it.Case 3 is a safer one. It's always good to use a safer one but it's a little bit conservative. And, I don't think it's a good idea to change the meanings of today's mode, but it's ok to change only the UI part.
So, this pr picks the
Case 2
.