-
Notifications
You must be signed in to change notification settings - Fork 1.6k
doc(readme): update github and npm version badges #1872
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
base: master
Are you sure you want to change the base?
Conversation
- Added current package version as badge in title - Removed nodei.co badge - Added npm version badge via shields.io in section `Stable Release`
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1872 +/- ##
=======================================
Coverage 60.79% 60.79%
=======================================
Files 23 23
Lines 4811 4811
=======================================
Hits 2925 2925
Misses 1886 1886 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
| # Cordova Android | ||
|
|
||
| [](https://nodei.co/npm/cordova-android/) | ||
| # Cordova Android  |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
| # Cordova Android  | |
| # Cordova Android | |
| [](https://www.npmjs.com/package/cordova-android) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is the new badge we’ve been applying to some repos. I’d like to avoid having too many different badge designs and layouts, but there would still be some degree of confusion.
I also don't think we should be showing the "GitHub package.json version." If we do show it, it should at least be placed some where else, not next to the title.Maybe at the bottom of the README, or below the exisiting badge but in a table format and declaring it as an active development version.
Including it might reduce confusion for people reading the README in the repo, but it would still cause confusion for people viewing the package on the npm registry.
For example, if the repo is tagged as 16.0.0-dev, and that badge appeared in the 14.0.1 release, anyone reading the 14.0.1 page on npm might wonder why it shows 16.0.0-dev at the top.
However, both the current badge and my suggested badge only report the latest official release. Even the current badge wouldnt accurately show the version that a user is installing.
Maybe the current badge I suggested should also include the label of "Latest Release" so its clear.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here's another possible example: https://gist.github.com/erisu/2536f97976e64165c00a781888b0b6b4
Just ignore the two that displays as text. Some reason its not rendering correctly in the gist but renders OK in the repo.
Below the title, it shows the latest release on npm. The next row shows development related badges.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You are right, the users on NPM would also see the development version in the title and would get confused. I started in my repos to manually add the current package version in the title like in https://github.com/katzer/cordova-plugin-local-notifications. But thought, maybe it could be made automatic, so you don't have to update it manually. This was my first try here to made it automatic and now see which disadvantage it have. I like your gist approach, but see you are using there also shields.io. I didn't see on nodei.co that it supports a label option. How would do you find it, to place manually the package version in the title? If the package gets published to npm the version would be correct.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What I like on your approach is, that the users see on NPM that there is a development version which has recent development.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
How would do you find it, to place manually the package version in the title?
I would personally prefer to avoid adding more places where version numbers need to be maintained within the repo.
We already have the version in package.json, package-lock.json, RELEASENOTES.md (updated during release), and other files depending on the package.
The more places we have to update, the higher the risk of forgetting one. I've had cases before—outside of Cordova—where I released a package and forgot to update a version in a file, simply because I didn't remember it existed. I ended up having to publish a patch just to fix that oversight.
If the badges are going to cause confusion, then I would rather remove them.
But this is just my opinion. You could try and ask if anyone else would be in favor of adding the version to the title or if they have any recommendations.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The more places we have to update, the higher the risk of forgetting one. I've had cases before—outside of Cordova—where I released a package and forgot to update a version in a file, simply because I didn't remember it existed. I ended up having to publish a patch just to fix that oversight.
To avoid this, I always do a search in my IDE for the version i want to replace and this works very good. I don't have to remember all places, where to replace the version :)
What about your gist recommendation? I would take it over, but it's using shields.io not nodei.co
I find it better, when you can see the current
package.jsonversion of the repository in the title. I usedshields.iofor it. To not be confused with the current released npm package, I created a sectionStable Releasewhich shows the npm version. I removed the nodei.co badge because it was hard to read and showednpm install cordova-androidthough you should add a platform withcordova platform add android.Platforms affected
Motivation and Context
Description
Testing
Checklist
(platform)if this change only applies to one platform (e.g.(android))