Just Say No to Plugin Fuzzy Versioning!

On PhoneGap Build’s Plugins documentation page, it mentions fuzzy versioning: picking the latest version of a plugin when building an app. It’s enabled using the tilde operator:

<plugin name="com.phonegap.plugins.example" spec="~2.2" />

I strongly recommend against this type of versioning. Yes, this ensures that you always have the latest major version included in your app, but it’s a matter of control - once you’ve incorporated a plugin into your app, you’ve tested it and you know it works. I’m confident in version 2.2.1 here…

<plugin name="com.phonegap.plugins.example" spec="2.2.1" />

…because every time I build my app, the exact same plugin codebase is used. If you enable fuzzy versioning, it’s easy to miss when the plugin is updated, resulting in headaches when building a new version of the app and encounter hard to debug issues.

Just say no!

Learn how to create mobile apps with JavaScript. Get occasional PhoneGap/Cordova and Ionic tips, tutorials, and more:

comments powered by Disqus