dpa99c / cordova-check-plugins

A CLI tool to check for / manage plugin updates in Cordova/Phonegap projects.
217 stars 25 forks source link

update completes, but nothing updated #15

Closed fmp777 closed 7 years ago

fmp777 commented 7 years ago

cordova-check-plugins --update=interactive

I did this, updated everything I wanted, cordova-check-plugins doesn't show anything that needs updated, however, the config.xml and the plugins directory still has all the old plugins.

Any idea?

dpa99c commented 7 years ago

If your config.xml specifies exact plugin versions (e.g. cordova-plugin-foo@x.y.z), you'll need to use the --unconstrain-versions flag.

If that's not the issue, please post:

fmp777 commented 7 years ago

I'm new to cordova, so completely aware that its likely operator error. However, what I had to do was completely delete the platforms then manually delete and add all the plugins again, then rebuild after adding the platforms again. Lost some customization work, but prior to deleting the platforms, even a manual rm/add of a plugin did NOT update the platform packages! I have no idea why.

So any debug data now would be pointless, as I have it all now fixed, just was insanely manual and tedious.

What I do know from before though was that after running your update script, it really seemed like everything was updated, but after looking at the plugins themselves (the package description files), they were all still the old versions, no files actually changed except the /config.xml, confirmed by git status

dpa99c commented 7 years ago

What I do know from before though was that after running your update script, it really seemed like everything was updated, but after looking at the plugins themselves (the package description files), they were all still the old versions, no files actually changed except the /config.xml, confirmed by git status

This tool, under the hood, relies on cordova itself to remove and re-add the plugins in order to update them, so if the cordova CLI was not able to do this, one potential explanation is a permissions issue, which would explain why deleting everything and adding it again resolved the issue.

Without any verbose output, there's not much more I can do to reproduce it, so will close this for now, but feel free to re-open this/open a new issue if you encounter a similar problem.

FYI I'm in the process of writing regression tests for this tool which should hopefully help in tracking down any bugs.

phstc commented 7 years ago

If your config.xml specifies exact plugin versions (e.g. cordova-plugin-foo@x.y.z), you'll need to use the --unconstrain-versions flag.

@dpa99c ☝️ that did the trick for me, thanks! 🍻

I thought it wasn't working, but actually all my plugins were with a version specified. I'm wondering it would make sense to show a message explained that, the current output shows "Up-to-date plugins", but actually they are not. Or maybe having --unconstrain-versions enabled by default. WDYT?

cordova-check-plugins --update=auto --force=true

**********************
* Up-to-date plugins *
**********************

plugin: cordova-plugin-file
source: npm://cordova-plugin-file
installed version: 4.3.2
remote version: 4.3.2

plugin: cordova-plugin-compat
source: npm://cordova-plugin-compat
installed version: 1.1.0
remote version: 1.1.0

# ...