1

I am not sure where to use /\ symbol or ~ symbol in dependencies section with any module version.

Please clarify it.

Olga Akhmetova
  • 490
  • 1
  • 6
  • 19
Vinay Singh
  • 203
  • 3
  • 8
  • 2
    Possible duplicate of [Difference between tilde(~) and caret(^) in package.json](http://stackoverflow.com/questions/22343224/difference-between-tilde-and-caret-in-package-json) – PM 77-1 Oct 12 '15 at 04:13

1 Answers1

1

From the documentation:

~version "Approximately equivalent to version" See semver(7)
^version "Compatible with version" See semver(7)

So, not too helpful, right? The semantic versioning calculator has a much more helpful description:

~ will include everything greater than a particular version in the same minor range

^ will include everything greater than a particular version in the same major range

So…

  • ^2.4.1 would install 2.4.2 and 2.5.0
  • ~2.4.1 would install 2.4.2 but not 2.5.0
Aaron Brager
  • 65,323
  • 19
  • 161
  • 287