Skip to main content

You are not logged in. Your edit will be placed in a queue until it is peer reviewed.

We welcome edits that make the post easier to understand and more valuable for readers. Because community members review edits, please try to make the post substantially better than how you found it, for example, by fixing grammar or adding additional resources and hyperlinks.

Required fields*

4
  • 14
    not true: Caret Ranges ^1.2.3 ^0.2.5 ^0.0.4. Allows changes that do not modify the left-most non-zero digit in the [major, minor, patch] tuple. In other words, this allows patch and minor updates for versions 1.0.0 and above, patch updates for versions 0.X >=0.1.0, and no updates for versions 0.0.X. docs.npmjs.com/misc/semver#caret-ranges-1-2-3-0-2-5-0-0-4 Commented Oct 11, 2015 at 16:08
  • 6
    This answer is completely wrong (as are many other here). None of these ever fix a major number! As @rofrol said, ^ simply keeps the left most non-zero digit unchanged. ~ on the other hand allows only patch updates if the minor version is specified (e.g. ~1.2.3 or ~1.2) and allows minor updates if the minor version is not specified (e.g. ~1). Commented Jul 14, 2017 at 14:22
  • 3
    @TheBaj They mean "fix" as "define" ("fixate") rather than "adjust", so you all agree on how the major number gets handled. Commented Jul 10, 2018 at 21:41
  • 1
    Yes, this answer seemed totally backwards until I realized the answerer meant "fix" as in "to make fixed, stationary, or unchanging." Commented Nov 5, 2019 at 5:57