PhoneGap 插件中的 spec 属性的 ^ 是什么意思?

What does the ^ mean for spec attribute in PhoneGap plugin?

例如,我在 config.xml 中使用 <plugin name="phonegap-plugin-push" spec="^2.0.0" source="npm"> 添加推送插件,然后使用 PhoneGap Build 构建我的应用程序。

^ 是什么意思?

found ~ 表示 "greater or equal to" 但找不到 ^

提前感谢您的澄清!

用最简单的术语来说,波浪号匹配最新的次要版本(中间的数字)。 ~1.2.3 将匹配所有 1.2.x 版本,但会错过 1.3.0.

另一方面,插入符号更宽松。它会将您更新到最新的主要版本(第一个数字)。 ^1.2.3 将匹配任何 1.x.x 版本,包括 1.3.0,但将推迟到 2.0.0。

来源:Click