How to see package history?

前端 未结 3 1063
迷失自我
迷失自我 2021-02-01 12:27

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.

3条回答
  •  离开以前
    2021-02-01 13:19

    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 go to https://registry.npmjs.org/ 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 ""
    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 :)

提交回复
热议问题