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

Triage: Confusion between action and executable command handlers #938

Closed
shadowspawn opened this issue Mar 27, 2019 · 6 comments
Closed

Comments

@shadowspawn
Copy link
Collaborator

shadowspawn commented Mar 27, 2019

There is a silent change in behaviour based on whether a description parameter is added to the .command definition. This is a common cause of confusion. Opened this issue to collect the related issues found during triage.

Issues:

Pull Requests:

@shadowspawn shadowspawn changed the title Confusion between action and executable command handlers Triage: Confusion between action and executable command handlers Mar 30, 2019
@shadowspawn shadowspawn reopened this Jun 16, 2019
@shadowspawn
Copy link
Collaborator Author

Couple of documentation areas for improving status quo:

  • be more explicit with parameter names that appear in IDE autocompletion (JSDoc, TypeScript)
  • rewrite command section of README and cover different styles explicitly

@shadowspawn
Copy link
Collaborator Author

First steps are looking to resolve #706, and improving documentation (README, JSDoc, TypeScript).

@shadowspawn
Copy link
Collaborator Author

Pull request including JSDoc and TypeScript improvements underway: #990

shadowspawn added a commit to shadowspawn/commander.js that referenced this issue Jul 7, 2019
shadowspawn added a commit that referenced this issue Jul 10, 2019
* TSDoc: defined .command as an overload, with reworked documentstion
* Add TSDoc remarks about command description
    * description is the key difference between the overloads, so be explicit about how it is suppliied.
* Rework .command JSDoc to clarify two styles
* Minor changes in comments
* Rework (sub)command coverage in README
* Update CHANGELOG with #938
* Minor improvements to command and argument coverage
* Fix indentation in code blocks in README
@shadowspawn
Copy link
Collaborator Author

This issue will be resolved when v3.0.0 is released. Available now as a prerelease. See #1001

Reworked the README and JSDoc and TypeScript to hopefully make the two modes of operation clearer. Have not changed the runtime, but will close this issue and see how the changes help.

@shadowspawn
Copy link
Collaborator Author

Reworked the README and JSDoc and TypeScript to hopefully make the two modes of operation clearer. Have not changed the runtime, but will close this issue and see how the changes help.

Shipped in v3: https://github.com/tj/commander.js/releases/tag/v3.0.0

@shadowspawn
Copy link
Collaborator Author

Further reports: #1154 #1644

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant