package.json中的tilde(〜)和caret(^)有什么区别?

时光怂恿深爱的人放手 提交于 2020-08-06 04:28:05

问题:

After I upgraded to latest stable node and npm , I tried npm install moment --save . 升级到最新的稳定nodenpm ,我尝试了npm install moment --save It saves the entry in the package.json with the caret ^ prefix. 它将条目以尖号^保存在package.json Previously, it was a tilde ~ prefix. 以前,它是一个波浪号~前缀。

  1. Why are these changes made in npm ? 为什么在npm进行这些更改?
  2. What is the difference between tilde ~ and caret ^ ? 是什么波浪之间的区别~和尖^
  3. What is the advantages over others? 与其他相比有什么优势?

解决方案:

参考一: https://stackoom.com/question/1VkUa/package-json中的tilde-和caret-有什么区别
参考二: https://oldbug.net/q/1VkUa/What-s-the-difference-between-tilde-and-caret-in-package-json
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!