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: Namespace pollution #933

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

Triage: Namespace pollution #933

shadowspawn opened this issue Mar 18, 2019 · 6 comments

Comments

@shadowspawn
Copy link
Collaborator

shadowspawn commented Mar 18, 2019

The current code uses the same namespace for user specified options, user specified arguments, and command.Command internals. Opened this issue to collect the related issues found during triage.

Issues:

Pull Requests:

Fixing this will be a major breaking change. To manage the disruption perhaps we can make a new approach opt-in (non-breaking), then make the new behaviour default (breaking), before finally deprecating the old behaviour.

@shadowspawn shadowspawn changed the title Namespace pollution Duplicates: namespace pollution Mar 27, 2019
@shadowspawn shadowspawn changed the title Duplicates: namespace pollution Namespace pollution Mar 27, 2019
@shadowspawn shadowspawn changed the title Namespace pollution Triage: Namespace pollution Mar 30, 2019
Repository owner deleted a comment from roman-vanesyan Apr 7, 2019
@shadowspawn

This comment has been minimized.

@shadowspawn

This comment has been minimized.

@shadowspawn

This comment has been minimized.

@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Nov 23, 2019

I have opened a Pull Request which allows storing option values separately rather than as command properties (access using .opts()), and allows passing the options (rather than the command) to the action handler.

See #1102

@shadowspawn shadowspawn self-assigned this Jan 4, 2020
@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Jan 6, 2020

Added .storeOptionsAsProperties() and .passCommandToAction() in Commander 4.1.

See: https://github.com/tj/commander.js#avoiding-option-name-clashes

@shadowspawn
Copy link
Collaborator Author

shadowspawn commented Apr 21, 2020

Adding new issues for reference, encouragement for changing the default behaviour:

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