Posted By: Anonymous
After I upgraded to the latest stable
npm, I tried
npm install moment --save. It saves the entry in the
package.json with the caret
^ prefix. Previously, it was a tilde
- Why are these changes made in
- What is the difference between tilde
- What are the advantages over others?
~version“Approximately equivalent to version”, will update you to all future patch versions, without incrementing the minor version.
~1.2.3will use releases from 1.2.3 to <1.3.0.
^version“Compatible with version”, will update you to all future minor/patch versions, without incrementing the major version.
^2.3.4will use releases from 2.3.4 to <3.0.0.
See Comments below for exceptions, in particular for pre-one versions, such as ^0.2.3