dpa99c / cordova-check-plugins

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

cordova-check-plugins doesn't detect all changes #31

Closed pom421 closed 5 years ago

pom421 commented 5 years ago

Hello Dave,

I don't understand how cordova-check-plugins watches the new versions plugins because on my project, when i run cordova-check-plugins, I see :

**********************
* Up-to-date plugins *
**********************
plugin: cordova.plugins.diagnostic
source: npm://cordova.plugins.diagnostic@3.9.2
installed version: 3.9.2
remote version: 3.9.2

plugin: phonegap-plugin-barcodescanner
source: npm://phonegap-plugin-barcodescanner@7.0.2
installed version: 7.0.2
remote version: 7.0.2

***************************
* Plugin update available *
***************************

plugin: cordova-open-native-settings
source: npm://cordova-open-native-settings@1.5.0
installed version: 1.4.1
remote version: 1.5.0

Only cordova-open-native-settings is seen as an old version. But cordova.plugins.diagnostic and phonegap-plugin-barcodescanner have newer versions too.

So what I do wrong ?

I use cordova-check-plugins@4.0.3 and cordovaCLI@8.0.0.

dpa99c commented 5 years ago

cordova-check-plugins by default respects the semantic versioning of the installed plugin.

So, for example, if the plugin cordova-open-native-settings was installed as cordova-open-native-settings@1.4.1 then the version would be pinned at 1.4.1 and an update would not be offered. This is because you may want that specific version and not to allow updates.

However, if you installed it as cordova-open-native-settings@^1.4.1 or cordova-open-native-settings@1, then the version would not be pinned and the update offered.

Most likely cordova.plugins.diagnostic and phonegap-plugin-barcodescanner are version-pinned in your project.

To override this default behaviour and allow updates for all plugins (regardless of the semantic versioning), use the --unconstrain-versions argument.

pom421 commented 5 years ago

Thanks for your answer, Dave! It's crystal clear.