package.json文件特殊符号含义

package.json文件里的^和~表示什么意思呢 

In the simplest terms, the tilde matches the most recent minor version (the middle number). ~1.2.3 will match all 1.2.x versions but will miss 1.3.0.

The caret, on the other hand, is more relaxed. It will update you to the most recent major version (the first number). ^1.2.3 will match any 1.x.x release including 1.3.0, but will hold off on 2.0.0.

 

参考:http://stackoverflow.com/questions/22343224/whats-the-difference-between-tilde-and-caret-in-package-json

posted @ 2017-05-04 19:12  lmh2072005  阅读(850)  评论(0编辑  收藏  举报