javascript - What's the difference between tilde(~) and caret(^) in package.json? -


after upgraded latest stable node , npm, tried npm install moment --save. saves entry in package.json caret(^) prefix. previously, tilde(~) prefix.

  1. why these changes made in npm?
  2. what difference between tilde(~) , caret(^)?
  3. what advantages on others?

in simplest terms, tilde matches recent minor version (the middle number). ~1.2.3 match 1.2.x versions miss 1.3.0.

the caret, on other hand, more relaxed. update recent major version (the first number). ^1.2.3 match 1.x.x release including 1.3.0, hold off on 2.0.0.

http://fredkschott.com/post/2014/02/npm-no-longer-defaults-to-tildes/


Comments

Popular posts from this blog

get url and add instance to a model with prefilled foreign key :django admin -

android - Keyboard hides my half of edit-text and button below it even in scroll view -

css - Make div keyboard-scrollable in jQuery Mobile? -