13

I just updated my dependencies and it automatically put the "^" symbol in front. What does 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

Yezhong
  • 3
  • 1
  • 4
Anders
  • 9,988
  • 7
  • 30
  • 36
  • Possible duplicate of [What's the difference between tilde(~) and caret(^) in package.json?](https://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json) – MultiplyByZer0 Jul 04 '17 at 06:16

1 Answers1

14

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.

Sean Fujiwara
  • 4,506
  • 22
  • 34