Search code examples
phonegap-pluginsphonegap-build

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


For example, I'm using <plugin name="phonegap-plugin-push" spec="^2.0.0" source="npm"> in my config.xml to add the push plugin and then build my application with PhoneGap Build.

What does the ^ mean?

I found that ~ means "greater or equal to" but can't find for the ^

Thanks in advance for any clarification !


Solution

  • 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.

    Source : Click