Updating Cordova plugins

Well, mine was an older Cordova project, and I was under the impression that every time I update the Cordova installation, or the platform (ios/android) the plugins too upgrade. Well my fault! It seems we have to manually delete and re-install each plugin (Yes! there is no update command for plugins yet!)

So the plugins looked like initially :

cordova plugin ls

com.msopentech.websql 0.0.9 "Web SQL plugin"
cordova-plugin-inappbrowser 1.2.0 "InAppBrowser"
cordova-plugin-whitelist 1.1.0 "Whitelist"
org.apache.cordova.console 0.2.13 "Console"
org.apache.cordova.device 0.3.0 "Device"
org.apache.cordova.dialogs 0.3.0 "Notification"
org.apache.cordova.file 1.3.3 "File"
org.apache.cordova.file-transfer 0.5.0 "File Transfer"
org.apache.cordova.network-information 0.2.15 "Network Information"

For updating Cordova plugins, there is no update command. I know, we did not see that coming!

So to update a single plugin, you need to execute 2 commands:

cordova plugin rm <plugin-package-name/>
cordova plugin add <plugin-package-name>

So for eg you can :

cordova plugin rm org.apache.cordova.file
cordova plugin add cordova-plugin-file

Yes the package names change sometimes, and you can get the details of the latest package names from the official documentation.

So after the changes the plugins were updated to :

com.msopentech.websql 0.0.9 "Web SQL plugin"
cordova-plugin-inappbrowser 1.2.0 "InAppBrowser"
cordova-plugin-whitelist 1.1.0 "Whitelist"
org.apache.cordova.console 0.2.13 "Console"
org.apache.cordova.device 0.3.0 "Device"
org.apache.cordova.dialogs 0.3.0 "Notification"
org.apache.cordova.file 1.3.3 "File"
org.apache.cordova.file-transfer 0.5.0 "File Transfer"
org.apache.cordova.network-information 0.2.15 "Network Information"

Yes, quite some updates, sorting all the errors and warnings!

I also saw information about some scripts, if the package names are same, I believe they can be useful. Please check Stackoverflow for more details.

Cheers!