-
-
Notifications
You must be signed in to change notification settings - Fork 1.7k
Closed
Description
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:
- Cannot name options/subcommands after commander public methods or JavaScript built-ins #19 Cannot name options/subcommands after commander public methods or JavaScript built-ins
- '--domain' option may cause problem #105 '--domain' option may cause problem
- Option values should not be added to the command instance. #183 Option values should not be added to the command instance.
- "name" option is broken as of 2.4.0 #284 "name" option is broken as of 2.4.0
- Bug and Design Flaw: Option "--opts" clashes with Command#opts function #334 Bug and Design Flaw: Option "--opts" clashes with Command#opts function
- Breaks when using "domain" as an option #370 Breaks when using "domain" as an option
- Command name "inspect" causes weird behaviour #377 Command name "inspect" causes weird behaviour
- argument 'once' (and probably others) cause naming collision #404 argument 'once' (and probably others) cause naming collision
- It causes unexpected result if arguments are the same as option name #483 It causes unexpected result if arguments are the same as option name
- Move parsed options into a data object #514 Move parsed options into a data object
- Using .name and .description has unexpected results. #516 Using .name and .description has unexpected results.
- program.opts() can be overridden by an option #584 program.opts() can be overridden by an option
- Error when option --alias is defined #592 Error when option --alias is defined
- Error when argument has same name as a flag #629 Error when argument has same name as a flag
- Options object is not strictly the user input #644 Options object is not strictly the user input
- Init value of option '--name' is a [Function] #648 Init value of option '--name' is a [Function]
Pull Requests:
- Data overload #515 Data overload
- Fix options key name conflict with commander object's' key #673 Fix options key name conflict with commander object's' key
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.
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels