shields icon indicating copy to clipboard operation
shields copied to clipboard

Allow NPM Unpacked Size by version

Open adamlui opened this issue 1 year ago • 0 comments

The GitHub File Size shield allows a param for branch so a version tag can be supplied. This is useful since users can be viewing readme's from specific releases on github.com, so the size should reflect what they're actually downloading.

The same should apply to NPM Unpacked Size (but by version) because when packages are published, npmjs.com renders the README for that release, so if it contains this shield, it wrongly shows the size for latest package only, so user can end up browsing version history for an older release to download, for example:

image image image

... yet they all show the same unpacked size for all the releases, so it is misleading. They might be looking for an older version specifically for smallest unpacked size that provides the minimal feature set they actually require for their project.

This is also useful on github.com where there's no true unpacked size in sidebar like npmjs.com to correct the untrue shield info

adamlui avatar Apr 01 '24 13:04 adamlui