52

In bower (a node dependency package manager), on some dependencies the version is preceded by a tilde. What does this mean?

{
    "name": "mean",
    "version": "1.0.0",
    "dependencies": {
        "bootstrap": "3.0.0",
        "angular": "~1.0.6"
    }
{
Isaac Gregson
  • 1,999
  • 1
  • 21
  • 31
andygoestohollywood
  • 1,285
  • 1
  • 10
  • 14

1 Answers1

54

~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.

From the documentation of the underlying semver

Maxim Krizhanovsky
  • 26,265
  • 5
  • 59
  • 89