What does "^" mean in node.js dependency list?

I just updated my dependencies and it automatically put the "^" symbol in. What dose it mean? There is nothing in the documentation about it.

Example

"bower": "^1.2.8",

I could also find it in some of the npm commits https://github.com/npm/npm/commit/ce662561ca0a7b154a7e6058a6a2428b49bd7266 https://www.npmjs.org/doc/json.html


It's part of the syntax for semver.

From https://www.npmjs.org/doc/misc/semver.html

^1.2.3 := >=1.2.3-0 <2.0.0-0 "Compatible with 1.2.3". When using caret operators, anything from the specified version (including prerelease) will be supported up to, but not including, the next major version (or its prereleases).

In your case, it means the project has a dependency on bower 1.2.8, but should continue to work until bower 2.0.0.

链接地址: http://www.djcxy.com/p/27660.html

上一篇: npm ERR! 无法读取未定义的属性'暂停'

下一篇: node.js依赖列表中的“^”是什么意思?