New mark ^ in package.json file

萝らか妹 提交于 2019-12-11 05:52:08

问题


After last npm update, i found that some package versions started with ^. I can't found any information about it, because of filtering suck signs by search engines. So, it looks like:

"grunt-autoprefixer": "^0.4.2",
"grunt-bower-install": "^0.7.0",
"grunt-concurrent": "^0.4.3",
"grunt-contrib-clean": "~0.5.0",

Some, are old ~. I will be grateful for any likes or information about that.

I have a suggestion that it indicates witch packages was updated.


回答1:


The caret, [...] 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://fredkschott.com/post/2014/02/npm-no-longer-defaults-to-tildes/



来源:https://stackoverflow.com/questions/22931310/new-mark-in-package-json-file

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!