How to see package history?

node.jsNpm

node.js Problem Overview


How can I see the history of a package in the Npm registry?

In particular, I want to know when https://npmjs.org/package/npm version 1.1.2 was released.

node.js Solutions


Solution 1 - node.js

You could do npm view npm there are some options you can find at https://docs.npmjs.com/cli/view

e.g. npm view [email protected] time

Solution 2 - node.js

For those wondering how to view these details online. There is a slightly ugly* way I found to do that. Here's how

  1. Assuming your package name is <packageName> go to https://registry.npmjs.org/<packageName> the JSON here is probably the same thing you get when you run npm view
  2. Do a Ctrl+F(or equivalent) to search for "time":{ or "<your_version_number>"
  3. You can find the version release date under the "time" key.

For example if you want to find out when version 1.1.25 (couldn't find 1.1.2) of npm was released. You can go to https://registry.npmjs.org/npm Search for "1.1.25" and iterate till you find a value under the "time" key or search for "time":{ (whichever is easier) and there you have it!

> "time":{"modified":"2017-10-13T18:58:10.523Z","created":"2013-07-12T18:32:48.902Z","1.1.25":"2013-07-12T18:32:49.875Z"...

*Ugly because you have to parse the JSON to understand the mess :)

Solution 3 - node.js

For some specific versions I have found that time is not present and therefore the package is not listed when running that command. To see a list of all available times for a package run this command: npm view <package> time. To see all versions and history run npm view <package> versions.

Attributions

All content for this solution is sourced from the original question on Stackoverflow.

The content on this page is licensed under the Attribution-ShareAlike 4.0 International (CC BY-SA 4.0) license.

Content TypeOriginal AuthorOriginal Content on Stackoverflow
QuestionColonel PanicView Question on Stackoverflow
Solution 1 - node.jspfriedView Answer on Stackoverflow
Solution 2 - node.jsraghav710View Answer on Stackoverflow
Solution 3 - node.jsOgglasView Answer on Stackoverflow