According the NPM and semver docs,
-
~version - "Approximately equivalent to version", see semver.
It does not increment the minor version
For example,
Pattern Range Outcome ~1.2.3 >=1.2.3 <1.(2+1).0 >=1.2.3 <1.3.0-0 ~1.2 >=1.2.0 <1.(2+1).0 >=1.2.0 <1.3.0 (Same as 1.2.x) -
^version - “Compatible with version”, see semver.
Allows for 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
Pattern Range ^1.2.x >=1.2.0 <2.0.0 ^0.0.x >=0.0.0 <0.1.0 ^0.0 >=0.0.0 <0.1.0 ^1.2.3 >=1.2.3 <2.0.0-0 ^0.2.3 >=0.2.3 <0.3.0-0 ^0.0.3 >=0.0.3 <0.0.4-0