如何知道特定npm包的版本?

时间:2017-06-07 09:18:47

标签: npm versioning

我是个菜鸟。所以我不知道在哪里可以找到有效的版本号。

例如,对于代码推送,我只在他们的自述文件中找到该表:

React Native version(s) Supporting CodePush version(s)
<0.14   Unsupported
v0.14   v1.3 (introduced Android support)
v0.15-v0.18 v1.4-v1.6 (introduced iOS asset support)
v0.19-v0.28 v1.7-v1.17 (introduced Android asset support)
v0.29-v0.30 v1.13-v1.17 (RN refactored native hosting code)
v0.31-v0.33 v1.14.6-v1.17 (RN refactored native hosting code)
v0.34-v0.35 v1.15-v1.17 (RN refactored native hosting code)
v0.36-v0.39 v1.16-v1.17 (RN refactored resume handler)
v0.40-v0.42 v1.17 (RN refactored iOS header files)
v0.43-v0.44 v2.0+ (RN refactored uimanager dependencies)
v0.45+  TBD :) We work hard to respond to new RN releases, but they do occasionally break us. We will update this chart with each RN release, so that users can check to see what our "official" support is.

他们提到了v1.17,所以我试试

"react-native-code-push": "^1.17",

然后出现错误:

notarget No matching version found for react-native-code-push@^1.17

那么我从哪里知道以前的版本号对包有效?

1 个答案:

答案 0 :(得分:1)

package page at npmjs.com右侧栏中查看该软件包的最新版本:

enter image description here

要列出所有可用版本,请运行npm view

1

返回

npm view react-native-code-push versions