Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,9 +19,7 @@
#
-->

# Cordova Android

[![NPM](https://nodei.co/npm/cordova-android.png)](https://nodei.co/npm/cordova-android/)
# Cordova Android ![GitHub package.json version](https://img.shields.io/github/package-json/v/apache/cordova-android)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# Cordova Android ![GitHub package.json version](https://img.shields.io/github/package-json/v/apache/cordova-android)
# Cordova Android
[![NPM](https://nodei.co/npm/cordova-android.svg?style=flat&data=n,v,u&color=blue)](https://www.npmjs.com/package/cordova-android)

Copy link
Member

@erisu erisu Nov 26, 2025

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.

Copy link
Member

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.

Copy link
Contributor Author

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.

Copy link
Contributor Author

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.

Copy link
Member

@erisu erisu Nov 26, 2025

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.

Copy link
Contributor Author

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


[![Node CI](https://github.com/apache/cordova-android/workflows/Node%20CI/badge.svg?branch=master)](https://github.com/apache/cordova-android/actions?query=branch%3Amaster)
[![codecov.io](https://codecov.io/github/apache/cordova-android/coverage.svg?branch=master)](https://codecov.io/github/apache/cordova-android?branch=master)
Expand All @@ -30,6 +28,9 @@ Cordova Android is an Android application library that allows for Cordova-based

[Apache Cordova](https://cordova.apache.org/) is a project of [The Apache Software Foundation (ASF)](https://apache.org/).

## Stable Release
![npm version](https://img.shields.io/npm/v/cordova-android.svg)

## Requirements

* Java Development Kit (JDK) 17
Expand Down
Loading