阅读背景:

package.json version中 ‘~‘ 和 ‘^‘ 的区别,

来源:互联网 
~version "Approximately equivalent to version" See npm semver - Tilde Ranges & semver (7). will update you to all future patch versions, without incrementing the minor version. ~1.2.3 will use releases from 1.2.3 to <1.3.0. ^version "Compatible with version" See npm semver - Caret Ranges & semver (7). will update you to all future minor/patch versions, without incrementing the major version. ^2.3.4 will use releases from 2.3.4 to <3.0.0. version Must match version exactly >version Must be greater than version >=version etc <version <=version 1.2.x 1.2.0, 1.2.1, etc., but not 1.3.0 https://sometarballurl (this may be the URL of a tarball which will be downloaded and installed locally * Matches any version latest Obtains latest release ~version "Approximately equivalent to version" Se



你的当前访问异常,请进行认证后继续阅读剩余内容。

分享到: