📌  相关文章
📜  package.json 文件中的波浪号 (~) 和插入符号 (^) 是什么 - Javascript 代码示例

📅  最后修改于: 2022-03-11 15:04:08.583000             🧑  作者: Mango

代码示例1
Major, minor and patch represent the different releases of a package.

npm uses the tilde (~) and caret (^) to designate which patch and minor versions to use respectively.

So if you see ~1.0.2 it means to install version 1.0.2 or the latest patch version such as 1.0.4. If you see ^1.0.2 it means to install version 1.0.2 or the latest minor or patch version such as 1.1.0.