Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Deprecate 'cordova plugin search' command #671

Merged
merged 1 commit into from
Aug 30, 2018

Conversation

erisu
Copy link
Member

@erisu erisu commented Aug 30, 2018

Platforms affected

none

What does this PR do?

  • Remove cordova plugin search command
  • Remove any reference of search command messaging
  • Remove search command tests

What testing has been done on this change?

  • npm test

- Remove cordova plugin search command
- Remove search command message
- Remove search command tests
@codecov-io
Copy link

codecov-io commented Aug 30, 2018

Codecov Report

Merging #671 into master will decrease coverage by 0.09%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master     #671     +/-   ##
=========================================
- Coverage   80.68%   80.58%   -0.1%     
=========================================
  Files          52       51      -1     
  Lines        2930     2916     -14     
=========================================
- Hits         2364     2350     -14     
  Misses        566      566
Impacted Files Coverage Δ
src/cordova/plugin/index.js 94.44% <ø> (-0.3%) ⬇️
src/cordova/plugin/add.js 98.28% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update ea181ad...e0d1bf3. Read the comment docs.

@erisu erisu moved this from Pending Review to Pending Release in Apache Cordova: Next Release Planning and Tracking Aug 30, 2018
@erisu erisu moved this from Pending Release to Pending Review in Apache Cordova: Next Release Planning and Tracking Aug 30, 2018
@erisu erisu self-assigned this Aug 30, 2018
Apache Cordova: Next Release Planning and Tracking automation moved this from Pending Review to Pending Release Aug 30, 2018
Copy link
Contributor

@raphinesse raphinesse left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think the title of this PR is misleading. This does not deprecate cordova plugin search, it removes it.

Deprecating a feature would keep it as is, but add warning messages or documentation about its impending removal. At least that's my understanding of the terminology. Please do correct me if I'm wrong!

That being said, I don't see any use for this feature. And since it's strictly a convenience feature, I think it is OK to remove it without prior deprecation.

However, the squashed commit message should read

Remove 'cordova plugin search' command

@@ -47,7 +47,7 @@ module.exports.listUnmetRequirements = listUnmetRequirements;

function add (projectRoot, hooksRunner, opts) {
if (!opts.plugins || !opts.plugins.length) {
return Q.reject(new CordovaError('No plugin specified. Please specify a plugin to add. See `' + cordova_util.binname + ' plugin search`.'));
return Q.reject(new CordovaError('No plugin specified. Please specify a plugin to add.'));
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to link to https://cordova.apache.org/plugins/ instead?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@raphinesse I am OK with a link, but truthfully though CLI, I know that if condition is actually never reached. I was debating on deleting it but would rather have a refactor cleanup PR.

Though CLI, if a plugin is not provided, THIS is the actual if condition that is caught and throws a different reject message.

if (!targets || !targets.length) {

We could update this condition instead, except it is also a generic message for both add and rm. It also does not support remove. Just more things being uncovered as I been looking at this originally.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, I see. Given these options, I think I'll got with the refactor cleanup PR 😄

My plan was to do a complete refactor of the CLI using yargs or something like that. Had no time to tackle that yet, though.

@erisu
Copy link
Member Author

erisu commented Aug 30, 2018

@raphinesse Yes, to deprecate or deprecated does means it would still exist, still work with the current version, possibly replaced with something newer and more preferred, and will be removed in the future.

I might have gone a bit too far and just happened to have removed it when I noticed it only opens the URL and with the plugin append to the query string if passed. Kinda feels like an anti-cli pattern where it navigates a user away from CLI. npm search on the other hand displays results within CLI.

Anyways, If you and others do prefer to deprecate and display a warning message that it will be removed in a future release, I can revert all the changes and add a single warning emit.

That would mean we can also close out apache/cordova-cli#306 as won't merge.

No problems either way.

@raphinesse
Copy link
Contributor

@erisu I just wanted to be sure we're all on the same page regarding terminology.

As I said before, since this is purely a convenience feature and I see no use in it either, I'm fine with removing this. And @dpogue seems to approve the removal as well.

Last time I tried to use the CLI search of npm, I ended up reading an issue where they said that it's been kind of broken forever 😁

@raphinesse raphinesse merged commit d93cfa7 into apache:master Aug 30, 2018
Apache Cordova: Next Release Planning and Tracking automation moved this from Pending Release to Done Aug 30, 2018
@erisu erisu deleted the deprecate-plugin-search branch April 4, 2019 06:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants