We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hi,
for the record, here is a patch for commander 8:
--- a/bin/wb +++ b/bin/wb @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const pkg = require('../package.json') const fs = require('fs') const path = require('path') --- a/bin/wb-add-alias +++ b/bin/wb-add-alias @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = require('../lib/term_command_args_parser')('alias') program.customArgsParser = polymorphicCommandArgsParser(inlineArgsParser) --- a/bin/wb-add-claim +++ b/bin/wb-add-claim @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = ([ id, property, value ]) => { const data = { id, property, value } --- a/bin/wb-add-qualifier +++ b/bin/wb-add-qualifier @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = ([ guid, property, value ]) => { --- a/bin/wb-add-reference +++ b/bin/wb-add-reference @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = ([ guid, property, value ]) => { --- a/bin/wb-create-entity +++ b/bin/wb-create-entity @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) program.customArgsParser = require('../lib/object_arg_parser') program.customHelpOption = require('../lib/command_with_template_custom_help') require('../lib/edit/edit_command')('entity', 'create') --- a/bin/wb-delete-entity +++ b/bin/wb-delete-entity @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = args => [ { id: args[0] } ] program.customArgsParser = polymorphicCommandArgsParser(inlineArgsParser) --- a/bin/wb-edit-entity +++ b/bin/wb-edit-entity @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) program.customArgsParser = require('../lib/object_arg_parser') program.customHelpOption = require('../lib/command_with_template_custom_help') require('../lib/edit/edit_command')('entity', 'edit') --- a/bin/wb-merge-entity +++ b/bin/wb-merge-entity @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = args => [ { from: args[0], to: args[1] } ] program.customArgsParser = polymorphicCommandArgsParser(inlineArgsParser) --- a/bin/wb-move-claim +++ b/bin/wb-move-claim @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const { isPropertyClaimsId } = require('wikibase-sdk') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') --- a/bin/wb-move-qualifier +++ b/bin/wb-move-qualifier @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const { isHash } = require('wikibase-sdk') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') --- a/bin/wb-remove-alias +++ b/bin/wb-remove-alias @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = require('../lib/term_command_args_parser')('alias') program.customArgsParser = polymorphicCommandArgsParser(inlineArgsParser) --- a/bin/wb-remove-claim +++ b/bin/wb-remove-claim @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = guids => [ { guid: guids.map(parseGuid) } ] --- a/bin/wb-remove-qualifier +++ b/bin/wb-remove-qualifier @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = ([ guid, hash ]) => { --- a/bin/wb-remove-reference +++ b/bin/wb-remove-reference @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = ([ guid, hash ]) => { --- a/bin/wb-set-alias +++ b/bin/wb-set-alias @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = require('../lib/term_command_args_parser')('alias') program.customArgsParser = polymorphicCommandArgsParser(inlineArgsParser) --- a/bin/wb-set-description +++ b/bin/wb-set-description @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = require('../lib/term_command_args_parser')('description') program.customArgsParser = polymorphicCommandArgsParser(inlineArgsParser) --- a/bin/wb-set-label +++ b/bin/wb-set-label @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = require('../lib/term_command_args_parser')('label') program.customArgsParser = polymorphicCommandArgsParser(inlineArgsParser) --- a/bin/wb-update-claim +++ b/bin/wb-update-claim @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const { parseGuid } = require('../lib/parse_command_utils') const { isGuid } = require('wikibase-sdk') --- a/bin/wb-update-qualifier +++ b/bin/wb-update-qualifier @@ -1,5 +1,5 @@ #!/usr/bin/env node -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { parseGuid } = require('../lib/parse_command_utils') const polymorphicCommandArgsParser = require('../lib/polymorphic_command_args_parser') const inlineArgsParser = ([ guid, property, oldValue, newValue ]) => { --- a/lib/command_with_template_custom_help.js +++ b/lib/command_with_template_custom_help.js @@ -1,4 +1,4 @@ -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const path = require('path') const logCommandExamples = require('./log_command_examples') const { validateTemplateCommand } = require('./utils') --- a/lib/polymorphic_command_args_parser.js +++ b/lib/polymorphic_command_args_parser.js @@ -1,5 +1,5 @@ const objectArgParser = require('./object_arg_parser') -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const { isFilePathSync, isJsonString } = require('../lib/utils') const inlineOptions = [ --- a/lib/program.js +++ b/lib/program.js @@ -1,6 +1,6 @@ // Extends commander with options and functions used by all subcommands. -const program = require('commander') +const program = require('commander').storeOptionsAsProperties(true) const applyEnvAndConfigDefault = require('./apply_env_and_config_default') const logCommandExamples = require('./log_command_examples') const globalOptionsHelp = require('./global_options_help')
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hi,
for the record, here is a patch for commander 8:
The text was updated successfully, but these errors were encountered: