javascript Node 中的 Bower 依赖项
声明:本页面是StackOverFlow热门问题的中英对照翻译,遵循CC BY-SA 4.0协议,如果您需要使用它,必须同样遵循CC BY-SA许可,注明原文地址和作者信息,同时你必须将它归于原作者(不是我):StackOverFlow
原文地址: http://stackoverflow.com/questions/19541494/
Warning: these are provided under cc-by-sa 4.0 license. You are free to use/share it, But you must attribute it to the original authors (not me):
StackOverFlow
Bower dependency tilde in Node
提问by andygoestohollywood
In bower (a node dependency package manager), on some dependencies the version is preceded by a tilde. What does this mean?
在 bower(一个节点依赖包管理器)中,在某些依赖项上,版本前面有波浪号。这是什么意思?
{
"name": "mean",
"version": "1.0.0",
"dependencies": {
"bootstrap": "3.0.0",
"angular": "~1.0.6"
}
{
回答by Maxim Krizhanovsky
~1.2.3 := >=1.2.3-0 <1.3.0-0 "Reasonably close to 1.2.3". When using tilde operators, prerelease versions are supported as well, but a prerelease of the next significant digit will NOT be satisfactory, so 1.3.0-beta will not satisfy ~1.2.3.
~1.2.3 := >=1.2.3-0 <1.3.0-0 “相当接近 1.2.3”。使用波浪号运算符时,也支持预发布版本,但下一个有效数字的预发布版本并不令人满意,因此 1.3.0-beta 将不满足 ~1.2.3。
From the documentation of the underlying semver
来自底层semver的文档