Browse npm get more items

I use the following command to find the version of packages that I have.

npm view <packagename> versions

The result that I will return is as follows

  '2.4.0-2016-10-06-6743', '2.4.0-2016-10-07-6750', '2.4.0-2016-10-07-6751', '2.4.0-2016-10-07-6754', '2.4.0-2016-10-07-6755', '2.4.0-2016-10-10-6763', '2.4.0-2016-10-11-6770', '2.4.0-2016-10-11-6790', '2.4.0-2016-10-12-6799', '2.4.0-2016-10-12-6800', '2.4.0-2016-10-13-6806', '2.4.0-2016-10-13-6807', '2.4.0-2016-10-13-6808', '2.4.0-2016-10-14-6810', ... 37 more items ] 

I want to get all the results, as you can see there are 37 more items that are not shown.

How can I get all the results.

I am using the windows command prompt, as well as the gitbash tool for windows.

+5
source share
1 answer

try adding --json to the command

 npm view <packagename> versions --json 

This is a change to util.inspect () behavior in new versions of Node.js (I assume this is not the behavior that the npm CLI command changed). If you want to get the full list, and also want to make sure it is parsed, just add -json to the command to get the original JSON.stringify () output applied to this piece of package metadata.

https://github.com/npm/npm/issues/13376#issuecomment-232525623

+13
source

Source: https://habr.com/ru/post/1259640/


All Articles