How can I show the most recently published versions of an npm package, including beta/unstable versions?
This question helps identify how you can get the most recent, stable version (does not show beta version), but I would like to see a list of the several most recent versions, including beta versions.
$ npm view webpack versions ... '0.7.9', '0.7.11', '0.7.12', '0.7.13', '0.7.14', '0.7.15', '0.7.16', '0.7.17', '0.8.0-beta1', '0.8.0-beta2', ... 316 more items ]
I would like to show the "tail" of this list, instead of seeing the first several packages that were released. Is this possible?
How can I show a list of the most recently released versions for a particular npm package?
This npm ls --depth=0 will list all local modules as name@version . ` Or globals: npm -g ls --depth=0 .
Use npm view [package-name] version to know the specific latest version of a package available on the npm registry. Use npm list [package-name] to know the specific latest version of an installed package. Use npm install [package-name]@[version-number] to install an older version of a package.
You can use --json
flag to output all the versions in the json format, which is quite human-readable
I could not overcome that ...xxx more items] issue until I found this blog post by Will Anderson, who should get credits:
npm view some-package-name@* version
The trick is to have a glob with all available package versions, and then for each one of those show its "latest" (one and only) version.
EDIT
As per comment observation (and original blog post), that does not show pre-release versions. To also get pre-release versions and not incur into ... XX more items ]
output, one can run (note plural versions
):
npm view some-package-name versions --json
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With