Bower dependency tilde in Node

andygoestohollywood picture andygoestohollywood · Oct 23, 2013 · Viewed 16.1k times · Source

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"
    }
{

Answer

Maxim Krizhanovsky picture Maxim Krizhanovsky · Oct 23, 2013

~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