cordova-cli icon indicating copy to clipboard operation
cordova-cli copied to clipboard

New command `cordova outdated`

Open janpio opened this issue 7 years ago • 5 comments

... which is just npm outdated filtered down to only include platforms and plugins that are relevant to Cordova, not other Framework packages or similar.

This enables us to tell people to just run cordova outdated to learn what they have to update to get to a current state of all their libraries.

janpio avatar Aug 27 '18 07:08 janpio

Will this replace cordova platform check?

raphinesse avatar Aug 27 '18 08:08 raphinesse

Possibly, I don't really know what exactly it does and how it works internally.


check = List platforms which can be updated via cordova-cli with the command platform update

I cordova platform update still really a thing?


Is it maybe also broken anyway? cordova platform check returns this for me:

λ cordova platform check
android @ 7.1.1; current did not install, and thus its version cannot be determined
ios @ 4.5.5; current did not install, and thus its version cannot be determined

both platforms are installed as usual and work just fine.


What platform check definitely does not do is cover the CLI itself and plugins, which a filtered resultset from npm outdated could do.

janpio avatar Aug 27 '18 08:08 janpio

Ugh, I just learned that not all projects have their platforms and plugins in package.json which means that npm outdated may not know enough (yet?).

janpio avatar Aug 27 '18 08:08 janpio

Possibly, I don't really know what exactly it does and how it works internally.

It's horrible code and I'm not surprised that it's horribly broken. Incidentally, there's a PR where I tried to cleanup the code a tiny bit: https://github.com/apache/cordova-lib/pull/650. But I would be happy to ditch it altogether. I actually suggested replacing it with something like npm outdated | grep cordova in the major release planning doc. It does a bit more than that, but not particularly well.


Is cordova platform update still really a thing?

Apparently so. In the face to face meeting, @purplecabbage talked about having done some work-in-progress to improve it. I guess it's important for workflows that do not treat the platforms directory as purely generated artifacts :man_shrugging:


Is [cordova platform check] maybe also broken anyway?

I dare you, take a look at the code. It would surprise me if it wasn't broken :grin:


What platform check definitely does not do is cover the CLI itself and plugins, which a filtered result set from npm outdated could do.

I agree. I think it would be good to have that. We should keep it simple, though. No plugin version conflict resolution or trying to install platforms like platform check does.


Ugh, I just learned that not all projects have their platforms and plugins in package.json which means that npm outdated may not know enough (yet?).

Progressive enhancement? Could be an incentive to switch to more modern workflow. We should maybe also be clear about what kind of project setups and workflows we want to continue to support.

raphinesse avatar Aug 27 '18 09:08 raphinesse

Ugh, I just learned that not all projects have their platforms and plugins in package.json which means that npm outdated may not know enough (yet?).

The next version of Cordova will not support having platforms/plugins in config.xml. Everything will need to be in package.json.

dpogue avatar Aug 27 '18 14:08 dpogue