badgen.net: Bug in npm badges
Again. đ
@babel/core
is cyan, but shouldnât be, because it is latest
.
The cyan should be only if non-latest dist-tag is passed, no matter it is scoped or not.
About this issue
- Original URL
- State: closed
- Created 6 years ago
- Comments: 15 (15 by maintainers)
Babel is specific case, that was saidâŚ
But i wonât continue, cuz iâm seeing that other đ all the time, so i will fold that. ;/
Consider
@babel/core
âs case, I thinklatest
doesnât always mean âstableâ or âbestâ (maybe ârecommendedâ?).In our cases, the cyan color doesnât (shouldnât) mean stable or unstable, just like the orange doesnât say itâs unstable (we use a lot
0.x
packages in production).semColor()
is meant to reflect semverâs convention:If thereâs a platform specific case, it should be handled in servicesâs live function, other than
semColor()
.Or another point of view about what the color means:
Currently I choose the first one, itâs already used on current badges, itâs easier and simpler (no need to consider platformâs difference, hence platform independent), the
semColor
is mean to expand the idea (add âcyanâ color) and formalize this rule (make it an standalone util).These are my thoughts on this đ
I would rephrase this: The color doesnât carry exact information, only relative information.
In short, the color is a way to make one repo standout from another because something information is different and thereâs a threshold triggering this color.
I see we have different demanding for badge colorâs purpose.
I think badge color should not hold critical information, which will force people to read doc or guess itâs meaning (most people will do). Badge color is mean to give people a faster impression of itâs content, itâs a representation of itâs content, a helper for understanding.
All badges follow this rule, like
green
for buildsuccess
,red
for coverage30%
, oryellow
for install size14.3MB
.People donât know the line between
yellow
andgreen
for install size, but itâs OK. That color doesnât carry critical information, and we shouldnât let it.I hate to procrastinate my job for tomorrow but thatâs what happened⌠;/ I had better thoughts back then⌠Anyway.
It should be platform specific. NPMâs
latest
is same as Githubâsrelease
, no matter what version says. It is considered âstableâ if it is in latest.Color (should) indicate and hint people to know if it is in dist-tag (in case of Github in
prerelease
stage) or not.Color should not indicate if it has some specific word in the version/subject, itâs already visible that it has
-beta.0.0.0
or-canary
or whatever.Iâll make my thoughts and notes later, but in short iâm not agree.
With this color indication, we can further remove@canary
in subject text, wouldnât it be a win?Changed my mind, the label express the âintentionâ to show canary, not the result being canary.
I understand your point, but I still think
v2.0.0-beta.0
is a beta version,cyan
indicate this information(if the version is beta/alpha/canary). It doesnât concern the platform specific info(latest
from npm, orprerelease
from github).