1

I'm new to grunt and making updates to an existing project. Several dependencies are listed in the dependencies object in package.json but the version number is specified in different ways for different dependencies. For example:

  • "@angular/common": "~2.1.0"
  • "bootstrap": "^3.3.7"
  • "rxjs": "5.0.0-rc.4"

What is the significance of '~', '^' and no prefix in front of the package version? Are there any other prefix options that aren't listed above?

details1
  • 335
  • 1
  • 2
  • 8

1 Answers1

2

Tilde Ranges Matches the most recent minor version Ex: ~2.1.0 means >=2.1.0 <2.(1+1).0

Caret Ranges Matches the most recent major version Ex: ^3.3.7 := >=3.3.7 <4.0.0

Specific latest version "5.0.0-rc.4" The latest stable version of the package.

This link will explain you about your question. Check this

Roath So
  • 141
  • 6
  • 1
    Providing a link for a detailed description on a foreign site is ok, but you also have to include all relevant informations directly in your answer. – t.niese Feb 22 '17 at 17:21