赛派号

东北冬季用什么型号机油合适 npm

npm-updateUpdate packages

Select CLI Version:

See DetailsTable of contentsSynopsis npm update [...] aliases: up, upgrade, udpate Description

This command will update all the packages listed to the latest version (specified by the tag config), respecting the semver constraints of both your package and its dependencies (if they also require the same package).

It will also install missing packages.

If the -g flag is specified, this command will update globally installed packages.

If no package name is specified, all packages in the specified location (global or local) will be updated.

Note that by default npm update will not update the semver values of direct dependencies in your project package.json, if you want to also update values in package.json you can run: npm update --se (or add the se=true option to a configuration file to make that the default behior).

Example

For the examples below, assume that the current package is app and it depends on dependencies, dep1 (dep2, .. etc.). The published versions of dep1 are:

{ "dist-tags": { "latest": "1.2.2" }, "versions": [ "1.2.2", "1.2.1", "1.2.0", "1.1.2", "1.1.1", "1.0.0", "0.4.1", "0.4.0", "0.2.0" ]} Caret Dependencies

If app's package.json contains:

"dependencies": { "dep1": "^1.1.1"}

Then npm update will install dep1@1.2.2, because 1.2.2 is latest and 1.2.2 satisfies ^1.1.1.

Tilde Dependencies

However, if app's package.json contains:

"dependencies": { "dep1": "~1.1.1"}

In this case, running npm update will install dep1@1.1.2. Even though the latest tag points to 1.2.2, this version do not satisfy ~1.1.1, which is equivalent to >=1.1.1 = 0.4.0

版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌抄袭侵权/违法违规的内容, 请发送邮件至lsinopec@gmail.com举报,一经查实,本站将立刻删除。

上一篇 没有了

下一篇没有了