tsdjs / tsd

Check TypeScript type definitions
MIT License
2.38k stars 68 forks source link

chore: add npm version badge to README #153

Closed Jolg42 closed 2 years ago

Jolg42 commented 2 years ago

It's nice to check the current version and click to get to npm 😄

voxpelli commented 2 years ago

Started adding this to my projects as well, so I'm 👍

sindresorhus commented 2 years ago

I don't really see the point. The current version is shown in the repo sidebar. I prefer the minimum amount of badges.

Instead of trying to add this badge to every repo, it's probably easier to use a browser extension to add it to every repo for yourself.

Jolg42 commented 2 years ago

😢 @sindresorhus In the sidebar, it shows the git tag and not the npm version. While in general, they are in sync. It also often happens that they are not. So having the npm badge is a better indicator and also provides a direct link to the npm package page.

Instead of trying to add this badge to every repo, it's probably easier to use a browser extension to add it to every repo for yourself.

Many projects already have a npm badge, and when the npm package name is different from the GitHub repository name, I'm unsure how that would work. it happens quite often, especially with scoped packages.

sindresorhus commented 2 years ago

While in general, they are in sync.

They are always in sync in this repo.

Many projects already have a npm badge, and when the npm package name is different from the GitHub repository name, I'm unsure how that would work. it happens quite often, especially with scoped packages.

It would read from the package.json, not the repo name.

Seems like a good feature request for https://github.com/npmhub/npmhub

Jolg42 commented 2 years ago

Thanks for mentioning npmhub, didn't know about this, I'll check it out.