确定给定 npm 包的最流行版本? [英] Determine most popular version of a given npm package?

查看:87
本文介绍了确定给定 npm 包的最流行版本?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

npm 注册表提供了关于最依赖包的指标,但是假设您想确定给定软件包的最流行版本 - 这可能吗?

The npm registry provides metrics on the most depended packages, but say you wanted to determine the most popular version of a given package - is that possible?

作为用户,假设我正在考虑升级到 react-router^4.0.0,但想查看一些采用数字(即运行 ^3.0.0 vs ^4.0.0),有没有办法做到这一点?一般来说,假设一个给定的软件包在过去一个月中有 50 万次下载,我无法想象它们都是 foobar@latest,因此查看每个版本的下载细分似乎很有用.

As a user, say I'm thinking of upgrading to react-router^4.0.0, but would like to look at some adoption numbers (i.e. the number of folks running ^3.0.0 vs ^4.0.0), is there a way to do this? Generically, say a given package has 500k downloads in the past month, I couldn't imagine they are all for foobar@latest, so looking at a breakdown of downloads per version would seem to be useful.

此外,作为发布者,假设我将一些软件包发布到 npm,并想了解这些软件包的哪些版本最受用户欢迎.npm 是否为此提供某种类型的报告?当我登录并查看我发布的项目时,我似乎找不到这些号码.

Moreover, as a publisher, say I have some packages published to npm and would like to understand which versions of these packages are the most popular with my users. Does npm offer some type of report for this? I can't seem to find these number when I'm logged in and viewing my published items.

推荐答案

NPM 现在公开每个版本的下载次数.

NPM exposes now a number of downloads per version.

https://www.npmjs.com/package/typescript ->点击版本"

这篇关于确定给定 npm 包的最流行版本?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆