Get versions from npm registry api

Check https://github.com/npm/registry/blob/master/docs/responses/package-metadata.md

You need to vary the Accept header to return abbreviated package metadata. Request the NPM registry directly, not with the npm CLI.


npm show react-chunk time --json

As far as I know there's no command that will fetch only part of the data.

The npm view react-chunk versions command still fetches from https://registry.npmjs.org/react-chuck and then parses it on the client side. It's indeed not very efficient for packages with a lot of versions, but that's the api.