Merge pull request #2140 from tj/release/12.x
Before adoption: this commit came in with the history the project adopted, so no landing records it.
authored by John Gee · committed by GitHub · parents b0f789f, 608eaf0 · Browse files · 31 files·+1404 added−857 removed
This commit
State
Before adoption: this commit came in with the history the project adopted, so no landing records it.
Diff stats
31 files+1404 added−857 removed
- tests:+399 added−172 removed
- other:+1005 added−685 removed
Provenance
- Commit
e3192a1- Tree
becdbe9- Author
John Gee <john@ruru.gen.nz>- Committer
GitHub <noreply@github.com>- Parent 1
b0f789f- Parent 2
608eaf0
31 files changed+1404 added−857 removed
modified:.github/workflows/tests.yml+1 added-1 removed
10 unmodified lines1112131415151617181912 unmodified lines10 unmodified lines runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: node-version: [16.x, 18.x, 20.x] node-version: [18.x, 20.x] os: [ubuntu-latest, windows-latest, macos-latest]
steps: - uses: actions/checkout@v412 unmodified linesmodified:docs/deprecated.md+70 added-44 removed
2 unmodified lines3 These features are deprecated, which means they may go away in a future major version of Commander.4 They are currently still available for backwards compatibility, but should not be used in new code.5 6 - [Deprecated](#deprecated)7- - [RegExp .option() parameter](#regexp-option-parameter)8- - [noHelp](#nohelp)9- - [Default import of global Command object](#default-import-of-global-command-object)10- - [Callback to .help() and .outputHelp()](#callback-to-help-and-outputhelp)11- - [.on('--help')](#on--help)12- - [.on('command:\*')](#oncommand)13- - [.command('\*')](#command)14- - [cmd.description(cmdDescription, argDescriptions)](#cmddescriptioncmddescription-argdescriptions)15- - [InvalidOptionArgumentError](#invalidoptionargumenterror)16- - [Short option flag longer than a single character](#short-option-flag-longer-than-a-single-character)17- - [Import from `commander/esm.mjs`](#import-from-commanderesmmjs)18- - [cmd.\_args](#cmd_args)7+ - [RegExp .option() parameter](#regexp-option-parameter)8+ - [noHelp](#nohelp)9+ - [Callback to .help() and .outputHelp()](#callback-to-help-and-outputhelp)10+ - [.on('--help')](#on--help)11+ - [.on('command:\*')](#oncommand)12+ - [.command('\*')](#command)13+ - [cmd.description(cmdDescription, argDescriptions)](#cmddescriptioncmddescription-argdescriptions)14+ - [InvalidOptionArgumentError](#invalidoptionargumenterror)15+ - [Short option flag longer than a single character](#short-option-flag-longer-than-a-single-character)16+ - [Import from `commander/esm.mjs`](#import-from-commanderesmmjs)17+ - [cmd.\_args](#cmd_args)18+ - [.addHelpCommand(string|boolean|undefined)](#addhelpcommandstringbooleanundefined)19+ - [Removed](#removed)20+ - [Default import of global Command object](#default-import-of-global-command-object)21 20-## RegExp .option() parameter22+### RegExp .option() parameter23 24 The `.option()` method allowed a RegExp as the third parameter to restrict what values were accepted.25 26 ```js3 unmodified lines30 Removed from README in Commander v3. Deprecated from Commander v7.31 32 The newer functionality is the Option `.choices()` method, or using a custom option processing function.33 32-## noHelp34+### noHelp35 36 This was an option passed to `.command()` to hide the command from the built-in help:37 38 ```js1 unmodified line40 ```41 42 The option was renamed `hidden` in Commander v5.1. Deprecated from Commander v7.43 42-## Default import of global Command object44+### Callback to .help() and .outputHelp()45 44-The default import was a global Command object.45-46-```js47-const program = require('commander');48-```49-50-The global Command object is exported as `program` from Commander v5, or import the Command object.51-52-```js53-const { program } = require('commander');54-// or55-const { Command } = require('commander');56-const program = new Command()57-```58-59-- Removed from README in Commander v5.60-- Deprecated from Commander v7.61-- Removed from TypeScript declarations in Commander v8.62-63-## Callback to .help() and .outputHelp()64-46 These routines allowed a callback parameter to process the built-in help before display.47 48 ```js49 program.outputHelp((text) => {8 unmodified lines58 ```59 60 Deprecated from Commander v7.61 81-## .on('--help')62+### .on('--help')63 64 This was the way to add custom help after the built-in help. From Commander v3.0.0 this used the custom long help option flags, if changed.65 66 ```js16 unmodified lines83 ```84 85 Deprecated from Commander v7.86 106-## .on('command:*')87+### .on('command:*')88 89 This was emitted when the command argument did not match a known subcommand (as part of the implementation of `.command('*')`).90 91 One use was for adding an error for an unknown subcommand. An error is now the default built-in behaviour.2 unmodified lines94 or for custom behaviour catch the `commander.unknownCommand` error.95 96 Deprecated from Commander v8.3.97 117-## .command('*')98+### .command('*')99 100 This was used to add a default command to the program.101 102 ```js11 unmodified lines114 ```115 116 Removed from README in Commander v5. Deprecated from Commander v8.3.117 137-## cmd.description(cmdDescription, argDescriptions)118+### cmd.description(cmdDescription, argDescriptions)119 120 This was used to add command argument descriptions for the help.121 122 ```js14 unmodified lines137 ```138 139 Deprecated from Commander v8.140 160-## InvalidOptionArgumentError141+### InvalidOptionArgumentError142 143 This was used for throwing an error from custom option processing, for a nice error message.144 145 ```js21 unmodified lines167 ```168 169 Deprecated from Commander v8.170 190-## Short option flag longer than a single character171+### Short option flag longer than a single character172 173 Short option flags like `-ws` were never supported, but the old README did not make this clear. The README now states that short options are a single character.174 175 README updated in Commander v3. Deprecated from Commander v9.176 196-## Import from `commander/esm.mjs`177+### Import from `commander/esm.mjs`178 179 The first support for named imports required an explicit entry file.180 181 ```js7 unmodified lines189 ```190 191 README updated in Commander v9. Deprecated from Commander v9.192 212-## cmd._args193+### cmd._args194 195 This was always private, but was previously the only way to access the command `Argument` array.196 197 ```js6 unmodified lines204 const registeredArguments = program.registeredArguments;205 ```206 207 Deprecated from Commander v11.208+209+### .addHelpCommand(string|boolean|undefined)210+211+This was originally used with a variety of parameters, but not by passing a Command object despite the "add" name.212+213+```js214+program.addHelpCommand('assist [command]');215+program.addHelpCommand('assist', 'show assistance');216+program.addHelpCommand(false);217+218+```219+220+In new code you configure the help command with `.helpCommand()`. Or use `.addHelpCommand()` which now takes a Command object, like `.addCommand()`.221+222+```js223+program.helpCommand('assist [command]');224+program.helpCommand('assist', 'show assistance');225+program.helpCommand(false);226+227+program.addHelpCommand(new Command('assist').argument('[command]').description('show assistance'));228+229+```230+## Removed231+232+### Default import of global Command object233+234+The default import was a global Command object.235+236+```js237+const program = require('commander');238+```239+240+The global Command object is exported as `program` from Commander v5, or import the Command object.241+242+```js243+const { program } = require('commander');244+// or245+const { Command } = require('commander');246+const program = new Command()247+```248+249+- Removed from README in Commander v5.250+- Deprecated from Commander v7.251+- Removed from TypeScript declarations in Commander v8.252+- Removed from CommonJS in Commander v12. Deprecated and gone!modified:lib/argument.js+2 added-2 removed
48 unmodified lines4950515253535455565771 unmodified lines1291301311321331331341351361378 unmodified lines48 unmodified lines return this._name; }
/** * @api private * @package internal use only */
_concatValue(value, previous) { if (previous === this.defaultValue || !Array.isArray(previous)) {71 unmodified lines * Takes an argument and returns its human readable equivalent for help usage. * * @param {Argument} arg * @return {string} * @api private * @private */
function humanReadableArgName(arg) { const nameOutput = arg.name() + (arg.variadic === true ? '...' : '');8 unmodified linesmodified:lib/command.js+272 added-152 removed
5 unmodified lines6 7 const { Argument, humanReadableArgName } = require('./argument.js');8 const { CommanderError } = require('./error.js');9 const { Help } = require('./help.js');10-const { Option, splitOptionFlags, DualOptions } = require('./option.js');10+const { Option, DualOptions } = require('./option.js');11 const { suggestSimilar } = require('./suggestSimilar');12 13 class Command extends EventEmitter {14 /**36 unmodified lines51 this._argsDescription = undefined; // legacy52 this._enablePositionalOptions = false;53 this._passThroughOptions = false;54 this._lifeCycleHooks = {}; // a hash of arrays55- /** @type {boolean | string} */55+ /** @type {(boolean | string)} */56 this._showHelpAfterError = false;57 this._showSuggestionAfterError = true;58 59 // see .configureOutput() for docs5 unmodified lines65 outputError: (str, write) => write(str)66 };67 68 this._hidden = false;69- this._hasHelpOption = true;70- this._helpFlags = '-h, --help';71- this._helpDescription = 'display help for command';72- this._helpShortFlag = '-h';73- this._helpLongFlag = '--help';74- this._addImplicitHelpCommand = undefined; // Deliberately undefined, not decided whether true or false75- this._helpCommandName = 'help';76- this._helpCommandnameAndArgs = 'help [command]';77- this._helpCommandDescription = 'display help for command';69+ /** @type {(Option | null | undefined)} */70+ this._helpOption = undefined; // Lazy created on demand. May be null if help option is disabled.71+ this._addImplicitHelpCommand = undefined; // undecided whether true or false yet, not inherited72+ /** @type {Command} */73+ this._helpCommand = undefined; // lazy initialised, inherited74 this._helpConfiguration = {};75 }76 77 /**5 unmodified lines83 * @return {Command} `this` command for chaining84 */85 copyInheritedSettings(sourceCommand) {86 this._outputConfiguration = sourceCommand._outputConfiguration;91- this._hasHelpOption = sourceCommand._hasHelpOption;92- this._helpFlags = sourceCommand._helpFlags;93- this._helpDescription = sourceCommand._helpDescription;94- this._helpShortFlag = sourceCommand._helpShortFlag;95- this._helpLongFlag = sourceCommand._helpLongFlag;96- this._helpCommandName = sourceCommand._helpCommandName;97- this._helpCommandnameAndArgs = sourceCommand._helpCommandnameAndArgs;98- this._helpCommandDescription = sourceCommand._helpCommandDescription;87+ this._helpOption = sourceCommand._helpOption;88+ this._helpCommand = sourceCommand._helpCommand;89 this._helpConfiguration = sourceCommand._helpConfiguration;90 this._exitCallback = sourceCommand._exitCallback;91 this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties;92 this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue;6 unmodified lines99 }100 101 /**102 * @returns {Command[]}113- * @api private103+ * @private104 */105 106 _getCommandAndAncestors() {107 const result = [];22 unmodified lines130 * .command('start <service>', 'start named service')131 * .command('stop [service]', 'stop named service, or all if no name supplied');132 *133 * @param {string} nameAndArgs - command name and arguments, args are `<required>` or `[optional]` and last may also be `variadic...`144- * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)134+ * @param {(Object|string)} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable)135 * @param {Object} [execOpts] - configuration options (for executable)136 * @return {Command} returns new command for action handler, or `this` for executable command137 */138 15 unmodified lines154 if (opts.isDefault) this._defaultCommandName = cmd._name;155 cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden156 cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor157 if (args) cmd.arguments(args);168- this.commands.push(cmd);158+ this._registerCommand(cmd);159 cmd.parent = this;160 cmd.copyInheritedSettings(this);161 162 if (desc) return this;29 unmodified lines192 * You can customise the help by overriding Help properties using configureHelp(),193 * or with a subclass of Help by overriding createHelp().194 *195 * @param {Object} [configuration] - configuration options206- * @return {Command|Object} `this` command for chaining, or stored configuration196+ * @return {(Command|Object)} `this` command for chaining, or stored configuration197 */198 199 configureHelp(configuration) {200 if (configuration === undefined) return this._helpConfiguration;17 unmodified lines218 * // functions based on what is being written out219 * outputError(str, write) // used for displaying errors, and not used for displaying help220 *221 * @param {Object} [configuration] - configuration options232- * @return {Command|Object} `this` command for chaining, or stored configuration222+ * @return {(Command|Object)} `this` command for chaining, or stored configuration223 */224 225 configureOutput(configuration) {226 if (configuration === undefined) return this._outputConfiguration;4 unmodified lines231 232 /**233 * Display the help or a custom message after an error occurs.234 *245- * @param {boolean|string} [displayHelp]235+ * @param {(boolean|string)} [displayHelp]236 * @return {Command} `this` command for chaining237 */238 showHelpAfterError(displayHelp = true) {239 if (typeof displayHelp !== 'string') displayHelp = !!displayHelp;31 unmodified lines271 opts = opts || {};272 if (opts.isDefault) this._defaultCommandName = cmd._name;273 if (opts.noHelp || opts.hidden) cmd._hidden = true; // modifying passed command due to existing implementation274 285- this.commands.push(cmd);275+ this._registerCommand(cmd);276 cmd.parent = this;277+ cmd._checkForBrokenPassThrough();278+279 return this;280 }281 282 /**22 unmodified lines305 * program.argument('[output-file]');306 *307 * @param {string} name308 * @param {string} [description]317- * @param {Function|*} [fn] - custom argument processing function309+ * @param {(Function|*)} [fn] - custom argument processing function310 * @param {*} [defaultValue]311 * @return {Command} `this` command for chaining312 */313 argument(name, description, fn, defaultValue) {44 unmodified lines358 return this;359 }360 361 /**370- * Override default decision whether to add implicit help command.362+ * Customise or override default help command. By default a help command is automatically added if your command has subcommands.363 *372- * addHelpCommand() // force on373- * addHelpCommand(false); // force off374- * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details364+ * program.helpCommand('help [cmd]');365+ * program.helpCommand('help [cmd]', 'show help');366+ * program.helpCommand(false); // suppress default help command367+ * program.helpCommand(true); // add help command even if no subcommands368 *369+ * @param {string|boolean} enableOrNameAndArgs - enable with custom name and/or arguments, or boolean to override whether added370+ * @param {string} [description] - custom description371 * @return {Command} `this` command for chaining372 */373 379- addHelpCommand(enableOrNameAndArgs, description) {380- if (enableOrNameAndArgs === false) {381- this._addImplicitHelpCommand = false;382- } else {383- this._addImplicitHelpCommand = true;384- if (typeof enableOrNameAndArgs === 'string') {385- this._helpCommandName = enableOrNameAndArgs.split(' ')[0];386- this._helpCommandnameAndArgs = enableOrNameAndArgs;387- }388- this._helpCommandDescription = description || this._helpCommandDescription;374+ helpCommand(enableOrNameAndArgs, description) {375+ if (typeof enableOrNameAndArgs === 'boolean') {376+ this._addImplicitHelpCommand = enableOrNameAndArgs;377+ return this;378 }379+380+ enableOrNameAndArgs = enableOrNameAndArgs ?? 'help [command]';381+ const [, helpName, helpArgs] = enableOrNameAndArgs.match(/([^ ]+) *(.*)/);382+ const helpDescription = description ?? 'display help for command';383+384+ const helpCommand = this.createCommand(helpName);385+ helpCommand.helpOption(false);386+ if (helpArgs) helpCommand.arguments(helpArgs);387+ if (helpDescription) helpCommand.description(helpDescription);388+389+ this._addImplicitHelpCommand = true;390+ this._helpCommand = helpCommand;391+392 return this;393 }394 395 /**394- * @return {boolean}395- * @api private396+ * Add prepared custom help command.397+ *398+ * @param {(Command|string|boolean)} helpCommand - custom help command, or deprecated enableOrNameAndArgs as for `.helpCommand()`399+ * @param {string} [deprecatedDescription] - deprecated custom description used with custom name only400+ * @return {Command} `this` command for chaining401 */402+ addHelpCommand(helpCommand, deprecatedDescription) {403+ // If not passed an object, call through to helpCommand for backwards compatibility,404+ // as addHelpCommand was originally used like helpCommand is now.405+ if (typeof helpCommand !== 'object') {406+ this.helpCommand(helpCommand, deprecatedDescription);407+ return this;408+ }409 398- _hasImplicitHelpCommand() {399- if (this._addImplicitHelpCommand === undefined) {400- return this.commands.length && !this._actionHandler && !this._findCommand('help');410+ this._addImplicitHelpCommand = true;411+ this._helpCommand = helpCommand;412+ return this;413+ }414+415+ /**416+ * Lazy create help command.417+ *418+ * @return {(Command|null)}419+ * @package420+ */421+ _getHelpCommand() {422+ const hasImplicitHelpCommand = this._addImplicitHelpCommand ??423+ (this.commands.length && !this._actionHandler && !this._findCommand('help'));424+425+ if (hasImplicitHelpCommand) {426+ if (this._helpCommand === undefined) {427+ this.helpCommand(undefined, undefined); // use default name and description428+ }429+ return this._helpCommand;430 }402- return this._addImplicitHelpCommand;431+ return null;432 }433 434 /**435 * Add hook for life cycle event.45 unmodified lines481 * @param {number} exitCode exit code for using with process.exit482 * @param {string} code an id string representing the error483 * @param {string} message human-readable description of the error484 * @return never456- * @api private485+ * @private486 */487 488 _exit(exitCode, code, message) {489 if (this._exitCallback) {53 unmodified lines543 544 /**545 * Wrap parseArgs to catch 'commander.invalidArgument'.546 *518- * @param {Option | Argument} target547+ * @param {(Option | Argument)} target548 * @param {string} value549 * @param {*} previous550 * @param {string} invalidArgumentMessage522- * @api private551+ * @private552 */553 554 _callParseArg(target, value, previous, invalidArgumentMessage) {555 try {7 unmodified lines563 }564 }565 566 /**567+ * Check for option flag conflicts.568+ * Register option if no conflicts found, or throw on conflict.569+ *570+ * @param {Option} option571+ * @api private572+ */573+574+ _registerOption(option) {575+ const matchingOption = (option.short && this._findOption(option.short)) ||576+ (option.long && this._findOption(option.long));577+ if (matchingOption) {578+ const matchingFlag = (option.long && this._findOption(option.long)) ? option.long : option.short;579+ throw new Error(`Cannot add option '${option.flags}'${this._name && ` to command '${this._name}'`} due to conflicting flag '${matchingFlag}'580+- already used by option '${matchingOption.flags}'`);581+ }582+583+ this.options.push(option);584+ }585+586+ /**587+ * Check for command name and alias conflicts with existing commands.588+ * Register command if no conflicts found, or throw on conflict.589+ *590+ * @param {Command} command591+ * @api private592+ */593+594+ _registerCommand(command) {595+ const knownBy = (cmd) => {596+ return [cmd.name()].concat(cmd.aliases());597+ };598+599+ const alreadyUsed = knownBy(command).find((name) => this._findCommand(name));600+ if (alreadyUsed) {601+ const existingCmd = knownBy(this._findCommand(alreadyUsed)).join('|');602+ const newCmd = knownBy(command).join('|');603+ throw new Error(`cannot add command '${newCmd}' as already have command '${existingCmd}'`);604+ }605+606+ this.commands.push(command);607+ }608+609+ /**610 * Add an option.611 *612 * @param {Option} option613 * @return {Command} `this` command for chaining614 */615 addOption(option) {616+ this._registerOption(option);617+618 const oname = option.name();619 const name = option.attributeName();620 621 // store default value6 unmodified lines628 } else if (option.defaultValue !== undefined) {629 this.setOptionValueWithSource(name, option.defaultValue, 'default');630 }631 558- // register the option559- this.options.push(option);560-632 // handler for cli and env supplied values633 const handleOptionValue = (val, invalidValueMessage, valueSource) => {634 // val is null for optional option used without an optional-argument.635 // val is undefined for boolean and negated option.39 unmodified lines675 676 /**677 * Internal implementation shared by .option() and .requiredOption()678 *608- * @api private679+ * @private680 */681 _optionEx(config, flags, description, fn, defaultValue) {682 if (typeof flags === 'object' && flags instanceof Option) {683 throw new Error('To add an Option object use addOption() instead of option() or requiredOption()');33 unmodified lines717 * .option('-t, --tip <VALUE>', 'add tip to purchase cost', parseFloat) // custom parse function718 *719 * @param {string} flags720 * @param {string} [description]650- * @param {Function|*} [parseArg] - custom option processing function or default value721+ * @param {(Function|*)} [parseArg] - custom option processing function or default value722 * @param {*} [defaultValue]723 * @return {Command} `this` command for chaining724 */725 8 unmodified lines734 * The `flags` string contains the short and/or long flags, separated by comma, a pipe or space.735 *736 * @param {string} flags737 * @param {string} [description]667- * @param {Function|*} [parseArg] - custom option processing function or default value738+ * @param {(Function|*)} [parseArg] - custom option processing function or default value739 * @param {*} [defaultValue]740 * @return {Command} `this` command for chaining741 */742 8 unmodified lines751 * // for `.option('-f,--flag [value]'):752 * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour753 * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b`754 *684- * @param {Boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag.755+ * @param {boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag.756 */757 combineFlagAndOptionalValue(combine = true) {758 this._combineFlagAndOptionalValue = !!combine;759 return this;1 unmodified line761 762 /**763 * Allow unknown options on the command line.764 *694- * @param {Boolean} [allowUnknown=true] - if `true` or omitted, no error will be thrown765+ * @param {boolean} [allowUnknown=true] - if `true` or omitted, no error will be thrown766 * for unknown options.767 */768 allowUnknownOption(allowUnknown = true) {769 this._allowUnknownOption = !!allowUnknown;2 unmodified lines772 773 /**774 * Allow excess command-arguments on the command line. Pass false to make excess arguments an error.775 *705- * @param {Boolean} [allowExcess=true] - if `true` or omitted, no error will be thrown776+ * @param {boolean} [allowExcess=true] - if `true` or omitted, no error will be thrown777 * for excess arguments.778 */779 allowExcessArguments(allowExcess = true) {780 this._allowExcessArguments = !!allowExcess;4 unmodified lines785 * Enable positional options. Positional means global options are specified before subcommands which lets786 * subcommands reuse the same option names, and also enables subcommands to turn on passThroughOptions.787 * The default behaviour is non-positional and global options may appear anywhere on the command line.788 *718- * @param {Boolean} [positional=true]789+ * @param {boolean} [positional=true]790 */791 enablePositionalOptions(positional = true) {792 this._enablePositionalOptions = !!positional;793 return this;4 unmodified lines798 * so actual command-options come before command-arguments. Turning this on for a subcommand requires799 * positional options to have been enabled on the program (parent commands).800 * The default behaviour is non-positional and options may appear before or after command-arguments.801 *731- * @param {Boolean} [passThrough=true]802+ * @param {boolean} [passThrough=true]803 * for unknown options.804 */805 passThroughOptions(passThrough = true) {806 this._passThroughOptions = !!passThrough;736- if (!!this.parent && passThrough && !this.parent._enablePositionalOptions) {737- throw new Error('passThroughOptions can not be used without turning on enablePositionalOptions for parent command(s)');738- }807+ this._checkForBrokenPassThrough();808 return this;809 }810 811 /**812+ * @private813+ */814+815+ _checkForBrokenPassThrough() {816+ if (this.parent && this._passThroughOptions && !this.parent._enablePositionalOptions) {817+ throw new Error(`passThroughOptions cannot be used for '${this._name}' without turning on enablePositionalOptions for parent command(s)`);818+ }819+ }820+821+ /**822 * Whether to store option values as properties on command object,823 * or store separately (specify false). In both cases the option values can be accessed using .opts().824 *825 * @param {boolean} [storeAsProperties=true]3 unmodified lines829 storeOptionsAsProperties(storeAsProperties = true) {830 if (this.options.length) {831 throw new Error('call .storeOptionsAsProperties() before adding options');832 }754- // if (Object.keys(this._optionValues).length) {755- // throw new Error('call .storeOptionsAsProperties() before setting option values');756- // }833+ if (Object.keys(this._optionValues).length) {834+ throw new Error('call .storeOptionsAsProperties() before setting option values');835+ }836 this._storeOptionsAsProperties = !!storeAsProperties;837 return this;838 }839 76 unmodified lines916 /**917 * Get user arguments from implied or explicit arguments.918 * Side-effects: set _scriptPath if args included script. Used for default program name, and subcommand searches.919 *841- * @api private920+ * @private921 */922 923 _prepareUserArgs(argv, parseOptions) {924 if (argv !== undefined && !Array.isArray(argv)) {94 unmodified lines1019 1020 /**1021 * Execute a sub-command executable.1022 *944- * @api private1023+ * @private1024 */1025 1026 _executeSubCommand(subcommand, args) {1027 args = args.slice();78 unmodified lines1106 });1107 }1108 1109 // By default terminate process when spawned process terminates.1031- // Suppressing the exit if exitCallback defined is a bit messy and of limited use, but does allow process to stay running!1110 const exitCallback = this._exitCallback;1033- if (!exitCallback) {1034- proc.on('close', process.exit.bind(process));1035- } else {1036- proc.on('close', () => {1037- exitCallback(new CommanderError(process.exitCode || 0, 'commander.executeSubCommandAsync', '(close)'));1038- });1039- }1111+ proc.on('close', (code, _signal) => {1112+ code = code ?? 1; // code is null if spawned process terminated due to a signal1113+ if (!exitCallback) {1114+ process.exit(code);1115+ } else {1116+ exitCallback(new CommanderError(code, 'commander.executeSubCommandAsync', '(close)'));1117+ }1118+ });1119 proc.on('error', (err) => {1120 // @ts-ignore1121 if (err.code === 'ENOENT') {1122 const executableDirMessage = executableDir21 unmodified lines1144 this.runningCommand = proc;1145 }1146 1147 /**1069- * @api private1148+ * @private1149 */1150 1151 _dispatchSubcommand(commandName, operands, unknown) {1152 const subCommand = this._findCommand(commandName);14 unmodified lines1167 /**1168 * Invoke help directly if possible, or dispatch if necessary.1169 * e.g. help foo1170 *1092- * @api private1171+ * @private1172 */1173 1174 _dispatchHelpCommand(subcommandName) {1175 if (!subcommandName) {5 unmodified lines1181 }1182 1183 // Fallback to parsing the help flag to invoke the help.1184 return this._dispatchSubcommand(subcommandName, [], [1106- this._helpLongFlag || this._helpShortFlag1185+ this._getHelpOption()?.long ?? this._getHelpOption()?.short ?? '--help'1186 ]);1187 }1188 1189 /**1190 * Check this.args against expected this.registeredArguments.1191 *1113- * @api private1192+ * @private1193 */1194 1195 _checkNumberOfArguments() {1196 // too few13 unmodified lines1210 1211 /**1212 * Process this.args using this.registeredArguments and save as this.processedArgs!1213 *1135- * @api private1214+ * @private1215 */1216 1217 _processArguments() {1218 const myParseArg = (argument, value, previous) => {36 unmodified lines1255 1256 /**1257 * Once we have a promise we chain, but call synchronously until then.1258 *1180- * @param {Promise|undefined} promise1259+ * @param {(Promise|undefined)} promise1260 * @param {Function} fn1182- * @return {Promise|undefined}1183- * @api private1261+ * @return {(Promise|undefined)}1262+ * @private1263 */1264 1265 _chainOrCall(promise, fn) {1266 // thenable6 unmodified lines1273 }1274 1275 /**1276 *1198- * @param {Promise|undefined} promise1277+ * @param {(Promise|undefined)} promise1278 * @param {string} event1200- * @return {Promise|undefined}1201- * @api private1279+ * @return {(Promise|undefined)}1280+ * @private1281 */1282 1283 _chainOrCallHooks(promise, event) {1284 let result = promise;19 unmodified lines1304 }1305 1306 /**1307 *1229- * @param {Promise|undefined} promise1308+ * @param {(Promise|undefined)} promise1309 * @param {Command} subCommand1310 * @param {string} event1232- * @return {Promise|undefined}1233- * @api private1311+ * @return {(Promise|undefined)}1312+ * @private1313 */1314 1315 _chainOrCallSubCommandHook(promise, subCommand, event) {1316 let result = promise;10 unmodified lines1327 /**1328 * Process arguments in context of this command.1329 * Returns action result, in case it is a promise.1330 *1252- * @api private1331+ * @private1332 */1333 1334 _parseCommand(operands, unknown) {1335 const parsed = this.parseOptions(unknown);5 unmodified lines1341 1342 if (operands && this._findCommand(operands[0])) {1343 return this._dispatchSubcommand(operands[0], operands.slice(1), unknown);1344 }1266- if (this._hasImplicitHelpCommand() && operands[0] === this._helpCommandName) {1345+ if (this._getHelpCommand() && operands[0] === this._getHelpCommand().name()) {1346 return this._dispatchHelpCommand(operands[1]);1347 }1348 if (this._defaultCommandName) {1270- outputHelpIfRequested(this, unknown); // Run the help for default command from parent rather than passing to default command1349+ this._outputHelpIfRequested(unknown); // Run the help for default command from parent rather than passing to default command1350 return this._dispatchSubcommand(this._defaultCommandName, operands, unknown);1351 }1352 if (this.commands.length && this.args.length === 0 && !this._actionHandler && !this._defaultCommandName) {1353 // probably missing subcommand and no handler, user needs help (and exit)1354 this.help({ error: true });1355 }1356 1278- outputHelpIfRequested(this, parsed.unknown);1357+ this._outputHelpIfRequested(parsed.unknown);1358 this._checkForMissingMandatoryOptions();1359 this._checkForConflictingOptions();1360 1361 // We do not always call this check to avoid masking a "better" error, like unknown command.49 unmodified lines1411 1412 /**1413 * Find matching command.1414 *1336- * @api private1415+ * @private1416 */1417 _findCommand(name) {1418 if (!name) return undefined;1419 return this.commands.find(cmd => cmd._name === name || cmd._aliases.includes(name));3 unmodified lines1423 * Return an option matching `arg` if any.1424 *1425 * @param {string} arg1426 * @return {Option}1348- * @api private1427+ * @package internal use only1428 */1429 1430 _findOption(arg) {1431 return this.options.find(option => option.is(arg));2 unmodified lines1434 /**1435 * Display an error message if a mandatory option does not have a value.1436 * Called after checking for help flags in leaf subcommand.1437 *1359- * @api private1438+ * @private1439 */1440 1441 _checkForMissingMandatoryOptions() {1442 // Walk up hierarchy so can call in subcommand after checking for displaying help.8 unmodified lines1451 1452 /**1453 * Display an error message if conflicting options are used together in this.1454 *1376- * @api private1455+ * @private1456 */1457 _checkForConflictingLocalOptions() {1458 const definedNonDefaultOptions = this.options.filter(1459 (option) => {22 unmodified lines1482 /**1483 * Display an error message if conflicting options are used together.1484 * Called after checking for help flags in leaf subcommand.1485 *1407- * @api private1486+ * @private1487 */1488 _checkForConflictingOptions() {1489 // Walk up hierarchy so can call in subcommand after checking for displaying help.1490 this._getCommandAndAncestors().forEach((cmd) => {12 unmodified lines1503 * op --known kkk => [op], []1504 * sub --unknown uuu op => [sub], [--unknown uuu op]1505 * sub -- --unknown uuu op => [sub --unknown uuu op], []1506 *1428- * @param {String[]} argv1429- * @return {{operands: String[], unknown: String[]}}1507+ * @param {string[]} argv1508+ * @return {{operands: string[], unknown: string[]}}1509 */1510 1511 parseOptions(argv) {1512 const operands = []; // operands, not options or values85 unmodified lines1598 if (this._findCommand(arg)) {1599 operands.push(arg);1600 if (args.length > 0) unknown.push(...args);1601 break;1523- } else if (arg === this._helpCommandName && this._hasImplicitHelpCommand()) {1602+ } else if (this._getHelpCommand() && arg === this._getHelpCommand().name()) {1603 operands.push(arg);1604 if (args.length > 0) operands.push(...args);1605 break;1606 } else if (this._defaultCommandName) {79 unmodified lines1686 /**1687 * Apply any option related environment variables, if option does1688 * not have a value from cli or client code.1689 *1611- * @api private1690+ * @private1691 */1692 _parseOptionsEnv() {1693 this.options.forEach((option) => {1694 if (option.envVar && option.envVar in process.env) {14 unmodified lines1709 1710 /**1711 * Apply any implied option values, if option is undefined or default value.1712 *1634- * @api private1713+ * @private1714 */1715 _parseOptionsImplied() {1716 const dualHelper = new DualOptions(this.options);1717 const hasCustomOptionValue = (optionKey) => {15 unmodified lines1733 /**1734 * Argument `name` is missing.1735 *1736 * @param {string} name1658- * @api private1737+ * @private1738 */1739 1740 missingArgument(name) {1741 const message = `error: missing required argument '${name}'`;3 unmodified lines1745 /**1746 * `Option` is missing an argument.1747 *1748 * @param {Option} option1670- * @api private1749+ * @private1750 */1751 1752 optionMissingArgument(option) {1753 const message = `error: option '${option.flags}' argument missing`;3 unmodified lines1757 /**1758 * `Option` does not have a value, and is a mandatory option.1759 *1760 * @param {Option} option1682- * @api private1761+ * @private1762 */1763 1764 missingMandatoryOptionValue(option) {1765 const message = `error: required option '${option.flags}' not specified`;4 unmodified lines1770 * `Option` conflicts with another option.1771 *1772 * @param {Option} option1773 * @param {Option} conflictingOption1695- * @api private1774+ * @private1775 */1776 _conflictingOption(option, conflictingOption) {1777 // The calling code does not know whether a negated option is the source of the1778 // value, so do some work to take an educated guess.28 unmodified lines1807 /**1808 * Unknown option `flag`.1809 *1810 * @param {string} flag1732- * @api private1811+ * @private1812 */1813 1814 unknownOption(flag) {1815 if (this._allowUnknownOption) return;20 unmodified lines1836 /**1837 * Excess arguments, more than expected.1838 *1839 * @param {string[]} receivedArgs1761- * @api private1840+ * @private1841 */1842 1843 _excessArguments(receivedArgs) {1844 if (this._allowExcessArguments) return;7 unmodified lines1852 1853 /**1854 * Unknown command.1855 *1777- * @api private1856+ * @private1857 */1858 1859 unknownCommand() {1860 const unknownName = this.args[0];22 unmodified lines1883 *1884 * @param {string} [str]1885 * @param {string} [flags]1886 * @param {string} [description]1808- * @return {this | string | undefined} `this` command for chaining, or version string if no arguments1887+ * @return {(this | string | undefined)} `this` command for chaining, or version string if no arguments1888 */1889 1890 version(str, flags, description) {1891 if (str === undefined) return this._version;1892 this._version = str;1893 flags = flags || '-V, --version';1894 description = description || 'output the version number';1895 const versionOption = this.createOption(flags, description);1817- this._versionOptionName = versionOption.attributeName(); // [sic] not defined in constructor, partly legacy, partly only needed at root1818- this.options.push(versionOption);1896+ this._versionOptionName = versionOption.attributeName();1897+ this._registerOption(versionOption);1898+1899 this.on('option:' + versionOption.name(), () => {1900 this._outputConfiguration.writeOut(`${str}\n`);1901 this._exit(0, 'commander.version', str);1902 });4 unmodified lines1907 * Set the description.1908 *1909 * @param {string} [str]1910 * @param {Object} [argsDescription]1831- * @return {string|Command}1911+ * @return {(string|Command)}1912 */1913 description(str, argsDescription) {1914 if (str === undefined && argsDescription === undefined) return this._description;1915 this._description = str;6 unmodified lines1922 /**1923 * Set the summary. Used when listed as subcommand of parent.1924 *1925 * @param {string} [str]1846- * @return {string|Command}1926+ * @return {(string|Command)}1927 */1928 summary(str) {1929 if (str === undefined) return this._summary;1930 this._summary = str;5 unmodified lines1936 *1937 * You may call more than once to add multiple aliases. Only the first alias is shown in the auto-generated help.1938 *1939 * @param {string} [alias]1860- * @return {string|Command}1940+ * @return {(string|Command)}1941 */1942 1943 alias(alias) {1944 if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility5 unmodified lines1950 command = this.commands[this.commands.length - 1];1951 }1952 1953 if (alias === command._name) throw new Error('Command alias can\'t be the same as its name');1954+ const matchingCommand = this.parent?._findCommand(alias);1955+ if (matchingCommand) {1956+ // c.f. _registerCommand1957+ const existingCmd = [matchingCommand.name()].concat(matchingCommand.aliases()).join('|');1958+ throw new Error(`cannot add alias '${alias}' to command '${this.name()}' as already have command '${existingCmd}'`);1959+ }1960 1961 command._aliases.push(alias);1962 return this;1963 }3 unmodified lines1967 *1968 * Only the first alias is shown in the auto-generated help.1969 *1970 * @param {string[]} [aliases]1885- * @return {string[]|Command}1971+ * @return {(string[]|Command)}1972 */1973 1974 aliases(aliases) {1975 // Getter for the array of aliases is the main reason for having aliases() in addition to alias().6 unmodified lines1982 /**1983 * Set / get the command usage `str`.1984 *1985 * @param {string} [str]1900- * @return {String|Command}1986+ * @return {(string|Command)}1987 */1988 1989 usage(str) {1990 if (str === undefined) {2 unmodified lines1993 const args = this.registeredArguments.map((arg) => {1994 return humanReadableArgName(arg);1995 });1996 return [].concat(1911- (this.options.length || this._hasHelpOption ? '[options]' : []),1997+ (this.options.length || (this._helpOption !== null) ? '[options]' : []),1998 (this.commands.length ? '[command]' : []),1999 (this.registeredArguments.length ? args : [])2000 ).join(' ');2001 }5 unmodified lines2007 /**2008 * Get or set the name of the command.2009 *2010 * @param {string} [str]1925- * @return {string|Command}2011+ * @return {(string|Command)}2012 */2013 2014 name(str) {2015 if (str === undefined) return this._name;28 unmodified lines2044 * // or2045 * program.executableDir('subcommands');2046 *2047 * @param {string} [path]1962- * @return {string|null|Command}2048+ * @return {(string|null|Command)}2049 */2050 2051 executableDir(path) {2052 if (path === undefined) return this._executableDir;16 unmodified lines2069 return helper.formatHelp(this, helper);2070 }2071 2072 /**1987- * @api private2073+ * @private2074 */2075 2076 _getHelpContext(contextOptions) {2077 contextOptions = contextOptions || {};36 unmodified lines2114 }2115 }2116 context.write(helpInformation);2117 2032- if (this._helpLongFlag) {2033- this.emit(this._helpLongFlag); // deprecated2118+ if (this._getHelpOption()?.long) {2119+ this.emit(this._getHelpOption().long); // deprecated2120 }2121 this.emit('afterHelp', context);2122 this._getCommandAndAncestors().forEach(command => command.emit('afterAllHelp', context));2123 }2124 2125 /**2040- * You can pass in flags and a description to override the help2041- * flags and help description for your command. Pass in false to2042- * disable the built-in help option.2126+ * You can pass in flags and a description to customise the built-in help option.2127+ * Pass in false to disable the built-in help option.2128 *2044- * @param {string | boolean} [flags]2129+ * @example2130+ * program.helpOption('-?, --help' 'show help'); // customise2131+ * program.helpOption(false); // disable2132+ *2133+ * @param {(string | boolean)} flags2134 * @param {string} [description]2135 * @return {Command} `this` command for chaining2136 */2137 2138 helpOption(flags, description) {2139+ // Support disabling built-in help option.2140 if (typeof flags === 'boolean') {2051- this._hasHelpOption = flags;2141+ if (flags) {2142+ this._helpOption = this._helpOption ?? undefined; // preserve existing option2143+ } else {2144+ this._helpOption = null; // disable2145+ }2146 return this;2147 }2054- this._helpFlags = flags || this._helpFlags;2055- this._helpDescription = description || this._helpDescription;2148 2057- const helpFlags = splitOptionFlags(this._helpFlags);2058- this._helpShortFlag = helpFlags.shortFlag;2059- this._helpLongFlag = helpFlags.longFlag;2149+ // Customise flags and description.2150+ flags = flags ?? '-h, --help';2151+ description = description ?? 'display help for command';2152+ this._helpOption = this.createOption(flags, description);2153 2154 return this;2155 }2156 2157 /**2158+ * Lazy create help option.2159+ * Returns null if has been disabled with .helpOption(false).2160+ *2161+ * @returns {(Option | null)} the help option2162+ * @package internal use only2163+ */2164+ _getHelpOption() {2165+ // Lazy create help option on demand.2166+ if (this._helpOption === undefined) {2167+ this.helpOption(undefined, undefined);2168+ }2169+ return this._helpOption;2170+ }2171+2172+ /**2173+ * Supply your own option to use for the built-in help option.2174+ * This is an alternative to using helpOption() to customise the flags and description etc.2175+ *2176+ * @param {Option} option2177+ * @return {Command} `this` command for chaining2178+ */2179+ addHelpOption(option) {2180+ this._helpOption = option;2181+ return this;2182+ }2183+2184+ /**2185 * Output help information and exit.2186 *2187 * Outputs built-in help, and custom text added using `.addHelpText()`.2188 *16 unmodified lines2205 * Position is 'before' or 'after' to affect just this command,2206 * and 'beforeAll' or 'afterAll' to affect this command and all its subcommands.2207 *2208 * @param {string} position - before or after built-in help2089- * @param {string | Function} text - string to add, or a function returning a string2209+ * @param {(string | Function)} text - string to add, or a function returning a string2210 * @return {Command} `this` command for chaining2211 */2212 addHelpText(position, text) {2213 const allowedValues = ['beforeAll', 'before', 'after', 'afterAll'];15 unmodified lines2229 }2230 });2231 return this;2232 }2113-}2233 2115-/**2116- * Output help information if help flags specified2117- *2118- * @param {Command} cmd - command to output help for2119- * @param {Array} args - array of options to search for help flags2120- * @api private2121- */2234+ /**2235+ * Output help information if help flags specified2236+ *2237+ * @param {Array} args - array of options to search for help flags2238+ * @private2239+ */2240 2123-function outputHelpIfRequested(cmd, args) {2124- const helpOption = cmd._hasHelpOption && args.find(arg => arg === cmd._helpLongFlag || arg === cmd._helpShortFlag);2125- if (helpOption) {2126- cmd.outputHelp();2127- // (Do not have all displayed text available so only passing placeholder.)2128- cmd._exit(0, 'commander.helpDisplayed', '(outputHelp)');2241+ _outputHelpIfRequested(args) {2242+ const helpOption = this._getHelpOption();2243+ const helpRequested = helpOption && args.find(arg => helpOption.is(arg));2244+ if (helpRequested) {2245+ this.outputHelp();2246+ // (Do not have all displayed text available so only passing placeholder.)2247+ this._exit(0, 'commander.helpDisplayed', '(outputHelp)');2248+ }2249 }2250 }2251 2252 /**2253 * Scan arguments and increment port number for inspect calls (to avoid conflicts when spawning new command).2254 *2255 * @param {string[]} args - array of arguments from node.execArgv2256 * @returns {string[]}2137- * @api private2257+ * @private2258 */2259 2260 function incrementNodeInspectorPort(args) {2261 // Testing for these options:38 unmodified linesmodified:lib/help.js+14 added-19 removed
24 unmodified lines25 */26 27 visibleCommands(cmd) {28 const visibleCommands = cmd.commands.filter(cmd => !cmd._hidden);29- if (cmd._hasImplicitHelpCommand()) {30- // Create a command matching the implicit help command.31- const [, helpName, helpArgs] = cmd._helpCommandnameAndArgs.match(/([^ ]+) *(.*)/);32- const helpCommand = cmd.createCommand(helpName)33- .helpOption(false);34- helpCommand.description(cmd._helpCommandDescription);35- if (helpArgs) helpCommand.arguments(helpArgs);29+ const helpCommand = cmd._getHelpCommand();30+ if (helpCommand && !helpCommand._hidden) {31 visibleCommands.push(helpCommand);32 }33 if (this.sortSubcommands) {34 visibleCommands.sort((a, b) => {27 unmodified lines62 */63 64 visibleOptions(cmd) {65 const visibleOptions = cmd.options.filter((option) => !option.hidden);71- // Implicit help72- const showShortHelpFlag = cmd._hasHelpOption && cmd._helpShortFlag && !cmd._findOption(cmd._helpShortFlag);73- const showLongHelpFlag = cmd._hasHelpOption && !cmd._findOption(cmd._helpLongFlag);74- if (showShortHelpFlag || showLongHelpFlag) {75- let helpOption;76- if (!showShortHelpFlag) {77- helpOption = cmd.createOption(cmd._helpLongFlag, cmd._helpDescription);78- } else if (!showLongHelpFlag) {79- helpOption = cmd.createOption(cmd._helpShortFlag, cmd._helpDescription);80- } else {81- helpOption = cmd.createOption(cmd._helpFlags, cmd._helpDescription);66+ // Built-in help option.67+ const helpOption = cmd._getHelpOption();68+ if (helpOption && !helpOption.hidden) {69+ // Automatically hide conflicting flags. Bit dubious but a historical behaviour that is convenient for single-command programs.70+ const removeShort = helpOption.short && cmd._findOption(helpOption.short);71+ const removeLong = helpOption.long && cmd._findOption(helpOption.long);72+ if (!removeShort && !removeLong) {73+ visibleOptions.push(helpOption); // no changes needed74+ } else if (helpOption.long && !removeLong) {75+ visibleOptions.push(cmd.createOption(helpOption.long, helpOption.description));76+ } else if (helpOption.short && !removeShort) {77+ visibleOptions.push(cmd.createOption(helpOption.short, helpOption.description));78 }83- visibleOptions.push(helpOption);79 }80 if (this.sortOptions) {81 visibleOptions.sort(this.compareOptions);82 }375 unmodified linesmodified:lib/option.js+6 added-8 removed
72 unmodified lines73 * @example74 * new Option('--rgb').conflicts('cmyk');75 * new Option('--js').conflicts(['ts', 'jsx']);76 *77- * @param {string | string[]} names77+ * @param {(string | string[])} names78 * @return {Option}79 */80 81 conflicts(names) {75 unmodified lines157 return this;158 }159 160 /**161- * @api private161+ * @package internal use only162 */163 164 _concatValue(value, previous) {165 if (previous === this.defaultValue || !Array.isArray(previous)) {41 unmodified lines207 * Return option name, in a camelcase format that can be used208 * as a object attribute key.209 *210 * @return {string}211- * @api private211 */212 213 attributeName() {214 return camelcase(this.name().replace(/^no-/, ''));3 unmodified lines218 * Check if `arg` matches the short or long flag.219 *220 * @param {string} arg221 * @return {boolean}223- * @api private222+ * @package internal use only223 */224 225 is(arg) {226 return this.short === arg || this.long === arg;4 unmodified lines231 *232 * Options are one of boolean, negated, required argument, or optional argument.233 *234 * @return {boolean}236- * @api private235+ * @package internal use only236 */237 238 isBoolean() {239 return !this.required && !this.optional && !this.negate;51 unmodified lines291 * Convert string from kebab-case to camelCase.292 *293 * @param {string} str294 * @return {string}296- * @api private295+ * @private296 */297 298 function camelcase(str) {299 return str.split('-').reduce((str, word) => {3 unmodified lines303 304 /**305 * Split the short and long flag out of something like '-m,--mixed <value>'306 *308- * @api private307+ * @private308 */309 310 function splitOptionFlags(flags) {311 let shortFlag;11 unmodified lines323 return { shortFlag, longFlag };324 }325 326 exports.Option = Option;328-exports.splitOptionFlags = splitOptionFlags;327 exports.DualOptions = DualOptions;modified:tests/fixtures/inspect.js+1 added-1 removed
123345672 unmodified lines#!/usr/bin/env node
const program = require('../../');const { program } = require('../../');
process.env.FORCE_COLOR = 0; // work-around bug in Jest: https://github.com/jestjs/jest/issues/14391
program2 unmodified linesmodified:tests/fixtures/pm+13 added-2 removed
1 #!/usr/bin/env node2 3+const path = require('node:path');4+const { program } = require('../../');5+6 process.env.FORCE_COLOR = 0; // work-around bug in Jest: https://github.com/jestjs/jest/issues/143917 5-var program = require('../../');6-8 program9 .version('0.0.1')10 .command('install [name]', 'install one or more packages').alias('i')11 .command('search [query]', 'search with optional query').alias('s')5 unmodified lines17 .command('default', 'default command', { hidden: true, isDefault: true })18 .command('specifyInstall', 'specify install subcommand', { executableFile: 'pm-install' })19 .command('specifyPublish', 'specify publish subcommand', { executableFile: 'pm-publish' })20 .command('silent', 'silently succeed')21+ .command('fail', 'exit with non-zero status code')22+ .command('terminate', 'terminate due to signal');23+24+program25+ .command('exit-override')26+ .exitOverride((err) => { process.exit(err.exitCode); })27+ .command('fail', 'exit with non-zero status code', { executableFile: path.join(__dirname, 'pm-fail.js') })28+ .command('terminate', 'terminate due to signal', { executableFile: path.join(__dirname, 'pm-terminate.js') });29+30+program31 .parse(process.argv);modified:tests/fixtures/pm-cache.js+1 added-1 removed
1-const program = require('../../');1+const { program } = require('../../');2 3 program4 .command('clear', 'clear the cache')5 .command('validate', 'validate the cache', { isDefault: true })1 unmodified lineadded:tests/fixtures/pm-fail.js+1 added
1+process.exit(42);added:tests/fixtures/pm-terminate.js+1 added
1+process.kill(process.pid, 'SIGINT');modified:tests/fixtures-extensions/pm.js+1 added-1 removed
1 #!/usr/bin/env node2 3-const program = require('../../');3+const { program } = require('../../');4 5 program6 .command('try-ts', 'test file extension lookup')7 .command('try-cjs', 'test file extension lookup')2 unmodified linesadded:tests/command.addHelpOption.test.js+54 added
1+const { Command, Option } = require('../');2+3+// More complete tests are in command.helpOption.test.js.4+5+describe('addHelpOption', () => {6+ let writeSpy;7+ let writeErrorSpy;8+9+ beforeAll(() => {10+ // Optional. Suppress expected output to keep test output clean.11+ writeSpy = jest.spyOn(process.stdout, 'write').mockImplementation(() => { });12+ writeErrorSpy = jest.spyOn(process.stderr, 'write').mockImplementation(() => { });13+ });14+15+ afterEach(() => {16+ writeSpy.mockClear();17+ writeErrorSpy.mockClear();18+ });19+20+ afterAll(() => {21+ writeSpy.mockRestore();22+ writeErrorSpy.mockRestore();23+ });24+25+ test('when addHelpOption has custom flags then custom short flag invokes help', () => {26+ const program = new Command();27+ program28+ .exitOverride()29+ .addHelpOption(new Option('-c,--custom-help'));30+31+ expect(() => {32+ program.parse(['-c'], { from: 'user' });33+ }).toThrow('(outputHelp)');34+ });35+36+ test('when addHelpOption has custom flags then custom long flag invokes help', () => {37+ const program = new Command();38+ program39+ .exitOverride()40+ .addHelpOption(new Option('-c,--custom-help'));41+42+ expect(() => {43+ program.parse(['--custom-help'], { from: 'user' });44+ }).toThrow('(outputHelp)');45+ });46+47+ test('when addHelpOption with hidden help option then help does not include help option', () => {48+ const program = new Command();49+ program50+ .addHelpOption(new Option('-c,--custom-help', 'help help help').hideHelp());51+ const helpInfo = program.helpInformation();52+ expect(helpInfo).not.toMatch(/help/);53+ });54+});modified:tests/command.chain.test.js+53 added-4 removed
32 unmodified lines33 const result = program.arguments('<file>');34 expect(result).toBe(program);35 });36 37- test('when call .addHelpCommand() then returns this', () => {37+ test('when call .addHelpCommand(cmd) then returns this', () => {38 const program = new Command();39- const result = program.addHelpCommand(false);39+ const result = program.addHelpCommand(new Command('assist'));40 expect(result).toBe(program);41 });42 43+ test('when call deprecated .addHelpCommand() then returns this', () => {44+ const program = new Command();45+ const result = program.addHelpCommand();46+ expect(result).toBe(program);47+ });48+49+ test('when call deprecated .addHelpCommand(boolean) then returns this', () => {50+ const program = new Command();51+ const result1 = program.addHelpCommand(true);52+ expect(result1).toBe(program);53+ const result2 = program.addHelpCommand(false);54+ expect(result2).toBe(program);55+ });56+57+ test('when call deprecated .addHelpCommand(string[, string]) then returns this', () => {58+ const program = new Command();59+ const result1 = program.addHelpCommand('assist');60+ expect(result1).toBe(program);61+ const result2 = program.addHelpCommand('assist', 'assist description');62+ expect(result2).toBe(program);63+ });64+65+ test('when call .helpCommand(name) then returns this', () => {66+ const program = new Command();67+ const result = program.helpCommand();68+ expect(result).toBe(program);69+ });70+71+ test('when call .helpCommand(name, description) then returns this', () => {72+ const program = new Command();73+ const result1 = program.helpCommand('assist', 'assist description');74+ expect(result1).toBe(program);75+ });76+77+ test('when call .helpCommand(boolean) then returns this', () => {78+ const program = new Command();79+ const result1 = program.helpCommand(true);80+ expect(result1).toBe(program);81+ const result2 = program.helpCommand(false);82+ expect(result2).toBe(program);83+ });84+85 test('when call .exitOverride() then returns this', () => {86 const program = new Command();87 const result = program.exitOverride(() => { });88 expect(result).toBe(program);82 unmodified lines171 const result = program.name('easy');172 expect(result).toBe(program);173 });174 133- test('when call .helpOption() then returns this', () => {175+ test('when call .helpOption(flags) then returns this', () => {176 const program = new Command();177+ const flags = '-h, --help';135- const result = program.helpOption(false);178+ const result = program.helpOption(flags);179 expect(result).toBe(program);180 });181 182+ test('when call .addHelpOption() then returns this', () => {183+ const program = new Command();184+ const result = program.addHelpOption(new Option('-h, --help'));185+ expect(result).toBe(program);186+ });187+188 test('when call .addHelpText() then returns this', () => {189 const program = new Command();190 const result = program.addHelpText('before', 'example');191 expect(result).toBe(program);69 unmodified linesmodified:tests/command.copySettings.test.js+25 added-11 removed
29 unmodified lines30 31 test('when copyInheritedSettings then copies helpOption(false)', () => {32 const source = new commander.Command();33 const cmd = new commander.Command();34- expect(cmd._hasHelpOption).toBeTruthy();34 35 source.helpOption(false);36 cmd.copyInheritedSettings(source);38- expect(cmd._hasHelpOption).toBeFalsy();37+ expect(cmd._getHelpOption()).toBe(null);38 });39 40 test('when copyInheritedSettings then copies helpOption(flags, description)', () => {41 const source = new commander.Command();42 const cmd = new commander.Command();43 44 source.helpOption('-Z, --zz', 'ddd');45 cmd.copyInheritedSettings(source);47- expect(cmd._helpFlags).toBe('-Z, --zz');48- expect(cmd._helpDescription).toBe('ddd');49- expect(cmd._helpShortFlag).toBe('-Z');50- expect(cmd._helpLongFlag).toBe('--zz');46+ expect(cmd._getHelpOption()).toBe(source._getHelpOption());47+ // const helpOption = cmd._getHelpOption();48+ // expect(helpOption.flags).toBe('-Z, --zz');49+ // expect(helpOption.description).toBe('ddd');50+ // expect(helpOption.short).toBe('-Z');51+ // expect(helpOption.long).toBe('--zz');52 });53 53- test('when copyInheritedSettings then copies addHelpCommand(name, description)', () => {54+ test('when copyInheritedSettings then copies custom help command', () => {55 const source = new commander.Command();56 const cmd = new commander.Command();57 57- source.addHelpCommand('HELP [cmd]', 'ddd');58+ source.helpCommand('HELP [cmd]', 'ddd');59 cmd.copyInheritedSettings(source);59- expect(cmd._helpCommandName).toBe('HELP');60- expect(cmd._helpCommandnameAndArgs).toBe('HELP [cmd]');61- expect(cmd._helpCommandDescription).toBe('ddd');60+ cmd.helpCommand(true); // force enable61+ const helpCommand = cmd._getHelpCommand();62+ expect(helpCommand).toBeTruthy();63+ expect(helpCommand.name()).toBe('HELP');64+ expect(helpCommand.description()).toBe('ddd');65 });66 67+ test('when copyInheritedSettings then does not copy help enable override', () => {68+ const source = new commander.Command();69+ const cmd = new commander.Command();70+71+ // Existing behaviour, force enable/disable does not inherit,72+ // largely so (probably redundant) program.helpCommand(true) does not inherit to leaf subcommands.73+ source.helpCommand(true);74+ cmd.copyInheritedSettings(source);75+ expect(cmd._addHelpOption).toBeUndefined();76+ });77+78 test('when copyInheritedSettings then copies configureHelp(config)', () => {79 const source = new commander.Command();80 const cmd = new commander.Command();81 66 unmodified linesmodified:tests/command.executableSubcommand.signals.test.js+34 added-27 removed
1 const childProcess = require('child_process');2 const path = require('path');3 4-// Test that a signal sent to the parent process is received by the executable subcommand process (which is listening).4+const pmPath = path.join(__dirname, 'fixtures', 'pm');5 6-// Disabling tests on Windows as:6+// Disabling some tests on Windows as:7 // "Windows does not support sending signals"8 // https://nodejs.org/api/process.html#process_signal_events9 const describeOrSkipOnWindows = (process.platform === 'win32') ? describe.skip : describe;10 11-// Note: the previous (sinon) test had custom code for SIGUSR1, revisit if required:12-// As described at https://nodejs.org/api/process.html#process_signal_events13-// this signal will start a debugger and thus the process might output an14-// additional error message:15-// "Failed to open socket on port 5858, waiting 1000 ms before retrying".11+describeOrSkipOnWindows('signals', () => {12+ test.each(['SIGINT', 'SIGHUP', 'SIGTERM', 'SIGUSR1', 'SIGUSR2'])('when program sent %s then executableSubcommand sent signal too', (signal, done) => {13+ // Spawn program. The listen subcommand waits for a signal and writes the name of the signal to stdout.14+ const proc = childProcess.spawn(pmPath, ['listen'], {});15 17-describeOrSkipOnWindows.each([['SIGINT'], ['SIGHUP'], ['SIGTERM'], ['SIGUSR1'], ['SIGUSR2']])(18- 'test signal handling in executableSubcommand', (value) => {19- // Slightly tricky test, stick with callback and disable lint warning.20- // eslint-disable-next-line jest/no-done-callback21- test(`when command killed with ${value} then executableSubcommand receives ${value}`, (done) => {22- const pmPath = path.join(__dirname, './fixtures/pm');16+ let processOutput = '';17+ proc.stdout.on('data', (data) => {18+ if (processOutput.length === 0) {19+ // Send signal to program.20+ proc.kill(`${signal}`);21+ }22+ processOutput += data.toString();23+ });24+ proc.on('close', (code) => {25+ // Check the child subcommand received the signal too.26+ expect(processOutput).toBe(`Listening for signal...${signal}`);27+ done();28+ });29+ });30 24- // The child process writes to stdout.25- const proc = childProcess.spawn(pmPath, ['listen'], {});31+ test('when executable subcommand sent signal then program exit code is non-zero', () => {32+ const { status } = childProcess.spawnSync(pmPath, ['terminate'], {});33+ expect(status).toBeGreaterThan(0);34+ });35 27- let processOutput = '';28- proc.stdout.on('data', (data) => {29- if (processOutput.length === 0) {30- proc.kill(`${value}`);31- }32- processOutput += data.toString();33- });34- proc.on('close', (code) => {35- expect(processOutput).toBe(`Listening for signal...${value}`);36- done();37- });38- });36+ test('when command has exitOverride and executable subcommand sent signal then exit code is non-zero', () => {37+ const { status } = childProcess.spawnSync(pmPath, ['exit-override', 'terminate'], {});38+ expect(status).toBeGreaterThan(0);39 });40+41+ // Not a signal test, but closely related code so adding here.42+ test('when command has exitOverride and executable subcommand fails then program exit code is subcommand exit code', () => {43+ const { status } = childProcess.spawnSync(pmPath, ['exit-override', 'fail'], {});44+ expect(status).toEqual(42);45+ });46+});modified:tests/command.positionalOptions.test.js+18 added-6 removed
360 unmodified lines361 });362 363 // ------------------------------------------------------------------------------364 365+describe('broken passThrough', () => {365-test('when program not positional and turn on passthrough in subcommand then error', () => {366- const program = new commander.Command();367- const sub = program.command('sub');366+ test('when program not positional and turn on passThroughOptions in subcommand then error', () => {367+ const program = new commander.Command();368+ const sub = program.command('sub');369 369- expect(() => {370- sub.passThroughOptions();371- }).toThrow();370+ expect(() => {371+ sub.passThroughOptions();372+ }).toThrow();373+ });374+375+ test('when program not positional and add subcommand with passThroughOptions then error', () => {376+ const program = new commander.Command();377+ const sub = new commander.Command('sub')378+ .passThroughOptions();379+380+ expect(() => {381+ program.addCommand(sub);382+ }).toThrow();383+ });384 });385 386 // ------------------------------------------------------------------------------387 140 unmodified linesadded:tests/command.registerClash.test.js+49 added
1+const { Command } = require('../');2+3+test('when command name conflicts with existing name then throw', () => {4+ expect(() => {5+ const program = new Command();6+ program.command('one');7+ program.command('one');8+ }).toThrow('cannot add command');9+});10+11+test('when command name conflicts with existing alias then throw', () => {12+ expect(() => {13+ const program = new Command();14+ program.command('one').alias('1');15+ program.command('1');16+ }).toThrow('cannot add command');17+});18+19+test('when command alias conflicts with existing name then throw', () => {20+ expect(() => {21+ const program = new Command();22+ program.command('one');23+ program.command('1').alias('one');24+ }).toThrow('cannot add alias');25+});26+27+test('when command alias conflicts with existing alias then throw', () => {28+ expect(() => {29+ const program = new Command();30+ program.command('one').alias('1');31+ program.command('unity').alias('1');32+ }).toThrow('cannot add alias');33+});34+35+test('when .addCommand name conflicts with existing name then throw', () => {36+ expect(() => {37+ const program = new Command();38+ program.command('one');39+ program.addCommand(new Command('one'));40+ }).toThrow('cannot add command');41+});42+43+test('when .addCommand alias conflicts with existing name then throw', () => {44+ expect(() => {45+ const program = new Command();46+ program.command('one');47+ program.addCommand(new Command('unity').alias('one'));48+ }).toThrow('cannot add command');49+});modified:tests/commander.configureCommand.test.js+7 added-7 removed
83 unmodified lines84 program.storeOptionsAsProperties();85 }).toThrow();86 });87 88-// test('when storeOptionsAsProperties() after setting option value then throw', () => {89-// const program = new commander.Command();90-// program.setOptionValue('foo', 'bar');91-// expect(() => {92-// program.storeOptionsAsProperties();93-// }).toThrow();94-// });88+test('when storeOptionsAsProperties() after setting option value then throw', () => {89+ const program = new commander.Command();90+ program.setOptionValue('foo', 'bar');91+ expect(() => {92+ program.storeOptionsAsProperties();93+ }).toThrow();94+});added:tests/options.registerClash.test.js+59 added
1+const { Command, Option } = require('../');2+3+describe('.option()', () => {4+ test('when short option flag conflicts then throws', () => {5+ expect(() => {6+ const program = new Command();7+ program8+ .option('-c, --cheese <type>', 'cheese type')9+ .option('-c, --conflict');10+ }).toThrow('Cannot add option');11+ });12+13+ test('when long option flag conflicts then throws', () => {14+ expect(() => {15+ const program = new Command();16+ program17+ .option('-c, --cheese <type>', 'cheese type')18+ .option('-H, --cheese');19+ }).toThrow('Cannot add option');20+ });21+22+ test('when use help options separately then does not throw', () => {23+ expect(() => {24+ const program = new Command();25+ program26+ .option('-h, --help', 'display help');27+ }).not.toThrow();28+ });29+30+ test('when reuse flags in subcommand then does not throw', () => {31+ expect(() => {32+ const program = new Command();33+ program34+ .option('e, --example');35+ program.command('sub')36+ .option('e, --example');37+ }).not.toThrow();38+ });39+});40+41+describe('.addOption()', () => {42+ test('when short option flags conflicts then throws', () => {43+ expect(() => {44+ const program = new Command();45+ program46+ .option('-c, --cheese <type>', 'cheese type')47+ .addOption(new Option('-c, --conflict'));48+ }).toThrow('Cannot add option');49+ });50+51+ test('when long option flags conflicts then throws', () => {52+ expect(() => {53+ const program = new Command();54+ program55+ .option('-c, --cheese <type>', 'cheese type')56+ .addOption(new Option('-H, --cheese'));57+ }).toThrow('Cannot add option');58+ });59+});modified:tests/program.test.js+59 added-12 removed
1-const commander = require('../');1+const {2+ program,3+ Command,4+ Option,5+ Argument,6+ Help,7+ CommanderError,8+ InvalidArgumentError,9+ InvalidOptionArgumentError,10+ createCommand,11+ createOption,12+ createArgument13+} = require('../index.js');14 15 // Do some testing of the default export(s).16+// Similar tests to ts-imports.test.ts and esm-imports-test.js.17 5-test('when require commander then is a Command (default export of global)', () => {6- // Deprecated global command7- const program = commander;8- expect(program.constructor.name).toBe('Command');18+/* eslint jest/expect-expect: ["error", { "assertFunctionNames": ["expect", "checkClass"] }] */19+20+function checkClass(obj, name) {21+ expect(typeof obj).toEqual('object');22+ expect(obj.constructor.name).toEqual(name);23+}24+25+test('program', () => {26+ checkClass(program, 'Command');27 });28 11-test('when require commander then has program (named export of global)', () => {12- // program added in v513- const program = commander.program;14- expect(program.constructor.name).toBe('Command');29+test('Command', () => {30+ checkClass(new Command('name'), 'Command');31 });32 17-test('when require commander then has newable Command', () => {18- const cmd = new commander.Command();19- expect(cmd.constructor.name).toBe('Command');33+test('Option', () => {34+ checkClass(new Option('-e, --example', 'description'), 'Option');35 });36+37+test('Argument', () => {38+ checkClass(new Argument('<foo>', 'description'), 'Argument');39+});40+41+test('Help', () => {42+ checkClass(new Help(), 'Help');43+});44+45+test('CommanderError', () => {46+ checkClass(new CommanderError(1, 'code', 'failed'), 'CommanderError');47+});48+49+test('InvalidArgumentError', () => {50+ checkClass(new InvalidArgumentError('failed'), 'InvalidArgumentError');51+});52+53+test('InvalidOptionArgumentError', () => { // Deprecated54+ checkClass(new InvalidOptionArgumentError('failed'), 'InvalidArgumentError');55+});56+57+test('createCommand', () => {58+ checkClass(createCommand('foo'), 'Command');59+});60+61+test('createOption', () => {62+ checkClass(createOption('-e, --example', 'description'), 'Option');63+});64+65+test('createArgument', () => {66+ checkClass(createArgument('<foo>', 'description'), 'Argument');67+});modified:tests/ts-imports.test.ts+23 added-100 removed
1-import {2- program,3- Command,4- Option,5- Argument,6- Help,7- CommanderError,8- InvalidArgumentError,9- InvalidOptionArgumentError,10- createCommand,11- createOption,12- createArgument13-} from '../';1+import { program, Command, Option, CommanderError, InvalidArgumentError, InvalidOptionArgumentError, Help, createCommand } from '../';2 15-import * as commander from '../'; // This does interesting things when esModuleInterop is true!16-3 // Do some simple checks that expected imports are available at runtime.4 // Similar tests to esm-imports-test.js5 6 // eslint-disable-next-line @typescript-eslint/ban-types1 unmodified line8 expect(typeof obj).toEqual('object');9 expect(obj.constructor.name).toEqual(name);10 }11 26-describe('named imports', () => {27- test('program', () => {28- checkClass(program, 'Command');29- });12+test('program', () => {13+ checkClass(program, 'Command');14+});15 31- test('Command', () => {32- checkClass(new Command('name'), 'Command');33- });16+test('createCommand', () => {17+ checkClass(createCommand(), 'Command');18+});19 35- test('Option', () => {36- checkClass(new Option('-e, --example', 'description'), 'Option');37- });20+test('Command', () => {21+ checkClass(new Command('name'), 'Command');22+});23 39- test('Argument', () => {40- checkClass(new Argument('<foo>', 'description'), 'Argument');41- });24+test('Option', () => {25+ checkClass(new Option('-e, --example', 'description'), 'Option');26+});27 43- test('Help', () => {44- checkClass(new Help(), 'Help');45- });28+test('CommanderError', () => {29+ checkClass(new CommanderError(1, 'code', 'failed'), 'CommanderError');30+});31 47- test('CommanderError', () => {48- checkClass(new CommanderError(1, 'code', 'failed'), 'CommanderError');49- });32+test('InvalidArgumentError', () => {33+ checkClass(new InvalidArgumentError('failed'), 'InvalidArgumentError');34+});35 51- test('InvalidArgumentError', () => {52- checkClass(new InvalidArgumentError('failed'), 'InvalidArgumentError');53- });54-55- test('InvalidOptionArgumentError', () => { // Deprecated56- checkClass(new InvalidOptionArgumentError('failed'), 'InvalidArgumentError');57- });58-59- test('createCommand', () => {60- checkClass(createCommand('foo'), 'Command');61- });62-63- test('createOption', () => {64- checkClass(createOption('-e, --example', 'description'), 'Option');65- });66-67- test('createArgument', () => {68- checkClass(createArgument('<foo>', 'description'), 'Argument');69- });36+test('InvalidOptionArgumentError', () => { // Deprecated37+ checkClass(new InvalidOptionArgumentError('failed'), 'InvalidArgumentError');38 });39 72-describe('import * as commander', () => {73- test('program', () => {74- checkClass(commander.program, 'Command');75- });76-77- test('Command', () => {78- checkClass(new commander.Command('name'), 'Command');79- });80-81- test('Option', () => {82- checkClass(new commander.Option('-e, --example', 'description'), 'Option');83- });84-85- test('Argument', () => {86- checkClass(new commander.Argument('<foo>', 'description'), 'Argument');87- });88-89- test('Help', () => {90- checkClass(new commander.Help(), 'Help');40+test('Help', () => {41+ checkClass(new Help(), 'Help');91- });92-93- test('CommanderError', () => {94- checkClass(new commander.CommanderError(1, 'code', 'failed'), 'CommanderError');95- });96-97- test('InvalidArgumentError', () => {98- checkClass(new commander.InvalidArgumentError('failed'), 'InvalidArgumentError');99- });100-101- test('InvalidOptionArgumentError', () => { // Deprecated102- checkClass(new commander.InvalidOptionArgumentError('failed'), 'InvalidArgumentError');103- });104-105- // Factory functions are not found if esModuleInterop is true, so comment out tests for now.106- // Can uncomment these again when we drop the default export of global program and add the factory functions explicitly.107-108- // test('createCommand', () => {109- // checkClass(commander.createCommand('foo'), 'Command');110- // });111-112- // test('createOption', () => {113- // checkClass(commander.createOption('-e, --example', 'description'), 'Option');114- // });115-116- // test('createArgument', () => {117- // checkClass(commander.createArgument('<foo>', 'description'), 'Argument');118- // });42 });modified:typings/index.d.ts+23 added-8 removed
417 unmodified lines418 */419 arguments(names: string): this;420 421 /**422- * Override default decision whether to add implicit help command.422+ * Customise or override default help command. By default a help command is automatically added if your command has subcommands.423 *424 * @example425+ * ```ts426+ * program.helpCommand('help [cmd]');427+ * program.helpCommand('help [cmd]', 'show help');428+ * program.helpCommand(false); // suppress default help command429+ * program.helpCommand(true); // add help command even if no subcommands430 * ```426- * addHelpCommand() // force on427- * addHelpCommand(false); // force off428- * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details429- * ```430- *431- * @returns `this` command for chaining431 */433- addHelpCommand(enableOrNameAndArgs?: string | boolean, description?: string): this;432+ helpCommand(nameAndArgs: string, description?: string): this;433+ helpCommand(enable: boolean): this;434 435 /**436+ * Add prepared custom help command.437+ */438+ addHelpCommand(cmd: Command): this;439+ /** @deprecated since v12, instead use helpCommand */440+ addHelpCommand(nameAndArgs: string, description?: string): this;441+ /** @deprecated since v12, instead use helpCommand */442+ addHelpCommand(enable?: boolean): this;443+444+ /**445 * Add hook for life cycle event.446 */447 hook(event: HookEvent, listener: (thisCommand: Command, actionCommand: Command) => void | Promise<void>): this;448 398 unmodified lines847 */848 helpOption(flags?: string | boolean, description?: string): this;849 850 /**851+ * Supply your own option to use for the built-in help option.852+ * This is an alternative to using helpOption() to customise the flags and description etc.853+ */854+ addHelpOption(option: Option): this;855+856+ /**857 * Output help information and exit.858 *859 * Outputs built-in help, and custom text added using `.addHelpText()`.860 */39 unmodified linesmodified:typings/index.test-d.ts+13 added-2 removed
57 unmodified lines58 // arguments59 expectType<commander.Command>(program.arguments('<cmd> [env]'));60 61 // addHelpCommand62+expectType<commander.Command>(program.addHelpCommand(new commander.Command('assist')));63+// Deprecated uses64 expectType<commander.Command>(program.addHelpCommand());65 expectType<commander.Command>(program.addHelpCommand(false));66 expectType<commander.Command>(program.addHelpCommand(true));65-expectType<commander.Command>(program.addHelpCommand('compress <file>'));66-expectType<commander.Command>(program.addHelpCommand('compress <file>', 'compress target file'));67+expectType<commander.Command>(program.addHelpCommand('assist [cmd]'));68+expectType<commander.Command>(program.addHelpCommand('assist [file]', 'display help'));69 70+// helpCommand71+expectType<commander.Command>(program.helpCommand(false));72+expectType<commander.Command>(program.helpCommand(true));73+expectType<commander.Command>(program.helpCommand('assist [cmd]'));74+expectType<commander.Command>(program.helpCommand('assist [file]', 'display help'));75+76 // exitOverride77 expectType<commander.Command>(program.exitOverride());78 expectType<commander.Command>(program.exitOverride((err): never => {79 return process.exit(err.exitCode);229 unmodified lines309 expectType<commander.Command>(program.helpOption('-h,--help', 'custom description'));310 expectType<commander.Command>(program.helpOption(undefined, 'custom description'));311 expectType<commander.Command>(program.helpOption(false));312 313+// addHelpOption314+expectType<commander.Command>(program.addHelpOption(new commander.Option('-h,--help')));315+316 // addHelpText317 expectType<commander.Command>(program.addHelpText('after', 'text'));318 expectType<commander.Command>(program.addHelpText('afterAll', 'text'));319 expectType<commander.Command>(program.addHelpText('before', () => 'before'));194 unmodified linesmodified:CHANGELOG.md+70 added
6 unmodified lines7 8 <!-- markdownlint-disable MD024 -->9 <!-- markdownlint-disable MD004 -->10 11+## [12.0.0] (2024-02-03)12+13+### Added14+15+- `.addHelpOption()` as another way of configuring built-in help option ([#2006])16+- `.helpCommand()` for configuring built-in help command ([#2087])17+18+### Fixed19+20+- *Breaking:* use non-zero exit code when spawned executable subcommand terminates due to a signal ([#2023])21+- *Breaking:* check `passThroughOptions` constraints when using `.addCommand` and throw if parent command does not have `.enablePositionalOptions()` enabled ([#1937])22+23+### Changed24+25+- *Breaking:* Commander 12 requires Node.js v18 or higher ([#2027])26+- *Breaking:* throw an error if add an option with a flag which is already in use ([#2055])27+- *Breaking:* throw an error if add a command with name or alias which is already in use ([#2059])28+- *Breaking:* throw error when calling `.storeOptionsAsProperties()` after setting an option value ([#1928])29+- replace non-standard JSDoc of `@api private` with documented `@private` ([#1949])30+- `.addHelpCommand()` now takes a Command (passing string or boolean still works as before but deprecated) ([#2087])31+- refactor internal implementation of built-in help option ([#2006])32+- refactor internal implementation of built-in help command ([#2087])33+34+### Deprecated35+36+- `.addHelpCommand()` passing string or boolean (use `.helpCommand()` or pass a Command) ([#2087])37+38+### Removed39+40+- *Breaking:* removed default export of a global Command instance from CommonJS (use the named `program` export instead) ([#2017])41+42+### Migration Tips43+44+**global program**45+46+If you are using the [deprecated](./docs/deprecated.md#default-import-of-global-command-object) default import of the global Command object, you need to switch to using a named import (or create a new `Command`).47+48+```js49+// const program = require('commander');50+const { program } = require('commander');51+```52+53+**option and command clashes**54+55+A couple of configuration problems now throw an error, which will pick up issues in existing programs:56+57+- adding an option which uses the same flag as a previous option58+- adding a command which uses the same name or alias as a previous command59+60+## [12.0.0-1] (2024-01-20)61+62+(Released in 12.0.0)63+64+## [12.0.0-0] (2023-11-11)65+66+(Released in 12.0.0)67+68 ## [11.1.0] (2023-10-13)69 70 ### Fixed71 1172 unmodified lines1244 [#1864]: https://github.com/tj/commander.js/pull/18641245 [#1874]: https://github.com/tj/commander.js/pull/18741246 [#1886]: https://github.com/tj/commander.js/pull/18861247 [#1896]: https://github.com/tj/commander.js/pull/18961248+[#1928]: https://github.com/tj/commander.js/pull/19281249 [#1930]: https://github.com/tj/commander.js/pull/19301250+[#1937]: https://github.com/tj/commander.js/pull/19371251+[#1949]: https://github.com/tj/commander.js/pull/19491252 [#1965]: https://github.com/tj/commander.js/pull/19651253 [#1969]: https://github.com/tj/commander.js/pull/19691254 [#1982]: https://github.com/tj/commander.js/pull/19821255 [#1983]: https://github.com/tj/commander.js/pull/19831256+[#2006]: https://github.com/tj/commander.js/pull/20061257 [#2010]: https://github.com/tj/commander.js/pull/20101258+[#2017]: https://github.com/tj/commander.js/pull/20171259 [#2019]: https://github.com/tj/commander.js/pull/20191260+[#2023]: https://github.com/tj/commander.js/pull/20231261+[#2027]: https://github.com/tj/commander.js/pull/20271262+[#2055]: https://github.com/tj/commander.js/pull/20551263+[#2059]: https://github.com/tj/commander.js/pull/20591264+[#2087]: https://github.com/tj/commander.js/pull/20871265 1266 <!-- Referenced in 5.x -->1267 [#1]: https://github.com/tj/commander.js/issues/11268 [#432]: https://github.com/tj/commander.js/issues/43271 unmodified lines1340 [#1026]: https://github.com/tj/commander.js/pull/10261341 [#1028]: https://github.com/tj/commander.js/pull/10281342 1343 [Unreleased]: https://github.com/tj/commander.js/compare/master...develop1344+[12.0.0]: https://github.com/tj/commander.js/compare/v11.1.0...v12.0.01345+[12.0.0-1]: https://github.com/tj/commander.js/compare/v12.0.0-0...v12.0.0-11346+[12.0.0-0]: https://github.com/tj/commander.js/compare/v11.1.0...v12.0.0-01347 [11.1.0]: https://github.com/tj/commander.js/compare/v11.0.0...v11.1.01348 [11.0.0]: https://github.com/tj/commander.js/compare/v10.0.1...v11.0.01349 [10.0.1]: https://github.com/tj/commander.js/compare/v10.0.0...v10.0.11350 [10.0.0]: https://github.com/tj/commander.js/compare/v9.5.0...v10.0.044 unmodified linesmodified:index.js+4 added-6 removed
2 unmodified lines3 const { CommanderError, InvalidArgumentError } = require('./lib/error.js');4 const { Help } = require('./lib/help.js');5 const { Option } = require('./lib/option.js');6 7-/**8- * Expose the root command.9- */7+exports.program = new Command();8 11-exports = module.exports = new Command();12-exports.program = exports; // More explicit access to global command.13-// createArgument, createCommand, and createOption are implicitly available as they are methods on program.9+exports.createCommand = (name) => new Command(name);10+exports.createOption = (flags, description) => new Option(flags, description);11+exports.createArgument = (name, description) => new Argument(name, description);12 13 /**14 * Expose classes15 */9 unmodified linesmodified:package-lock.json+514 added-431 removed
1 {2 "name": "commander",3- "version": "11.1.0",3+ "version": "12.0.0-1",4 "lockfileVersion": 3,5 "requires": true,6 "packages": {7 "": {8 "name": "commander",9- "version": "11.1.0",9+ "version": "12.0.0-1",10 "license": "MIT",11 "devDependencies": {12 "@types/jest": "^29.2.4",13 "@types/node": "^20.2.5",7 unmodified lines21 "eslint-plugin-n": "^16.2.0",22 "eslint-plugin-promise": "^6.1.1",23 "jest": "^29.3.1",24 "ts-jest": "^29.0.3",25- "tsd": "^0.29.0",25+ "tsd": "^0.30.4",26 "typescript": "^5.0.4"27 },28 "engines": {29- "node": ">=16"29+ "node": ">=18"30 }31 },32 "node_modules/@aashutoshrathi/word-wrap": {33 "version": "1.2.6",17 unmodified lines51 "node": ">=6.0.0"52 }53 },54 "node_modules/@babel/code-frame": {55- "version": "7.22.13",56- "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.22.13.tgz",57- "integrity": "sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w==",55+ "version": "7.23.5",56+ "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.23.5.tgz",57+ "integrity": "sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==",58 "dev": true,59 "dependencies": {60- "@babel/highlight": "^7.22.13",60+ "@babel/highlight": "^7.23.4",61 "chalk": "^2.4.2"62 },63 "engines": {64 "node": ">=6.9.0"70 unmodified lines135 "node": ">=4"136 }137 },138 "node_modules/@babel/compat-data": {139- "version": "7.23.2",140- "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.2.tgz",141- "integrity": "sha512-0S9TQMmDHlqAZ2ITT95irXKfxN9bncq8ZCoJhun3nHL/lLUxd2NKBJYoNGWH7S0hz6fRQwWlAWn/ILM0C70KZQ==",139+ "version": "7.23.5",140+ "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.23.5.tgz",141+ "integrity": "sha512-uU27kfDRlhfKl+w1U6vp16IuvSLtjAxdArVXPa9BvLkrr7CYIsxH5adpHObeAGY/41+syctUWOZ140a2Rvkgjw==",142 "dev": true,143 "engines": {144 "node": ">=6.9.0"145 }146 },147 "node_modules/@babel/core": {148- "version": "7.23.2",149- "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.2.tgz",150- "integrity": "sha512-n7s51eWdaWZ3vGT2tD4T7J6eJs3QoBXydv7vkUM06Bf1cbVD2Kc2UrkzhiQwobfV7NwOnQXYL7UBJ5VPU+RGoQ==",148+ "version": "7.23.9",149+ "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.23.9.tgz",150+ "integrity": "sha512-5q0175NOjddqpvvzU+kDiSOAk4PfdO6FvwCWoQ6RO7rTzEe8vlo+4HVfcnAREhD4npMs0e9uZypjTwzZPCf/cw==",151 "dev": true,152 "dependencies": {153 "@ampproject/remapping": "^2.2.0",154- "@babel/code-frame": "^7.22.13",155- "@babel/generator": "^7.23.0",156- "@babel/helper-compilation-targets": "^7.22.15",157- "@babel/helper-module-transforms": "^7.23.0",158- "@babel/helpers": "^7.23.2",159- "@babel/parser": "^7.23.0",160- "@babel/template": "^7.22.15",161- "@babel/traverse": "^7.23.2",162- "@babel/types": "^7.23.0",154+ "@babel/code-frame": "^7.23.5",155+ "@babel/generator": "^7.23.6",156+ "@babel/helper-compilation-targets": "^7.23.6",157+ "@babel/helper-module-transforms": "^7.23.3",158+ "@babel/helpers": "^7.23.9",159+ "@babel/parser": "^7.23.9",160+ "@babel/template": "^7.23.9",161+ "@babel/traverse": "^7.23.9",162+ "@babel/types": "^7.23.9",163 "convert-source-map": "^2.0.0",164 "debug": "^4.1.0",165 "gensync": "^1.0.0-beta.2",166 "json5": "^2.2.3",16 unmodified lines183 "semver": "bin/semver.js"184 }185 },186 "node_modules/@babel/generator": {187- "version": "7.23.0",188- "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.0.tgz",189- "integrity": "sha512-lN85QRR+5IbYrMWM6Y4pE/noaQtg4pNiqeNGX60eqOfo6gtEj6uw/JagelB8vVztSd7R6M5n1+PQkDbHbBRU4g==",187+ "version": "7.23.6",188+ "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.23.6.tgz",189+ "integrity": "sha512-qrSfCYxYQB5owCmGLbl8XRpX1ytXlpueOb0N0UmQwA073KZxejgQTzAmJezxvpwQD9uGtK2shHdi55QT+MbjIw==",190 "dev": true,191 "dependencies": {192- "@babel/types": "^7.23.0",192+ "@babel/types": "^7.23.6",193 "@jridgewell/gen-mapping": "^0.3.2",194 "@jridgewell/trace-mapping": "^0.3.17",195 "jsesc": "^2.5.1"196 },1 unmodified line198 "node": ">=6.9.0"199 }200 },201 "node_modules/@babel/helper-compilation-targets": {202- "version": "7.22.15",203- "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz",204- "integrity": "sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw==",202+ "version": "7.23.6",203+ "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.23.6.tgz",204+ "integrity": "sha512-9JB548GZoQVmzrFgp8o7KxdgkTGm6xs9DW0o/Pim72UDjzr5ObUQ6ZzYPqA+g9OTS2bBQoctLJrky0RDCAWRgQ==",205 "dev": true,206 "dependencies": {207- "@babel/compat-data": "^7.22.9",208- "@babel/helper-validator-option": "^7.22.15",209- "browserslist": "^4.21.9",207+ "@babel/compat-data": "^7.23.5",208+ "@babel/helper-validator-option": "^7.23.5",209+ "browserslist": "^4.22.2",210 "lru-cache": "^5.1.1",211 "semver": "^6.3.1"212 },213 "engines": {55 unmodified lines269 "node": ">=6.9.0"270 }271 },272 "node_modules/@babel/helper-module-transforms": {273- "version": "7.23.0",274- "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.0.tgz",275- "integrity": "sha512-WhDWw1tdrlT0gMgUJSlX0IQvoO1eN279zrAUbVB+KpV2c3Tylz8+GnKOLllCS6Z/iZQEyVYxhZVUdPTqs2YYPw==",273+ "version": "7.23.3",274+ "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.23.3.tgz",275+ "integrity": "sha512-7bBs4ED9OmswdfDzpz4MpWgSrV7FXlc3zIagvLFjS5H+Mk7Snr21vQ6QwrsoCGMfNC4e4LQPdoULEt4ykz0SRQ==",276 "dev": true,277 "dependencies": {278 "@babel/helper-environment-visitor": "^7.22.20",279 "@babel/helper-module-imports": "^7.22.15",41 unmodified lines321 "node": ">=6.9.0"322 }323 },324 "node_modules/@babel/helper-string-parser": {325- "version": "7.22.5",326- "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz",327- "integrity": "sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw==",325+ "version": "7.23.4",326+ "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.23.4.tgz",327+ "integrity": "sha512-803gmbQdqwdf4olxrX4AJyFBV/RTr3rSmOj0rKwesmzlfhYNDEs+/iOcznzpNWlJlIlTJC2QfPFcHB6DlzdVLQ==",328 "dev": true,329 "engines": {330 "node": ">=6.9.0"331 }7 unmodified lines339 "node": ">=6.9.0"340 }341 },342 "node_modules/@babel/helper-validator-option": {343- "version": "7.22.15",344- "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz",345- "integrity": "sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA==",343+ "version": "7.23.5",344+ "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.23.5.tgz",345+ "integrity": "sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==",346 "dev": true,347 "engines": {348 "node": ">=6.9.0"349 }350 },351 "node_modules/@babel/helpers": {352- "version": "7.23.2",353- "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.2.tgz",354- "integrity": "sha512-lzchcp8SjTSVe/fPmLwtWVBFC7+Tbn8LGHDVfDp9JGxpAY5opSaEFgt8UQvrnECWOTdji2mOWMz1rOhkHscmGQ==",352+ "version": "7.23.9",353+ "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.23.9.tgz",354+ "integrity": "sha512-87ICKgU5t5SzOT7sBMfCOZQ2rHjRU+Pcb9BoILMYz600W6DkVRLFBPwQ18gwUVvggqXivaUakpnxWQGbpywbBQ==",355 "dev": true,356 "dependencies": {357- "@babel/template": "^7.22.15",358- "@babel/traverse": "^7.23.2",359- "@babel/types": "^7.23.0"357+ "@babel/template": "^7.23.9",358+ "@babel/traverse": "^7.23.9",359+ "@babel/types": "^7.23.9"360 },361 "engines": {362 "node": ">=6.9.0"363 }364 },365 "node_modules/@babel/highlight": {366- "version": "7.22.20",367- "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.22.20.tgz",368- "integrity": "sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg==",366+ "version": "7.23.4",367+ "resolved": "https://registry.npmjs.org/@babel/highlight/-/highlight-7.23.4.tgz",368+ "integrity": "sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==",369 "dev": true,370 "dependencies": {371 "@babel/helper-validator-identifier": "^7.22.20",372 "chalk": "^2.4.2",74 unmodified lines447 "node": ">=4"448 }449 },450 "node_modules/@babel/parser": {451- "version": "7.23.0",452- "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.0.tgz",453- "integrity": "sha512-vvPKKdMemU85V9WE/l5wZEmImpCtLqbnTvqDS2U1fJ96KrxoW7KrXhNsNCblQlg8Ck4b85yxdTyelsMUgFUXiw==",451+ "version": "7.23.9",452+ "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.23.9.tgz",453+ "integrity": "sha512-9tcKgqKbs3xGJ+NtKF2ndOBBLVwPjl1SHxPQkd36r3Dlirw3xWUeGaTbqr7uGZcTaxkVNwc+03SVP7aCdWrTlA==",454 "dev": true,455 "bin": {456 "parser": "bin/babel-parser.js"457 },61 unmodified lines519 "@babel/core": "^7.0.0-0"520 }521 },522 "node_modules/@babel/plugin-syntax-jsx": {523- "version": "7.22.5",524- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.22.5.tgz",525- "integrity": "sha512-gvyP4hZrgrs/wWMaocvxZ44Hw0b3W8Pe+cMxc8V1ULQ07oh8VNbIRaoD1LRZVTvD+0nieDKjfgKg89sD7rrKrg==",523+ "version": "7.23.3",524+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-jsx/-/plugin-syntax-jsx-7.23.3.tgz",525+ "integrity": "sha512-EB2MELswq55OHUoRZLGg/zC7QWUKfNLpE57m/S2yr1uEneIgsTgrSzXP3NXEsMkVn76OlaVVnzN+ugObuYGwhg==",526 "dev": true,527 "dependencies": {528 "@babel/helper-plugin-utils": "^7.22.5"529 },91 unmodified lines621 "@babel/core": "^7.0.0-0"622 }623 },624 "node_modules/@babel/plugin-syntax-typescript": {625- "version": "7.22.5",626- "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.22.5.tgz",627- "integrity": "sha512-1mS2o03i7t1c6VzH6fdQ3OA8tcEIxwG18zIPRp+UY1Ihv6W+XZzBCVxExF9upussPXJ0xE9XRHwMoNs1ep/nRQ==",625+ "version": "7.23.3",626+ "resolved": "https://registry.npmjs.org/@babel/plugin-syntax-typescript/-/plugin-syntax-typescript-7.23.3.tgz",627+ "integrity": "sha512-9EiNjVJOMwCO+43TqoTrgQ8jMwcAd0sWyXi9RPfIsLTj4R2MADDDQXELhffaUx/uJv2AYcxBgPwH6j4TIA4ytQ==",628 "dev": true,629 "dependencies": {630 "@babel/helper-plugin-utils": "^7.22.5"631 },4 unmodified lines636 "@babel/core": "^7.0.0-0"637 }638 },639 "node_modules/@babel/template": {640- "version": "7.22.15",641- "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.22.15.tgz",642- "integrity": "sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w==",640+ "version": "7.23.9",641+ "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.23.9.tgz",642+ "integrity": "sha512-+xrD2BWLpvHKNmX2QbpdpsBaWnRxahMwJjO+KZk2JOElj5nSmKezyS1B4u+QbHMTX69t4ukm6hh9lsYQ7GHCKA==",643 "dev": true,644 "dependencies": {645- "@babel/code-frame": "^7.22.13",646- "@babel/parser": "^7.22.15",647- "@babel/types": "^7.22.15"645+ "@babel/code-frame": "^7.23.5",646+ "@babel/parser": "^7.23.9",647+ "@babel/types": "^7.23.9"648 },649 "engines": {650 "node": ">=6.9.0"651 }652 },653 "node_modules/@babel/traverse": {654- "version": "7.23.2",655- "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.2.tgz",656- "integrity": "sha512-azpe59SQ48qG6nu2CzcMLbxUudtN+dOM9kDbUqGq3HXUJRlo7i8fvPoxQUzYgLZ4cMVmuZgm8vvBpNeRhd6XSw==",654+ "version": "7.23.9",655+ "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.23.9.tgz",656+ "integrity": "sha512-I/4UJ9vs90OkBtY6iiiTORVMyIhJ4kAVmsKo9KFc8UOxMeUfi2hvtIBsET5u9GizXE6/GFSuKCTNfgCswuEjRg==",657 "dev": true,658 "dependencies": {659- "@babel/code-frame": "^7.22.13",660- "@babel/generator": "^7.23.0",659+ "@babel/code-frame": "^7.23.5",660+ "@babel/generator": "^7.23.6",661 "@babel/helper-environment-visitor": "^7.22.20",662 "@babel/helper-function-name": "^7.23.0",663 "@babel/helper-hoist-variables": "^7.22.5",664 "@babel/helper-split-export-declaration": "^7.22.6",665- "@babel/parser": "^7.23.0",666- "@babel/types": "^7.23.0",667- "debug": "^4.1.0",665+ "@babel/parser": "^7.23.9",666+ "@babel/types": "^7.23.9",667+ "debug": "^4.3.1",668 "globals": "^11.1.0"669 },670 "engines": {671 "node": ">=6.9.0"8 unmodified lines680 "node": ">=4"681 }682 },683 "node_modules/@babel/types": {684- "version": "7.23.0",685- "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.0.tgz",686- "integrity": "sha512-0oIyUfKoI3mSqMvsxBdclDwxXKXAUA8v/apZbc+iSyARYou1o8ZGDxbUYyLFoW2arqS2jDGqJuZvv1d/io1axg==",684+ "version": "7.23.9",685+ "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.23.9.tgz",686+ "integrity": "sha512-dQjSq/7HaSjRM43FFGnv5keM2HsxpmyV1PfaSVm0nzzjwwTmjOe6J4bC8e3+pTEIgHaHj+1ZlLThRJ2auc/w1Q==",687 "dev": true,688 "dependencies": {689- "@babel/helper-string-parser": "^7.22.5",689+ "@babel/helper-string-parser": "^7.23.4",690 "@babel/helper-validator-identifier": "^7.22.20",691 "to-fast-properties": "^2.0.0"692 },693 "engines": {21 unmodified lines715 "eslint": "^6.0.0 || ^7.0.0 || >=8.0.0"716 }717 },718 "node_modules/@eslint-community/regexpp": {719- "version": "4.9.1",720- "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.9.1.tgz",721- "integrity": "sha512-Y27x+MBLjXa+0JWDhykM3+JE+il3kHKAEqabfEWq3SDhZjLYb6/BHL/JKFnH3fe207JaXkyDo685Oc2Glt6ifA==",719+ "version": "4.10.0",720+ "resolved": "https://registry.npmjs.org/@eslint-community/regexpp/-/regexpp-4.10.0.tgz",721+ "integrity": "sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==",722 "dev": true,723 "engines": {724 "node": "^12.0.0 || ^14.0.0 || >=16.0.0"725 }20 unmodified lines746 "funding": {747 "url": "https://opencollective.com/eslint"748 }749 },750+ "node_modules/@eslint/eslintrc/node_modules/brace-expansion": {751+ "version": "1.1.11",752+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",753+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",754+ "dev": true,755+ "dependencies": {756+ "balanced-match": "^1.0.0",757+ "concat-map": "0.0.1"758+ }759+ },760+ "node_modules/@eslint/eslintrc/node_modules/minimatch": {761+ "version": "3.1.2",762+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",763+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",764+ "dev": true,765+ "dependencies": {766+ "brace-expansion": "^1.1.7"767+ },768+ "engines": {769+ "node": "*"770+ }771+ },772 "node_modules/@eslint/js": {773 "version": "8.56.0",774 "resolved": "https://registry.npmjs.org/@eslint/js/-/js-8.56.0.tgz",775 "integrity": "sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==",2 unmodified lines778 "node": "^12.22.0 || ^14.17.0 || >=16.0.0"779 }780 },781 "node_modules/@humanwhocodes/config-array": {760- "version": "0.11.13",761- "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.13.tgz",762- "integrity": "sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==",782+ "version": "0.11.14",783+ "resolved": "https://registry.npmjs.org/@humanwhocodes/config-array/-/config-array-0.11.14.tgz",784+ "integrity": "sha512-3T8LkOmg45BV5FICb15QQMsyUSWrQ8AygVfC7ZG32zOalnqrilm018ZVCw0eapXux8FtA33q8PSRSstjee3jSg==",785 "dev": true,786 "dependencies": {765- "@humanwhocodes/object-schema": "^2.0.1",766- "debug": "^4.1.1",787+ "@humanwhocodes/object-schema": "^2.0.2",788+ "debug": "^4.3.1",789 "minimatch": "^3.0.5"790 },791 "engines": {792 "node": ">=10.10.0"793 }794 },795+ "node_modules/@humanwhocodes/config-array/node_modules/brace-expansion": {796+ "version": "1.1.11",797+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",798+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",799+ "dev": true,800+ "dependencies": {801+ "balanced-match": "^1.0.0",802+ "concat-map": "0.0.1"803+ }804+ },805+ "node_modules/@humanwhocodes/config-array/node_modules/minimatch": {806+ "version": "3.1.2",807+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",808+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",809+ "dev": true,810+ "dependencies": {811+ "brace-expansion": "^1.1.7"812+ },813+ "engines": {814+ "node": "*"815+ }816+ },817 "node_modules/@humanwhocodes/module-importer": {818 "version": "1.0.1",819 "resolved": "https://registry.npmjs.org/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz",820 "integrity": "sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==",6 unmodified lines827 "url": "https://github.com/sponsors/nzakas"828 }829 },830 "node_modules/@humanwhocodes/object-schema": {787- "version": "2.0.1",788- "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz",789- "integrity": "sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==",831+ "version": "2.0.2",832+ "resolved": "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.2.tgz",833+ "integrity": "sha512-6EwiSjwWYP7pTckG6I5eyFANjPhmPjUX9JRLUSfNPC7FX7zK9gyZAfUEaECL6ALTpGX5AjnBq3C9XmVWPitNpw==",834 "dev": true835 },836 "node_modules/@istanbuljs/load-nyc-config": {837 "version": "1.1.0",419 unmodified lines1257 "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==",1258 "dev": true1259 },1260 "node_modules/@jridgewell/trace-mapping": {1217- "version": "0.3.19",1218- "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz",1219- "integrity": "sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw==",1261+ "version": "0.3.22",1262+ "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.22.tgz",1263+ "integrity": "sha512-Wf963MzWtA2sjrNt+g18IAln9lKnlRp+K2eH4jjIoF1wYeq3aMREpG09xhlhdzS0EjwU7qmUJYangWa+151vZw==",1264 "dev": true,1265 "dependencies": {1266 "@jridgewell/resolve-uri": "^3.1.0",1267 "@jridgewell/sourcemap-codec": "^1.4.14"40 unmodified lines1308 "integrity": "sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==",1309 "dev": true1310 },1311 "node_modules/@sinonjs/commons": {1268- "version": "3.0.0",1269- "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.0.tgz",1270- "integrity": "sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA==",1312+ "version": "3.0.1",1313+ "resolved": "https://registry.npmjs.org/@sinonjs/commons/-/commons-3.0.1.tgz",1314+ "integrity": "sha512-K3mCHKQ9sVh8o1C9cxkwxaOmXoAMlDxC1mYyHrjqOWEcBjYr76t96zL2zlj5dUGZ3HSw240X1qgH3Mjf1yJWpQ==",1315 "dev": true,1316 "dependencies": {1317 "type-detect": "4.0.8"1318 }7 unmodified lines1326 "@sinonjs/commons": "^3.0.0"1327 }1328 },1329 "node_modules/@tsd/typescript": {1286- "version": "5.2.2",1287- "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.2.2.tgz",1288- "integrity": "sha512-VtjHPAKJqLJoHHKBDNofzvQB2+ZVxjXU/Gw6INAS9aINLQYVsxfzrQ2s84huCeYWZRTtrr7R0J7XgpZHjNwBCw==",1330+ "version": "5.3.3",1331+ "resolved": "https://registry.npmjs.org/@tsd/typescript/-/typescript-5.3.3.tgz",1332+ "integrity": "sha512-CQlfzol0ldaU+ftWuG52vH29uRoKboLinLy84wS8TQOu+m+tWoaUfk4svL4ij2V8M5284KymJBlHUusKj6k34w==",1333 "dev": true,1334 "engines": {1335 "node": ">=14.17"1336 }1337 },1338 "node_modules/@types/babel__core": {1295- "version": "7.20.2",1296- "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.2.tgz",1297- "integrity": "sha512-pNpr1T1xLUc2l3xJKuPtsEky3ybxN3m4fJkknfIpTCTfIZCDW57oAg+EfCgIIp2rvCe0Wn++/FfodDS4YXxBwA==",1339+ "version": "7.20.5",1340+ "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz",1341+ "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==",1342 "dev": true,1343 "dependencies": {1344 "@babel/parser": "^7.20.7",1345 "@babel/types": "^7.20.7",2 unmodified lines1348 "@types/babel__traverse": "*"1349 }1350 },1351 "node_modules/@types/babel__generator": {1308- "version": "7.6.5",1309- "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.5.tgz",1310- "integrity": "sha512-h9yIuWbJKdOPLJTbmSpPzkF67e659PbQDba7ifWm5BJ8xTv+sDmS7rFmywkWOvXedGTivCdeGSIIX8WLcRTz8w==",1352+ "version": "7.6.8",1353+ "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.6.8.tgz",1354+ "integrity": "sha512-ASsj+tpEDsEiFr1arWrlN6V3mdfjRMZt6LtK/Vp/kreFLnr5QH5+DhvD5nINYZXzwJvXeGq+05iUXcAzVrqWtw==",1355 "dev": true,1356 "dependencies": {1357 "@babel/types": "^7.0.0"1358 }1359 },1360 "node_modules/@types/babel__template": {1317- "version": "7.4.2",1318- "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.2.tgz",1319- "integrity": "sha512-/AVzPICMhMOMYoSx9MoKpGDKdBRsIXMNByh1PXSZoa+v6ZoLa8xxtsT/uLQ/NJm0XVAWl/BvId4MlDeXJaeIZQ==",1361+ "version": "7.4.4",1362+ "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz",1363+ "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==",1364 "dev": true,1365 "dependencies": {1366 "@babel/parser": "^7.1.0",1367 "@babel/types": "^7.0.0"1368 }1369 },1370 "node_modules/@types/babel__traverse": {1327- "version": "7.20.2",1328- "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.2.tgz",1329- "integrity": "sha512-ojlGK1Hsfce93J0+kn3H5R73elidKUaZonirN33GSmgTUMpzI/MIFfSpF3haANe3G1bEBS9/9/QEqwTzwqFsKw==",1371+ "version": "7.20.5",1372+ "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.20.5.tgz",1373+ "integrity": "sha512-WXCyOcRtH37HAUkpXhUduaxdm82b4GSlyTqajXviN4EfiuPgNYR109xMCKvpl6zPIpua0DGlMEDCq+g8EdoheQ==",1374 "dev": true,1375 "dependencies": {1376 "@babel/types": "^7.20.7"1377 }8 unmodified lines1386 "@types/json-schema": "*"1387 }1388 },1389 "node_modules/@types/estree": {1346- "version": "1.0.2",1347- "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.2.tgz",1348- "integrity": "sha512-VeiPZ9MMwXjO32/Xu7+OwflfmeoRwkE/qzndw42gGtgJwZopBnzy2gD//NN1+go1mADzkDcqf/KnFRSjTJ8xJA==",1390+ "version": "1.0.5",1391+ "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz",1392+ "integrity": "sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==",1393 "dev": true1394 },1395 "node_modules/@types/graceful-fs": {1352- "version": "4.1.7",1353- "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.7.tgz",1354- "integrity": "sha512-MhzcwU8aUygZroVwL2jeYk6JisJrPl/oov/gsgGCue9mkgl9wjGbzReYQClxiUgFDnib9FuHqTndccKeZKxTRw==",1396+ "version": "4.1.9",1397+ "resolved": "https://registry.npmjs.org/@types/graceful-fs/-/graceful-fs-4.1.9.tgz",1398+ "integrity": "sha512-olP3sd1qOEe5dXTSaFvQG+02VdRXcdytWLAZsAq1PecU8uqQAhkrnbli7DagjtXKW/Bl7YJbUsa8MPcuc8LHEQ==",1399 "dev": true,1400 "dependencies": {1401 "@types/node": "*"1402 }1403 },1404 "node_modules/@types/istanbul-lib-coverage": {1361- "version": "2.0.4",1362- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.4.tgz",1363- "integrity": "sha512-z/QT1XN4K4KYuslS23k62yDIDLwLFkzxOuMplDtObz0+y7VqJCaO2o+SPwHCvLFZh7xazvvoor2tA/hPz9ee7g==",1405+ "version": "2.0.6",1406+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-coverage/-/istanbul-lib-coverage-2.0.6.tgz",1407+ "integrity": "sha512-2QF/t/auWm0lsy8XtKVPG19v3sSOQlJe/YHZgfjb/KBBHOGSV+J2q/S671rcq9uTBrLAXmZpqJiaQbMT+zNU1w==",1408 "dev": true1409 },1410 "node_modules/@types/istanbul-lib-report": {1367- "version": "3.0.1",1368- "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.1.tgz",1369- "integrity": "sha512-gPQuzaPR5h/djlAv2apEG1HVOyj1IUs7GpfMZixU0/0KXT3pm64ylHuMUI1/Akh+sq/iikxg6Z2j+fcMDXaaTQ==",1411+ "version": "3.0.3",1412+ "resolved": "https://registry.npmjs.org/@types/istanbul-lib-report/-/istanbul-lib-report-3.0.3.tgz",1413+ "integrity": "sha512-NQn7AHQnk/RSLOxrBbGyJM/aVQ+pjj5HCgasFxc0K/KhoATfQ/47AyUl15I2yBUpihjmas+a+VJBOqecrFH+uA==",1414 "dev": true,1415 "dependencies": {1416 "@types/istanbul-lib-coverage": "*"1417 }1418 },1419 "node_modules/@types/istanbul-reports": {1376- "version": "3.0.2",1377- "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.2.tgz",1378- "integrity": "sha512-kv43F9eb3Lhj+lr/Hn6OcLCs/sSM8bt+fIaP11rCYngfV6NVjzWXJ17owQtDQTL9tQ8WSLUrGsSJ6rJz0F1w1A==",1420+ "version": "3.0.4",1421+ "resolved": "https://registry.npmjs.org/@types/istanbul-reports/-/istanbul-reports-3.0.4.tgz",1422+ "integrity": "sha512-pk2B1NWalF9toCRu6gjBzR69syFjP4Od8WRAX+0mmf9lAjCRicLOWc+ZrxZHx/0XRjotgkF9t6iaMJ+aXcOdZQ==",1423 "dev": true,1424 "dependencies": {1425 "@types/istanbul-lib-report": "*"1426 }8 unmodified lines1435 "pretty-format": "^29.0.0"1436 }1437 },1438 "node_modules/@types/json-schema": {1395- "version": "7.0.13",1396- "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.13.tgz",1397- "integrity": "sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ==",1439+ "version": "7.0.15",1440+ "resolved": "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz",1441+ "integrity": "sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==",1442 "dev": true1443 },1444 "node_modules/@types/json5": {1445 "version": "0.0.29",1 unmodified line1447 "integrity": "sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ==",1448 "dev": true1449 },1450 "node_modules/@types/minimist": {1407- "version": "1.2.3",1408- "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.3.tgz",1409- "integrity": "sha512-ZYFzrvyWUNhaPomn80dsMNgMeXxNWZBdkuG/hWlUvXvbdUH8ZERNBGXnU87McuGcWDsyzX2aChCv/SVN348k3A==",1451+ "version": "1.2.5",1452+ "resolved": "https://registry.npmjs.org/@types/minimist/-/minimist-1.2.5.tgz",1453+ "integrity": "sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==",1454 "dev": true1455 },1456 "node_modules/@types/node": {1413- "version": "20.9.0",1414- "resolved": "https://registry.npmjs.org/@types/node/-/node-20.9.0.tgz",1415- "integrity": "sha512-nekiGu2NDb1BcVofVcEKMIwzlx4NjHlcjhoxxKBNLtz15Y1z7MYf549DFvkHSId02Ax6kGwWntIBPC3l/JZcmw==",1457+ "version": "20.11.7",1458+ "resolved": "https://registry.npmjs.org/@types/node/-/node-20.11.7.tgz",1459+ "integrity": "sha512-GPmeN1C3XAyV5uybAf4cMLWT9fDWcmQhZVtMFu7OR32WjrqGG+Wnk2V1d0bmtUyE/Zy1QJ9BxyiTih9z8Oks8A==",1460 "dev": true,1461 "dependencies": {1462 "undici-types": "~5.26.4"1463 }1464 },1465 "node_modules/@types/normalize-package-data": {1422- "version": "2.4.2",1423- "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.2.tgz",1424- "integrity": "sha512-lqa4UEhhv/2sjjIQgjX8B+RBjj47eo0mzGasklVJ78UKGQY1r0VpB9XHDaZZO9qzEFDdy4MrXLuEaSmPrPSe/A==",1466+ "version": "2.4.4",1467+ "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz",1468+ "integrity": "sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==",1469 "dev": true1470 },1471 "node_modules/@types/semver": {1428- "version": "7.5.3",1429- "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.3.tgz",1430- "integrity": "sha512-OxepLK9EuNEIPxWNME+C6WwbRAOOI2o2BaQEGzz5Lu2e4Z5eDnEo+/aVEDMIXywoJitJ7xWd641wrGLZdtwRyw==",1472+ "version": "7.5.6",1473+ "resolved": "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz",1474+ "integrity": "sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==",1475 "dev": true1476 },1477 "node_modules/@types/stack-utils": {1434- "version": "2.0.1",1435- "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.1.tgz",1436- "integrity": "sha512-Hl219/BT5fLAaz6NDkSuhzasy49dwQS/DSdu4MdggFB8zcXv7vflBI3xp7FEmkmdDkBUI2bPUNeMttp2knYdxw==",1478+ "version": "2.0.3",1479+ "resolved": "https://registry.npmjs.org/@types/stack-utils/-/stack-utils-2.0.3.tgz",1480+ "integrity": "sha512-9aEbYZ3TbYMznPdcdr3SmIrLXwC/AKZXQeCf9Pgao5CKb8CyHuEX5jzWPTkvregvhRJHcpRO6BFoGW9ycaOkYw==",1481 "dev": true1482 },1483 "node_modules/@types/yargs": {1440- "version": "17.0.28",1441- "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.28.tgz",1442- "integrity": "sha512-N3e3fkS86hNhtk6BEnc0rj3zcehaxx8QWhCROJkqpl5Zaoi7nAic3jH8q94jVD3zu5LGk+PUB6KAiDmimYOEQw==",1484+ "version": "17.0.32",1485+ "resolved": "https://registry.npmjs.org/@types/yargs/-/yargs-17.0.32.tgz",1486+ "integrity": "sha512-xQ67Yc/laOG5uMfX/093MRlGGCIBzZMarVa+gfNKJxWAIgykYpVGkBdbqEzGDDfCrVUj6Hiff4mTZ5BA6TmAog==",1487 "dev": true,1488 "dependencies": {1489 "@types/yargs-parser": "*"1490 }1491 },1492 "node_modules/@types/yargs-parser": {1449- "version": "21.0.1",1450- "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.1.tgz",1451- "integrity": "sha512-axdPBuLuEJt0c4yI5OZssC19K2Mq1uKdrfZBzuxLvaztgqUtFYZUNw7lETExPYJR9jdEoIg4mb7RQKRQzOkeGQ==",1493+ "version": "21.0.3",1494+ "resolved": "https://registry.npmjs.org/@types/yargs-parser/-/yargs-parser-21.0.3.tgz",1495+ "integrity": "sha512-I4q9QU9MQv4oEOz4tAHJtNz1cwuLxn2F3xcc2iV5WdqLPpUnj30aUuxt1mAxYTG+oe8CZMV/+6rU4S4gRDzqtQ==",1496 "dev": true1497 },1498 "node_modules/@typescript-eslint/eslint-plugin": {1455- "version": "6.18.0",1456- "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.18.0.tgz",1457- "integrity": "sha512-3lqEvQUdCozi6d1mddWqd+kf8KxmGq2Plzx36BlkjuQe3rSTm/O98cLf0A4uDO+a5N1KD2SeEEl6fW97YHY+6w==",1499+ "version": "6.19.1",1500+ "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.19.1.tgz",1501+ "integrity": "sha512-roQScUGFruWod9CEyoV5KlCYrubC/fvG8/1zXuT0WTcxX87GnMMmnksMwSg99lo1xiKrBzw2icsJPMAw1OtKxg==",1502 "dev": true,1503 "dependencies": {1504 "@eslint-community/regexpp": "^4.5.1",1461- "@typescript-eslint/scope-manager": "6.18.0",1462- "@typescript-eslint/type-utils": "6.18.0",1463- "@typescript-eslint/utils": "6.18.0",1464- "@typescript-eslint/visitor-keys": "6.18.0",1505+ "@typescript-eslint/scope-manager": "6.19.1",1506+ "@typescript-eslint/type-utils": "6.19.1",1507+ "@typescript-eslint/utils": "6.19.1",1508+ "@typescript-eslint/visitor-keys": "6.19.1",1509 "debug": "^4.3.4",1510 "graphemer": "^1.4.0",1511 "ignore": "^5.2.4",1512 "natural-compare": "^1.4.0",17 unmodified lines1530 }1531 }1532 },1533 "node_modules/@typescript-eslint/parser": {1490- "version": "6.13.1",1491- "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.13.1.tgz",1492- "integrity": "sha512-fs2XOhWCzRhqMmQf0eicLa/CWSaYss2feXsy7xBD/pLyWke/jCIVc2s1ikEAtSW7ina1HNhv7kONoEfVNEcdDQ==",1534+ "version": "6.19.1",1535+ "resolved": "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.19.1.tgz",1536+ "integrity": "sha512-WEfX22ziAh6pRE9jnbkkLGp/4RhTpffr2ZK5bJ18M8mIfA8A+k97U9ZyaXCEJRlmMHh7R9MJZWXp/r73DzINVQ==",1537 "dev": true,1538 "dependencies": {1495- "@typescript-eslint/scope-manager": "6.13.1",1496- "@typescript-eslint/types": "6.13.1",1497- "@typescript-eslint/typescript-estree": "6.13.1",1498- "@typescript-eslint/visitor-keys": "6.13.1",1539+ "@typescript-eslint/scope-manager": "6.19.1",1540+ "@typescript-eslint/types": "6.19.1",1541+ "@typescript-eslint/typescript-estree": "6.19.1",1542+ "@typescript-eslint/visitor-keys": "6.19.1",1543 "debug": "^4.3.4"1544 },1545 "engines": {1546 "node": "^16.0.0 || >=18.0.0"10 unmodified lines1557 "optional": true1558 }1559 }1560 },1517- "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/scope-manager": {1518- "version": "6.13.1",1519- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.13.1.tgz",1520- "integrity": "sha512-BW0kJ7ceiKi56GbT2KKzZzN+nDxzQK2DS6x0PiSMPjciPgd/JRQGMibyaN2cPt2cAvuoH0oNvn2fwonHI+4QUQ==",1521- "dev": true,1522- "dependencies": {1523- "@typescript-eslint/types": "6.13.1",1524- "@typescript-eslint/visitor-keys": "6.13.1"1525- },1526- "engines": {1527- "node": "^16.0.0 || >=18.0.0"1528- },1529- "funding": {1530- "type": "opencollective",1531- "url": "https://opencollective.com/typescript-eslint"1532- }1533- },1534- "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/types": {1535- "version": "6.13.1",1536- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.13.1.tgz",1537- "integrity": "sha512-gjeEskSmiEKKFIbnhDXUyiqVma1gRCQNbVZ1C8q7Zjcxh3WZMbzWVfGE9rHfWd1msQtPS0BVD9Jz9jded44eKg==",1538- "dev": true,1539- "engines": {1540- "node": "^16.0.0 || >=18.0.0"1541- },1542- "funding": {1543- "type": "opencollective",1544- "url": "https://opencollective.com/typescript-eslint"1545- }1546- },1547- "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/typescript-estree": {1548- "version": "6.13.1",1549- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.13.1.tgz",1550- "integrity": "sha512-sBLQsvOC0Q7LGcUHO5qpG1HxRgePbT6wwqOiGLpR8uOJvPJbfs0mW3jPA3ujsDvfiVwVlWUDESNXv44KtINkUQ==",1551- "dev": true,1552- "dependencies": {1553- "@typescript-eslint/types": "6.13.1",1554- "@typescript-eslint/visitor-keys": "6.13.1",1555- "debug": "^4.3.4",1556- "globby": "^11.1.0",1557- "is-glob": "^4.0.3",1558- "semver": "^7.5.4",1559- "ts-api-utils": "^1.0.1"1560- },1561- "engines": {1562- "node": "^16.0.0 || >=18.0.0"1563- },1564- "funding": {1565- "type": "opencollective",1566- "url": "https://opencollective.com/typescript-eslint"1567- },1568- "peerDependenciesMeta": {1569- "typescript": {1570- "optional": true1571- }1572- }1573- },1574- "node_modules/@typescript-eslint/parser/node_modules/@typescript-eslint/visitor-keys": {1575- "version": "6.13.1",1576- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.13.1.tgz",1577- "integrity": "sha512-NDhQUy2tg6XGNBGDRm1XybOHSia8mcXmlbKWoQP+nm1BIIMxa55shyJfZkHpEBN62KNPLrocSM2PdPcaLgDKMQ==",1578- "dev": true,1579- "dependencies": {1580- "@typescript-eslint/types": "6.13.1",1581- "eslint-visitor-keys": "^3.4.1"1582- },1583- "engines": {1584- "node": "^16.0.0 || >=18.0.0"1585- },1586- "funding": {1587- "type": "opencollective",1588- "url": "https://opencollective.com/typescript-eslint"1589- }1590- },1561 "node_modules/@typescript-eslint/scope-manager": {1592- "version": "6.18.0",1593- "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.18.0.tgz",1594- "integrity": "sha512-o/UoDT2NgOJ2VfHpfr+KBY2ErWvCySNUIX/X7O9g8Zzt/tXdpfEU43qbNk8LVuWUT2E0ptzTWXh79i74PP0twA==",1562+ "version": "6.19.1",1563+ "resolved": "https://registry.npmjs.org/@typescript-eslint/scope-manager/-/scope-manager-6.19.1.tgz",1564+ "integrity": "sha512-4CdXYjKf6/6aKNMSly/BP4iCSOpvMmqtDzRtqFyyAae3z5kkqEjKndR5vDHL8rSuMIIWP8u4Mw4VxLyxZW6D5w==",1565 "dev": true,1566 "dependencies": {1597- "@typescript-eslint/types": "6.18.0",1598- "@typescript-eslint/visitor-keys": "6.18.0"1567+ "@typescript-eslint/types": "6.19.1",1568+ "@typescript-eslint/visitor-keys": "6.19.1"1569 },1570 "engines": {1571 "node": "^16.0.0 || >=18.0.0"1572 },2 unmodified lines1575 "url": "https://opencollective.com/typescript-eslint"1576 }1577 },1578 "node_modules/@typescript-eslint/type-utils": {1609- "version": "6.18.0",1610- "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.18.0.tgz",1611- "integrity": "sha512-ZeMtrXnGmTcHciJN1+u2CigWEEXgy1ufoxtWcHORt5kGvpjjIlK9MUhzHm4RM8iVy6dqSaZA/6PVkX6+r+ChjQ==",1579+ "version": "6.19.1",1580+ "resolved": "https://registry.npmjs.org/@typescript-eslint/type-utils/-/type-utils-6.19.1.tgz",1581+ "integrity": "sha512-0vdyld3ecfxJuddDjACUvlAeYNrHP/pDeQk2pWBR2ESeEzQhg52DF53AbI9QCBkYE23lgkhLCZNkHn2hEXXYIg==",1582 "dev": true,1583 "dependencies": {1614- "@typescript-eslint/typescript-estree": "6.18.0",1615- "@typescript-eslint/utils": "6.18.0",1584+ "@typescript-eslint/typescript-estree": "6.19.1",1585+ "@typescript-eslint/utils": "6.19.1",1586 "debug": "^4.3.4",1587 "ts-api-utils": "^1.0.1"1588 },1589 "engines": {12 unmodified lines1602 }1603 }1604 },1605 "node_modules/@typescript-eslint/types": {1636- "version": "6.18.0",1637- "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.18.0.tgz",1638- "integrity": "sha512-/RFVIccwkwSdW/1zeMx3hADShWbgBxBnV/qSrex6607isYjj05t36P6LyONgqdUrNLl5TYU8NIKdHUYpFvExkA==",1606+ "version": "6.19.1",1607+ "resolved": "https://registry.npmjs.org/@typescript-eslint/types/-/types-6.19.1.tgz",1608+ "integrity": "sha512-6+bk6FEtBhvfYvpHsDgAL3uo4BfvnTnoge5LrrCj2eJN8g3IJdLTD4B/jK3Q6vo4Ql/Hoip9I8aB6fF+6RfDqg==",1609 "dev": true,1610 "engines": {1611 "node": "^16.0.0 || >=18.0.0"1612 },2 unmodified lines1615 "url": "https://opencollective.com/typescript-eslint"1616 }1617 },1618 "node_modules/@typescript-eslint/typescript-estree": {1649- "version": "6.18.0",1650- "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.18.0.tgz",1651- "integrity": "sha512-klNvl+Ql4NsBNGB4W9TZ2Od03lm7aGvTbs0wYaFYsplVPhr+oeXjlPZCDI4U9jgJIDK38W1FKhacCFzCC+nbIg==",1619+ "version": "6.19.1",1620+ "resolved": "https://registry.npmjs.org/@typescript-eslint/typescript-estree/-/typescript-estree-6.19.1.tgz",1621+ "integrity": "sha512-aFdAxuhzBFRWhy+H20nYu19+Km+gFfwNO4TEqyszkMcgBDYQjmPJ61erHxuT2ESJXhlhrO7I5EFIlZ+qGR8oVA==",1622 "dev": true,1623 "dependencies": {1654- "@typescript-eslint/types": "6.18.0",1655- "@typescript-eslint/visitor-keys": "6.18.0",1624+ "@typescript-eslint/types": "6.19.1",1625+ "@typescript-eslint/visitor-keys": "6.19.1",1626 "debug": "^4.3.4",1627 "globby": "^11.1.0",1628 "is-glob": "^4.0.3",1629 "minimatch": "9.0.3",12 unmodified lines1642 "optional": true1643 }1644 }1645 },1676- "node_modules/@typescript-eslint/typescript-estree/node_modules/brace-expansion": {1677- "version": "2.0.1",1678- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",1679- "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",1680- "dev": true,1681- "dependencies": {1682- "balanced-match": "^1.0.0"1683- }1684- },1685- "node_modules/@typescript-eslint/typescript-estree/node_modules/minimatch": {1686- "version": "9.0.3",1687- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",1688- "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",1689- "dev": true,1690- "dependencies": {1691- "brace-expansion": "^2.0.1"1692- },1693- "engines": {1694- "node": ">=16 || 14 >=14.17"1695- },1696- "funding": {1697- "url": "https://github.com/sponsors/isaacs"1698- }1699- },1646 "node_modules/@typescript-eslint/utils": {1701- "version": "6.18.0",1702- "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.18.0.tgz",1703- "integrity": "sha512-wiKKCbUeDPGaYEYQh1S580dGxJ/V9HI7K5sbGAVklyf+o5g3O+adnS4UNJajplF4e7z2q0uVBaTdT/yLb4XAVA==",1647+ "version": "6.19.1",1648+ "resolved": "https://registry.npmjs.org/@typescript-eslint/utils/-/utils-6.19.1.tgz",1649+ "integrity": "sha512-JvjfEZuP5WoMqwh9SPAPDSHSg9FBHHGhjPugSRxu5jMfjvBpq5/sGTD+9M9aQ5sh6iJ8AY/Kk/oUYVEMAPwi7w==",1650 "dev": true,1651 "dependencies": {1652 "@eslint-community/eslint-utils": "^4.4.0",1653 "@types/json-schema": "^7.0.12",1654 "@types/semver": "^7.5.0",1709- "@typescript-eslint/scope-manager": "6.18.0",1710- "@typescript-eslint/types": "6.18.0",1711- "@typescript-eslint/typescript-estree": "6.18.0",1655+ "@typescript-eslint/scope-manager": "6.19.1",1656+ "@typescript-eslint/types": "6.19.1",1657+ "@typescript-eslint/typescript-estree": "6.19.1",1658 "semver": "^7.5.4"1659 },1660 "engines": {1661 "node": "^16.0.0 || >=18.0.0"6 unmodified lines1668 "eslint": "^7.0.0 || ^8.0.0"1669 }1670 },1671 "node_modules/@typescript-eslint/visitor-keys": {1726- "version": "6.18.0",1727- "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.18.0.tgz",1728- "integrity": "sha512-1wetAlSZpewRDb2h9p/Q8kRjdGuqdTAQbkJIOUMLug2LBLG+QOjiWoSj6/3B/hA9/tVTFFdtiKvAYoYnSRW/RA==",1672+ "version": "6.19.1",1673+ "resolved": "https://registry.npmjs.org/@typescript-eslint/visitor-keys/-/visitor-keys-6.19.1.tgz",1674+ "integrity": "sha512-gkdtIO+xSO/SmI0W68DBg4u1KElmIUo3vXzgHyGPs6cxgB0sa3TlptRAAE0hUY1hM6FcDKEv7aIwiTGm76cXfQ==",1675 "dev": true,1676 "dependencies": {1731- "@typescript-eslint/types": "6.18.0",1677+ "@typescript-eslint/types": "6.19.1",1678 "eslint-visitor-keys": "^3.4.1"1679 },1680 "engines": {1681 "node": "^16.0.0 || >=18.0.0"376 unmodified lines2058 "integrity": "sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==",2059 "dev": true2060 },2061 "node_modules/brace-expansion": {2116- "version": "1.1.11",2117- "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",2118- "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",2062+ "version": "2.0.1",2063+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-2.0.1.tgz",2064+ "integrity": "sha512-XnAIvQ8eM+kC6aULx6wuQiwVsnzsi9d3WxzV3FpWTGA19F621kwdbsAcFKXgKUHZWsy+mY6iL1sHTxWEFCytDA==",2065 "dev": true,2066 "dependencies": {2121- "balanced-match": "^1.0.0",2122- "concat-map": "0.0.1"2067+ "balanced-match": "^1.0.0"2068 }2069 },2070 "node_modules/braces": {2071 "version": "3.0.2",7 unmodified lines2079 "node": ">=8"2080 }2081 },2082 "node_modules/browserslist": {2138- "version": "4.22.1",2139- "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.1.tgz",2140- "integrity": "sha512-FEVc202+2iuClEhZhrWy6ZiAcRLvNMyYcxZ8raemul1DYVOVdFsbqckWLdsixQZCpJlwe77Z3UTalE7jsjnKfQ==",2083+ "version": "4.22.3",2084+ "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.22.3.tgz",2085+ "integrity": "sha512-UAp55yfwNv0klWNapjs/ktHoguxuQNGnOzxYmfnXIS+8AsRDZkSDxg7R1AX3GKzn078SBI5dzwzj/Yx0Or0e3A==",2086 "dev": true,2087 "funding": [2088 {2089 "type": "opencollective",8 unmodified lines2098 "url": "https://github.com/sponsors/ai"2099 }2100 ],2101 "dependencies": {2157- "caniuse-lite": "^1.0.30001541",2158- "electron-to-chromium": "^1.4.535",2159- "node-releases": "^2.0.13",2102+ "caniuse-lite": "^1.0.30001580",2103+ "electron-to-chromium": "^1.4.648",2104+ "node-releases": "^2.0.14",2105 "update-browserslist-db": "^1.0.13"2106 },2107 "bin": {2108 "browserslist": "cli.js"50 unmodified lines2159 "semver": "^7.0.0"2160 }2161 },2162 "node_modules/call-bind": {2218- "version": "1.0.2",2219- "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.2.tgz",2220- "integrity": "sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA==",2163+ "version": "1.0.5",2164+ "resolved": "https://registry.npmjs.org/call-bind/-/call-bind-1.0.5.tgz",2165+ "integrity": "sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==",2166 "dev": true,2167 "dependencies": {2223- "function-bind": "^1.1.1",2224- "get-intrinsic": "^1.0.2"2168+ "function-bind": "^1.1.2",2169+ "get-intrinsic": "^1.2.1",2170+ "set-function-length": "^1.1.1"2171 },2172 "funding": {2173 "url": "https://github.com/sponsors/ljharb"2174 }33 unmodified lines2208 "url": "https://github.com/sponsors/sindresorhus"2209 }2210 },2211 "node_modules/caniuse-lite": {2266- "version": "1.0.30001549",2267- "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001549.tgz",2268- "integrity": "sha512-qRp48dPYSCYaP+KurZLhDYdVE+yEyht/3NlmcJgVQ2VMGt6JL36ndQ/7rgspdZsJuxDPFIo/OzBT2+GmIJ53BA==",2212+ "version": "1.0.30001580",2213+ "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001580.tgz",2214+ "integrity": "sha512-mtj5ur2FFPZcCEpXFy8ADXbDACuNFXg6mxVDqp7tqooX6l3zwm+d8EPoeOSIFRDvHs8qu7/SLFOGniULkcH2iA==",2215 "dev": true,2216 "funding": [2217 {2218 "type": "opencollective",303 unmodified lines2522 "node": ">=6.0.0"2523 }2524 },2525 "node_modules/electron-to-chromium": {2580- "version": "1.4.554",2581- "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.554.tgz",2582- "integrity": "sha512-Q0umzPJjfBrrj8unkONTgbKQXzXRrH7sVV7D9ea2yBV3Oaogz991yhbpfvo2LMNkJItmruXTEzVpP9cp7vaIiQ==",2526+ "version": "1.4.648",2527+ "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.648.tgz",2528+ "integrity": "sha512-EmFMarXeqJp9cUKu/QEciEApn0S/xRcpZWuAm32U7NgoZCimjsilKXHRO9saeEW55eHZagIDg6XTUOv32w9pjg==",2529 "dev": true2530 },2531 "node_modules/emittery": {2532 "version": "0.13.1",22 unmodified lines2555 "is-arrayish": "^0.2.1"2556 }2557 },2558 "node_modules/es-abstract": {2613- "version": "1.22.2",2614- "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.2.tgz",2615- "integrity": "sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA==",2559+ "version": "1.22.3",2560+ "resolved": "https://registry.npmjs.org/es-abstract/-/es-abstract-1.22.3.tgz",2561+ "integrity": "sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==",2562 "dev": true,2563 "dependencies": {2564 "array-buffer-byte-length": "^1.0.0",2565 "arraybuffer.prototype.slice": "^1.0.2",2566 "available-typed-arrays": "^1.0.5",2621- "call-bind": "^1.0.2",2567+ "call-bind": "^1.0.5",2568 "es-set-tostringtag": "^2.0.1",2569 "es-to-primitive": "^1.2.1",2570 "function.prototype.name": "^1.1.6",2625- "get-intrinsic": "^1.2.1",2571+ "get-intrinsic": "^1.2.2",2572 "get-symbol-description": "^1.0.0",2573 "globalthis": "^1.0.3",2574 "gopd": "^1.0.1",2629- "has": "^1.0.3",2575 "has-property-descriptors": "^1.0.0",2576 "has-proto": "^1.0.1",2577 "has-symbols": "^1.0.3",2578+ "hasown": "^2.0.0",2579 "internal-slot": "^1.0.5",2580 "is-array-buffer": "^3.0.2",2581 "is-callable": "^1.2.7",2582 "is-negative-zero": "^2.0.2",1 unmodified line2584 "is-shared-array-buffer": "^1.0.2",2585 "is-string": "^1.0.7",2586 "is-typed-array": "^1.1.12",2587 "is-weakref": "^1.0.2",2642- "object-inspect": "^1.12.3",2588+ "object-inspect": "^1.13.1",2589 "object-keys": "^1.1.1",2590 "object.assign": "^4.1.4",2591 "regexp.prototype.flags": "^1.5.1",2592 "safe-array-concat": "^1.0.1",5 unmodified lines2598 "typed-array-byte-length": "^1.0.0",2599 "typed-array-byte-offset": "^1.0.0",2600 "typed-array-length": "^1.0.4",2601 "unbox-primitive": "^1.0.2",2656- "which-typed-array": "^1.1.11"2602+ "which-typed-array": "^1.1.13"2603 },2604 "engines": {2605 "node": ">= 0.4"2606 },1 unmodified line2608 "url": "https://github.com/sponsors/ljharb"2609 }2610 },2611 "node_modules/es-set-tostringtag": {2666- "version": "2.0.1",2667- "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz",2668- "integrity": "sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg==",2612+ "version": "2.0.2",2613+ "resolved": "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz",2614+ "integrity": "sha512-BuDyupZt65P9D2D2vA/zqcI3G5xRsklm5N3xCwuiy+/vKy8i0ifdsQP1sLgO4tZDSCaQUSnmC48khknGMV3D2Q==",2615 "dev": true,2616 "dependencies": {2671- "get-intrinsic": "^1.1.3",2672- "has": "^1.0.3",2673- "has-tostringtag": "^1.0.0"2617+ "get-intrinsic": "^1.2.2",2618+ "has-tostringtag": "^1.0.0",2619+ "hasown": "^2.0.0"2620 },2621 "engines": {2622 "node": ">= 0.4"2623 }2624 },2625 "node_modules/es-shim-unscopables": {2680- "version": "1.0.0",2681- "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz",2682- "integrity": "sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w==",2626+ "version": "1.0.2",2627+ "resolved": "https://registry.npmjs.org/es-shim-unscopables/-/es-shim-unscopables-1.0.2.tgz",2628+ "integrity": "sha512-J3yBRXCzDu4ULnQwxyToo/OjdMx6akgVC7K6few0a7F/0wLtmKKN7I73AH5T2836UuXRqN7Qg+IIUw/+YJksRw==",2629 "dev": true,2630 "dependencies": {2685- "has": "^1.0.3"2631+ "hasown": "^2.0.0"2632 }2633 },2634 "node_modules/es-to-primitive": {2635 "version": "1.2.1",87 unmodified lines2723 "funding": {2724 "url": "https://opencollective.com/eslint"2725 }2726 },2727+ "node_modules/eslint-compat-utils": {2728+ "version": "0.1.2",2729+ "resolved": "https://registry.npmjs.org/eslint-compat-utils/-/eslint-compat-utils-0.1.2.tgz",2730+ "integrity": "sha512-Jia4JDldWnFNIru1Ehx1H5s9/yxiRHY/TimCuUc0jNexew3cF1gI6CYZil1ociakfWO3rRqFjl1mskBblB3RYg==",2731+ "dev": true,2732+ "engines": {2733+ "node": ">=12"2734+ },2735+ "peerDependencies": {2736+ "eslint": ">=6.0.0"2737+ }2738+ },2739 "node_modules/eslint-config-standard": {2740 "version": "17.1.0",2741 "resolved": "https://registry.npmjs.org/eslint-config-standard/-/eslint-config-standard-17.1.0.tgz",2742 "integrity": "sha512-IwHwmaBNtDK4zDHQukFDW5u/aTb8+meQWZvNFWkiGmbWjD6bqyuSSBxxXKkCftCUzc1zwCH2m/baCNDLGmuO5Q==",108 unmodified lines2851 "ms": "^2.1.1"2852 }2853 },2854 "node_modules/eslint-plugin-es-x": {2897- "version": "7.2.0",2898- "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.2.0.tgz",2899- "integrity": "sha512-9dvv5CcvNjSJPqnS5uZkqb3xmbeqRLnvXKK7iI5+oK/yTusyc46zbBZKENGsOfojm/mKfszyZb+wNqNPAPeGXA==",2855+ "version": "7.5.0",2856+ "resolved": "https://registry.npmjs.org/eslint-plugin-es-x/-/eslint-plugin-es-x-7.5.0.tgz",2857+ "integrity": "sha512-ODswlDSO0HJDzXU0XvgZ3lF3lS3XAZEossh15Q2UHjwrJggWeBoKqqEsLTZLXl+dh5eOAozG0zRcYtuE35oTuQ==",2858 "dev": true,2859 "dependencies": {2860 "@eslint-community/eslint-utils": "^4.1.2",2903- "@eslint-community/regexpp": "^4.6.0"2861+ "@eslint-community/regexpp": "^4.6.0",2862+ "eslint-compat-utils": "^0.1.2"2863 },2864 "engines": {2865 "node": "^14.18.0 || >=16.0.0"2866 },4 unmodified lines2871 "eslint": ">=8"2872 }2873 },2874 "node_modules/eslint-plugin-import": {2916- "version": "2.29.0",2917- "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.0.tgz",2918- "integrity": "sha512-QPOO5NO6Odv5lpoTkddtutccQjysJuFxoPS7fAHO+9m9udNHvTCPSAMW9zGAYj8lAIdr40I8yPCdUYrncXtrwg==",2875+ "version": "2.29.1",2876+ "resolved": "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.29.1.tgz",2877+ "integrity": "sha512-BbPC0cuExzhiMo4Ff1BTVwHpjjv28C5R+btTOGaCRC7UEz801up0JadwkeSk5Ued6TG34uaczuVuH6qyy5YUxw==",2878 "dev": true,2879 "dependencies": {2880 "array-includes": "^3.1.7",2881 "array.prototype.findlastindex": "^1.2.3",10 unmodified lines2892 "object.fromentries": "^2.0.7",2893 "object.groupby": "^1.0.1",2894 "object.values": "^1.1.7",2895 "semver": "^6.3.1",2937- "tsconfig-paths": "^3.14.2"2896+ "tsconfig-paths": "^3.15.0"2897 },2898 "engines": {2899 "node": ">=4"2900 },2901 "peerDependencies": {2902 "eslint": "^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8"2903 }2904 },2905+ "node_modules/eslint-plugin-import/node_modules/brace-expansion": {2906+ "version": "1.1.11",2907+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",2908+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",2909+ "dev": true,2910+ "dependencies": {2911+ "balanced-match": "^1.0.0",2912+ "concat-map": "0.0.1"2913+ }2914+ },2915 "node_modules/eslint-plugin-import/node_modules/debug": {2916 "version": "3.2.7",2917 "resolved": "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz",2918 "integrity": "sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ==",13 unmodified lines2932 "engines": {2933 "node": ">=0.10.0"2934 }2935 },2936+ "node_modules/eslint-plugin-import/node_modules/minimatch": {2937+ "version": "3.1.2",2938+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",2939+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",2940+ "dev": true,2941+ "dependencies": {2942+ "brace-expansion": "^1.1.7"2943+ },2944+ "engines": {2945+ "node": "*"2946+ }2947+ },2948 "node_modules/eslint-plugin-import/node_modules/semver": {2949 "version": "6.3.1",2950 "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz",2951 "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==",2 unmodified lines2954 "semver": "bin/semver.js"2955 }2956 },2957 "node_modules/eslint-plugin-jest": {2977- "version": "27.6.0",2978- "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.0.tgz",2979- "integrity": "sha512-MTlusnnDMChbElsszJvrwD1dN3x6nZl//s4JD23BxB6MgR66TZlL064su24xEIS3VACfAoHV1vgyMgPw8nkdng==",2958+ "version": "27.6.3",2959+ "resolved": "https://registry.npmjs.org/eslint-plugin-jest/-/eslint-plugin-jest-27.6.3.tgz",2960+ "integrity": "sha512-+YsJFVH6R+tOiO3gCJon5oqn4KWc+mDq2leudk8mrp8RFubLOo9CVyi3cib4L7XMpxExmkmBZQTPDYVBzgpgOA==",2961 "dev": true,2962 "dependencies": {2963 "@typescript-eslint/utils": "^5.10.0"2964 },136 unmodified lines3101 "node": ">=4.0"3102 }3103 },3104 "node_modules/eslint-plugin-n": {3124- "version": "16.3.1",3125- "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.3.1.tgz",3126- "integrity": "sha512-w46eDIkxQ2FaTHcey7G40eD+FhTXOdKudDXPUO2n9WNcslze/i/HT2qJ3GXjHngYSGDISIgPNhwGtgoix4zeOw==",3105+ "version": "16.6.2",3106+ "resolved": "https://registry.npmjs.org/eslint-plugin-n/-/eslint-plugin-n-16.6.2.tgz",3107+ "integrity": "sha512-6TyDmZ1HXoFQXnhCTUjVFULReoBPOAjpuiKELMkeP40yffI/1ZRO+d9ug/VC6fqISo2WkuIBk3cvuRPALaWlOQ==",3108 "dev": true,3109 "dependencies": {3110 "@eslint-community/eslint-utils": "^4.4.0",3111 "builtins": "^5.0.1",3131- "eslint-plugin-es-x": "^7.1.0",3112+ "eslint-plugin-es-x": "^7.5.0",3113 "get-tsconfig": "^4.7.0",3114+ "globals": "^13.24.0",3115 "ignore": "^5.2.4",3116 "is-builtin-module": "^3.2.1",3117 "is-core-module": "^2.12.1",3118 "minimatch": "^3.1.2",9 unmodified lines3128 "peerDependencies": {3129 "eslint": ">=7.0.0"3130 }3131 },3132+ "node_modules/eslint-plugin-n/node_modules/brace-expansion": {3133+ "version": "1.1.11",3134+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",3135+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",3136+ "dev": true,3137+ "dependencies": {3138+ "balanced-match": "^1.0.0",3139+ "concat-map": "0.0.1"3140+ }3141+ },3142+ "node_modules/eslint-plugin-n/node_modules/minimatch": {3143+ "version": "3.1.2",3144+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",3145+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",3146+ "dev": true,3147+ "dependencies": {3148+ "brace-expansion": "^1.1.7"3149+ },3150+ "engines": {3151+ "node": "*"3152+ }3153+ },3154 "node_modules/eslint-plugin-promise": {3155 "version": "6.1.1",3156 "resolved": "https://registry.npmjs.org/eslint-plugin-promise/-/eslint-plugin-promise-6.1.1.tgz",3157 "integrity": "sha512-tjqWDwVZQo7UIPMeDReOpUgHCmCiH+ePnVT+5zVapL0uuHnegBUs2smM13CzOs2Xb5+MHMRFTs9v24yjba4Oig==",38 unmodified lines3196 "funding": {3197 "url": "https://opencollective.com/eslint"3198 }3199 },3200+ "node_modules/eslint/node_modules/brace-expansion": {3201+ "version": "1.1.11",3202+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",3203+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",3204+ "dev": true,3205+ "dependencies": {3206+ "balanced-match": "^1.0.0",3207+ "concat-map": "0.0.1"3208+ }3209+ },3210+ "node_modules/eslint/node_modules/minimatch": {3211+ "version": "3.1.2",3212+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",3213+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",3214+ "dev": true,3215+ "dependencies": {3216+ "brace-expansion": "^1.1.7"3217+ },3218+ "engines": {3219+ "node": "*"3220+ }3221+ },3222 "node_modules/espree": {3223 "version": "9.6.1",3224 "resolved": "https://registry.npmjs.org/espree/-/espree-9.6.1.tgz",3225 "integrity": "sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ==",119 unmodified lines3345 "integrity": "sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==",3346 "dev": true3347 },3348 "node_modules/fast-glob": {3323- "version": "3.3.1",3324- "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.1.tgz",3325- "integrity": "sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg==",3349+ "version": "3.3.2",3350+ "resolved": "https://registry.npmjs.org/fast-glob/-/fast-glob-3.3.2.tgz",3351+ "integrity": "sha512-oX2ruAFQwf/Orj8m737Y5adxDQO0LAB7/S5MnxCdTNDd4p6BsyIVsv9JQsATbTSq8KHRpLwIHbVlUNatxd+1Ow==",3352 "dev": true,3353 "dependencies": {3354 "@nodelib/fs.stat": "^2.0.2",3355 "@nodelib/fs.walk": "^1.2.3",29 unmodified lines3385 "integrity": "sha512-DCXu6Ifhqcks7TZKY3Hxp3y6qphY5SJZmrWMDrKcERSOXWQdMhU9Ig/PYrzyw/ul9jOIyh0N4M0tbC5hodg8dw==",3386 "dev": true3387 },3388 "node_modules/fastq": {3363- "version": "1.15.0",3364- "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.15.0.tgz",3365- "integrity": "sha512-wBrocU2LCXXa+lWBt8RoIRD89Fi8OdABODa/kEnyeyjS5aZO5/GNvI5sEINADqP/h8M29UHTHUb53sUu5Ihqdw==",3389+ "version": "1.17.0",3390+ "resolved": "https://registry.npmjs.org/fastq/-/fastq-1.17.0.tgz",3391+ "integrity": "sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==",3392 "dev": true,3393 "dependencies": {3394 "reusify": "^1.0.4"3395 }47 unmodified lines3443 "url": "https://github.com/sponsors/sindresorhus"3444 }3445 },3446 "node_modules/flat-cache": {3421- "version": "3.1.1",3422- "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.1.1.tgz",3423- "integrity": "sha512-/qM2b3LUIaIgviBQovTLvijfyOQXPtSRnRK26ksj2J7rzPIecePUIpJsZ4T02Qg+xiAEKIs5K8dsHEd+VaKa/Q==",3447+ "version": "3.2.0",3448+ "resolved": "https://registry.npmjs.org/flat-cache/-/flat-cache-3.2.0.tgz",3449+ "integrity": "sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==",3450 "dev": true,3451 "dependencies": {3452 "flatted": "^3.2.9",3453 "keyv": "^4.5.3",3454 "rimraf": "^3.0.2"3455 },3456 "engines": {3431- "node": ">=12.0.0"3457+ "node": "^10.12.0 || >=12.0.0"3458 }3459 },3460 "node_modules/flatted": {3461 "version": "3.2.9",84 unmodified lines3546 "node": "6.* || 8.* || >= 10.*"3547 }3548 },3549 "node_modules/get-intrinsic": {3524- "version": "1.2.1",3525- "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.1.tgz",3526- "integrity": "sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw==",3550+ "version": "1.2.2",3551+ "resolved": "https://registry.npmjs.org/get-intrinsic/-/get-intrinsic-1.2.2.tgz",3552+ "integrity": "sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==",3553 "dev": true,3554 "dependencies": {3529- "function-bind": "^1.1.1",3530- "has": "^1.0.3",3555+ "function-bind": "^1.1.2",3556 "has-proto": "^1.0.1",3532- "has-symbols": "^1.0.3"3557+ "has-symbols": "^1.0.3",3558+ "hasown": "^2.0.0"3559 },3560 "funding": {3561 "url": "https://github.com/sponsors/ljharb"3562 }78 unmodified lines3641 "engines": {3642 "node": ">=10.13.0"3643 }3644 },3645+ "node_modules/glob/node_modules/brace-expansion": {3646+ "version": "1.1.11",3647+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",3648+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",3649+ "dev": true,3650+ "dependencies": {3651+ "balanced-match": "^1.0.0",3652+ "concat-map": "0.0.1"3653+ }3654+ },3655+ "node_modules/glob/node_modules/minimatch": {3656+ "version": "3.1.2",3657+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",3658+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",3659+ "dev": true,3660+ "dependencies": {3661+ "brace-expansion": "^1.1.7"3662+ },3663+ "engines": {3664+ "node": "*"3665+ }3666+ },3667 "node_modules/globals": {3668 "version": "13.24.0",3669 "resolved": "https://registry.npmjs.org/globals/-/globals-13.24.0.tgz",3670 "integrity": "sha512-AhO5QUcj8llrbG09iWhPU2B204J1xnPeL8kQmVorSsy+Sjj1sk8gIyh6cUocGmH4L0UuhAJy+hJMRA4mgA4mFQ==",75 unmodified lines3746 "engines": {3747 "node": ">=6"3748 }3749 },3702- "node_modules/has": {3703- "version": "1.0.4",3704- "resolved": "https://registry.npmjs.org/has/-/has-1.0.4.tgz",3705- "integrity": "sha512-qdSAmqLF6209RFj4VVItywPMbm3vWylknmB3nvNiUIs72xAimcM8nVYxYr7ncvZq5qzk9MKIZR8ijqD/1QuYjQ==",3706- "dev": true,3707- "engines": {3708- "node": ">= 0.4.0"3709- }3710- },3750 "node_modules/has-bigints": {3751 "version": "1.0.2",3752 "resolved": "https://registry.npmjs.org/has-bigints/-/has-bigints-1.0.2.tgz",3753 "integrity": "sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==",11 unmodified lines3765 "node": ">=8"3766 }3767 },3768 "node_modules/has-property-descriptors": {3730- "version": "1.0.0",3731- "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz",3732- "integrity": "sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ==",3769+ "version": "1.0.1",3770+ "resolved": "https://registry.npmjs.org/has-property-descriptors/-/has-property-descriptors-1.0.1.tgz",3771+ "integrity": "sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==",3772 "dev": true,3773 "dependencies": {3735- "get-intrinsic": "^1.1.1"3774+ "get-intrinsic": "^1.2.2"3775 },3776 "funding": {3777 "url": "https://github.com/sponsors/ljharb"3778 }94 unmodified lines3873 "node": ">=10.17.0"3874 }3875 },3876 "node_modules/ignore": {3838- "version": "5.2.4",3839- "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.2.4.tgz",3840- "integrity": "sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ==",3877+ "version": "5.3.0",3878+ "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.0.tgz",3879+ "integrity": "sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==",3880 "dev": true,3881 "engines": {3882 "node": ">= 4"3883 }67 unmodified lines3951 "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==",3952 "dev": true3953 },3954 "node_modules/internal-slot": {3916- "version": "1.0.5",3917- "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.5.tgz",3918- "integrity": "sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ==",3955+ "version": "1.0.6",3956+ "resolved": "https://registry.npmjs.org/internal-slot/-/internal-slot-1.0.6.tgz",3957+ "integrity": "sha512-Xj6dv+PsbtwyPpEflsejS+oIZxmMlV44zAhG479uYu89MsjcYOhCFnNyKrkJrihbsiasQyY0afoCl/9BLR65bg==",3958 "dev": true,3959 "dependencies": {3921- "get-intrinsic": "^1.2.0",3922- "has": "^1.0.3",3960+ "get-intrinsic": "^1.2.2",3961+ "hasown": "^2.0.0",3962 "side-channel": "^1.0.4"3963 },3964 "engines": {3965 "node": ">= 0.4"324 unmodified lines4290 "integrity": "sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==",4291 "dev": true4292 },4293 "node_modules/istanbul-lib-coverage": {4255- "version": "3.2.0",4256- "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.0.tgz",4257- "integrity": "sha512-eOeJ5BHCmHYvQK7xt9GkdHuzuCGS1Y6g9Gvnx3Ym33fz/HpLRYxiS0wHNr+m/MBC8B647Xt608vCDEvhl9c6Mw==",4294+ "version": "3.2.2",4295+ "resolved": "https://registry.npmjs.org/istanbul-lib-coverage/-/istanbul-lib-coverage-3.2.2.tgz",4296+ "integrity": "sha512-O8dpsF+r0WV/8MNRKfnmrtCWhuKjxrq2w+jpzBL5UZKTi2LeVWnWOmWRxFlesJONmc+wLAGvKQZEOanko0LFTg==",4297 "dev": true,4298 "engines": {4299 "node": ">=8"4300 }918 unmodified lines5219 "node": ">=4"5220 }5221 },5222 "node_modules/minimatch": {5184- "version": "3.1.2",5185- "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",5186- "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",5223+ "version": "9.0.3",5224+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-9.0.3.tgz",5225+ "integrity": "sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==",5226 "dev": true,5227 "dependencies": {5189- "brace-expansion": "^1.1.7"5228+ "brace-expansion": "^2.0.1"5229 },5230 "engines": {5192- "node": "*"5231+ "node": ">=16 || 14 >=14.17"5232+ },5233+ "funding": {5234+ "url": "https://github.com/sponsors/isaacs"5235 }5236 },5237 "node_modules/minimist": {5238 "version": "1.2.8",36 unmodified lines5275 "integrity": "sha512-O5lz91xSOeoXP6DulyHfllpq+Eg00MWitZIbtPfoSEvqIHdl5gfcY6hYzDWnj0qD5tz52PI08u9qUvSVeUBeHw==",5276 "dev": true5277 },5278 "node_modules/node-releases": {5237- "version": "2.0.13",5238- "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.13.tgz",5239- "integrity": "sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ==",5279+ "version": "2.0.14",5280+ "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz",5281+ "integrity": "sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==",5282 "dev": true5283 },5284 "node_modules/normalize-package-data": {5285 "version": "3.0.3",31 unmodified lines5317 "node": ">=8"5318 }5319 },5320 "node_modules/object-inspect": {5279- "version": "1.13.0",5280- "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.0.tgz",5281- "integrity": "sha512-HQ4J+ic8hKrgIt3mqk6cVOVrW2ozL4KdvHlqpBv9vDYWx9ysAgENAdvy4FoGF+KFdhR7nQTNm5J0ctAeOwn+3g==",5321+ "version": "1.13.1",5322+ "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.1.tgz",5323+ "integrity": "sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==",5324 "dev": true,5325 "funding": {5326 "url": "https://github.com/sponsors/ljharb"5327 }7 unmodified lines5335 "node": ">= 0.4"5336 }5337 },5338 "node_modules/object.assign": {5297- "version": "4.1.4",5298- "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.4.tgz",5299- "integrity": "sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ==",5339+ "version": "4.1.5",5340+ "resolved": "https://registry.npmjs.org/object.assign/-/object.assign-4.1.5.tgz",5341+ "integrity": "sha512-byy+U7gp+FVwmyzKPYhW2h5l3crpmGsxl7X2s8y43IgxvG4g3QZ6CffDtsNQy1WsmZpQbO+ybo0AlW7TY6DcBQ==",5342 "dev": true,5343 "dependencies": {5302- "call-bind": "^1.0.2",5303- "define-properties": "^1.1.4",5344+ "call-bind": "^1.0.5",5345+ "define-properties": "^1.2.1",5346 "has-symbols": "^1.0.3",5347 "object-keys": "^1.1.1"5348 },5349 "engines": {696 unmodified lines6046 "queue-microtask": "^1.2.2"6047 }6048 },6049 "node_modules/safe-array-concat": {6008- "version": "1.0.1",6009- "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.0.1.tgz",6010- "integrity": "sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q==",6050+ "version": "1.1.0",6051+ "resolved": "https://registry.npmjs.org/safe-array-concat/-/safe-array-concat-1.1.0.tgz",6052+ "integrity": "sha512-ZdQ0Jeb9Ofti4hbt5lX3T2JcAamT9hfzYU1MNB+z/jaEbB6wfFfPIR/zEORmZqobkCCJhSjodobH6WHNmJ97dg==",6053 "dev": true,6054 "dependencies": {6013- "call-bind": "^1.0.2",6014- "get-intrinsic": "^1.2.1",6055+ "call-bind": "^1.0.5",6056+ "get-intrinsic": "^1.2.2",6057 "has-symbols": "^1.0.3",6058 "isarray": "^2.0.5"6059 },6060 "engines": {3 unmodified lines6064 "url": "https://github.com/sponsors/ljharb"6065 }6066 },6067 "node_modules/safe-regex-test": {6026- "version": "1.0.0",6027- "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.0.tgz",6028- "integrity": "sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA==",6068+ "version": "1.0.2",6069+ "resolved": "https://registry.npmjs.org/safe-regex-test/-/safe-regex-test-1.0.2.tgz",6070+ "integrity": "sha512-83S9w6eFq12BBIJYvjMux6/dkirb8+4zJRA9cxNBVb7Wq5fJBW+Xze48WqR8pxua7bDuAaaAxtVVd4Idjp1dBQ==",6071 "dev": true,6072 "dependencies": {6031- "call-bind": "^1.0.2",6032- "get-intrinsic": "^1.1.3",6073+ "call-bind": "^1.0.5",6074+ "get-intrinsic": "^1.2.2",6075 "is-regex": "^1.1.4"6076 },6077+ "engines": {6078+ "node": ">= 0.4"6079+ },6080 "funding": {6081 "url": "https://github.com/sponsors/ljharb"6082 }6083 },29 unmodified lines6113 "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz",6114 "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==",6115 "dev": true6116 },6117+ "node_modules/set-function-length": {6118+ "version": "1.2.0",6119+ "resolved": "https://registry.npmjs.org/set-function-length/-/set-function-length-1.2.0.tgz",6120+ "integrity": "sha512-4DBHDoyHlM1IRPGYcoxexgh67y4ueR53FKV1yyxwFMY7aCqcN/38M1+SwZ/qJQ8iLv7+ck385ot4CcisOAPT9w==",6121+ "dev": true,6122+ "dependencies": {6123+ "define-data-property": "^1.1.1",6124+ "function-bind": "^1.1.2",6125+ "get-intrinsic": "^1.2.2",6126+ "gopd": "^1.0.1",6127+ "has-property-descriptors": "^1.0.1"6128+ },6129+ "engines": {6130+ "node": ">= 0.4"6131+ }6132+ },6133 "node_modules/set-function-name": {6134 "version": "2.0.1",6135 "resolved": "https://registry.npmjs.org/set-function-name/-/set-function-name-2.0.1.tgz",6136 "integrity": "sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==",92 unmodified lines6229 "spdx-license-ids": "^3.0.0"6230 }6231 },6232 "node_modules/spdx-exceptions": {6172- "version": "2.3.0",6173- "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.3.0.tgz",6174- "integrity": "sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==",6233+ "version": "2.4.0",6234+ "resolved": "https://registry.npmjs.org/spdx-exceptions/-/spdx-exceptions-2.4.0.tgz",6235+ "integrity": "sha512-hcjppoJ68fhxA/cjbN4T8N6uCUejN8yFw69ttpqtBeCbF3u13n7mb31NB9jKwGTTWWnt9IbRA/mf1FprYS8wfw==",6236 "dev": true6237 },6238 "node_modules/spdx-expression-parse": {6239 "version": "3.0.1",214 unmodified lines6454 "engines": {6455 "node": ">=8"6456 }6457 },6458+ "node_modules/test-exclude/node_modules/brace-expansion": {6459+ "version": "1.1.11",6460+ "resolved": "https://registry.npmjs.org/brace-expansion/-/brace-expansion-1.1.11.tgz",6461+ "integrity": "sha512-iCuPHDFgrHX7H2vEI/5xpz07zSHB00TpugqhmYtVmMO6518mCuRMoOYFldEBl0g187ufozdaHgWKcYFb61qGiA==",6462+ "dev": true,6463+ "dependencies": {6464+ "balanced-match": "^1.0.0",6465+ "concat-map": "0.0.1"6466+ }6467+ },6468+ "node_modules/test-exclude/node_modules/minimatch": {6469+ "version": "3.1.2",6470+ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz",6471+ "integrity": "sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw==",6472+ "dev": true,6473+ "dependencies": {6474+ "brace-expansion": "^1.1.7"6475+ },6476+ "engines": {6477+ "node": "*"6478+ }6479+ },6480 "node_modules/text-table": {6481 "version": "0.2.0",6482 "resolved": "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz",6483 "integrity": "sha512-N+8UisAXDGk8PFXP4HAzVR9nbfmVJ3zYLAWiTIoqC5v5isinhr+r5uaO8+7r3BMfuNIufIsA7RdpVgacC2cSpw==",47 unmodified lines6531 "typescript": ">=4.2.0"6532 }6533 },6534 "node_modules/ts-jest": {6452- "version": "29.1.1",6453- "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.1.tgz",6454- "integrity": "sha512-D6xjnnbP17cC85nliwGiL+tpoKN0StpgE0TeOjXQTU6MVCfsB4v7aW05CgQ/1OywGb0x/oy9hHFnN+sczTiRaA==",6535+ "version": "29.1.2",6536+ "resolved": "https://registry.npmjs.org/ts-jest/-/ts-jest-29.1.2.tgz",6537+ "integrity": "sha512-br6GJoH/WUX4pu7FbZXuWGKGNDuU7b8Uj77g/Sp7puZV6EXzuByl6JrECvm0MzVzSTkSHWTihsXt+5XYER5b+g==",6538 "dev": true,6539 "dependencies": {6540 "bs-logger": "0.x",6541 "fast-json-stable-stringify": "2.x",7 unmodified lines6549 "bin": {6550 "ts-jest": "cli.js"6551 },6552 "engines": {6470- "node": "^14.15.0 || ^16.10.0 || >=18.0.0"6553+ "node": "^16.10.0 || ^18.0.0 || >=20.0.0"6554 },6555 "peerDependencies": {6556 "@babel/core": ">=7.0.0-beta.0 <8",6557 "@jest/types": "^29.0.0",16 unmodified lines6574 }6575 }6576 },6577 "node_modules/tsconfig-paths": {6495- "version": "3.14.2",6496- "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz",6497- "integrity": "sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g==",6578+ "version": "3.15.0",6579+ "resolved": "https://registry.npmjs.org/tsconfig-paths/-/tsconfig-paths-3.15.0.tgz",6580+ "integrity": "sha512-2Ac2RgzDe/cn48GvOe3M+o82pEFewD3UPbyoUHHdKasHwJKjds4fLXWf/Ux5kATBKN20oaFGu+jbElp1pos0mg==",6581 "dev": true,6582 "dependencies": {6583 "@types/json5": "^0.0.29",6584 "json5": "^1.0.2",22 unmodified lines6607 "node": ">=4"6608 }6609 },6610 "node_modules/tsd": {6528- "version": "0.29.0",6529- "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.29.0.tgz",6530- "integrity": "sha512-5B7jbTj+XLMg6rb9sXRBGwzv7h8KJlGOkTHxY63eWpZJiQ5vJbXEjL0u7JkIxwi5EsrRE1kRVUWmy6buK/ii8A==",6611+ "version": "0.30.4",6612+ "resolved": "https://registry.npmjs.org/tsd/-/tsd-0.30.4.tgz",6613+ "integrity": "sha512-ncC4SwAeUk0OTcXt5h8l0/gOLHJSp9ogosvOADT6QYzrl0ITm398B3wkz8YESqefIsEEwvYAU8bvo7/rcN/M0Q==",6614 "dev": true,6615 "dependencies": {6533- "@tsd/typescript": "~5.2.2",6616+ "@tsd/typescript": "~5.3.3",6617 "eslint-formatter-pretty": "^4.1.0",6618 "globby": "^11.0.1",6619 "jest-diff": "^29.0.3",6620 "meow": "^9.0.0",199 unmodified lines6820 "punycode": "^2.1.0"6821 }6822 },6823 "node_modules/v8-to-istanbul": {6741- "version": "9.1.3",6742- "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.1.3.tgz",6743- "integrity": "sha512-9lDD+EVI2fjFsMWXc6dy5JJzBsVTcQ2fVkfBvncZ6xJWG9wtBhOldG+mHkSL0+V1K/xgZz0JDO5UT5hFwHUghg==",6824+ "version": "9.2.0",6825+ "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.2.0.tgz",6826+ "integrity": "sha512-/EH/sDgxU2eGxajKdwLCDmQ4FWq+kpi3uCmBGpw1xJtnAxEjlD8j8PEiGWpCIMIs3ciNAgH0d3TTJiUkYzyZjA==",6827 "dev": true,6828 "dependencies": {6829 "@jridgewell/trace-mapping": "^0.3.12",6830 "@types/istanbul-lib-coverage": "^2.0.1",53 unmodified lines6884 "url": "https://github.com/sponsors/ljharb"6885 }6886 },6887 "node_modules/which-typed-array": {6805- "version": "1.1.11",6806- "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.11.tgz",6807- "integrity": "sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew==",6888+ "version": "1.1.13",6889+ "resolved": "https://registry.npmjs.org/which-typed-array/-/which-typed-array-1.1.13.tgz",6890+ "integrity": "sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==",6891 "dev": true,6892 "dependencies": {6893 "available-typed-arrays": "^1.0.5",6811- "call-bind": "^1.0.2",6894+ "call-bind": "^1.0.4",6895 "for-each": "^0.3.3",6896 "gopd": "^1.0.1",6897 "has-tostringtag": "^1.0.0"6898 },99 unmodified linesmodified:package.json+4 added-4 removed
1 {2 "name": "commander",3- "version": "11.1.0",3+ "version": "12.0.0-1",4 "description": "the complete solution for node.js command-line programs",5 "keywords": [6 "commander",7 "command",7 unmodified lines15 "author": "TJ Holowaychuk <tj@vision-media.ca>",16 "license": "MIT",17 "repository": {18 "type": "git",19- "url": "https://github.com/tj/commander.js.git"19+ "url": "git+https://github.com/tj/commander.js.git"20 },21 "scripts": {22 "lint": "npm run lint:javascript && npm run lint:typescript",23 "lint:javascript": "eslint index.js esm.mjs \"lib/*.js\" \"tests/**/*.js\"",44 unmodified lines68 "eslint-plugin-n": "^16.2.0",69 "eslint-plugin-promise": "^6.1.1",70 "jest": "^29.3.1",71 "ts-jest": "^29.0.3",72- "tsd": "^0.29.0",72+ "tsd": "^0.30.4",73 "typescript": "^5.0.4"74 },75 "types": "typings/index.d.ts",76 "engines": {77- "node": ">=16"77+ "node": ">=18"78 },79 "support": true80 }modified:Readme_zh-CN.md+1 added-1 removed
1057 unmodified lines1058 - [可变参数的选项](./docs/zh-CN/%E5%8F%AF%E5%8F%98%E5%8F%82%E6%95%B0%E7%9A%84%E9%80%89%E9%A1%B9.md)1059 1060 ## 支持1061 1062-当前版本的 Commander 在 LTS 版本的 Node.js 上完全支持。并且至少需要 v16。1062+当前版本的 Commander 在 LTS 版本的 Node.js 上完全支持。并且至少需要 v18。1063 (使用更低版本 Node.js 的用户建议安装更低版本的 Commander)1064 1065 社区支持请访问项目的 [Issues](https://github.com/tj/commander.js/issues)。1066 5 unmodified linesmodified:Readme.md+9 added-5 removed
35 unmodified lines36 - [.name](#name)37 - [.usage](#usage)38 - [.description and .summary](#description-and-summary)39 - [.helpOption(flags, description)](#helpoptionflags-description)40- - [.addHelpCommand()](#addhelpcommand)40+ - [.helpCommand()](#helpcommand)41 - [More configuration](#more-configuration-2)42 - [Custom event listeners](#custom-event-listeners)43 - [Bits and pieces](#bits-and-pieces)44 - [.parse() and .parseAsync()](#parse-and-parseasync)858 unmodified lines903 program904 .helpOption('-e, --HELP', 'read more information');905 ```906 907-### .addHelpCommand()907+(Or use `.addHelpOption()` to add an option you construct yourself.)908 909-A help command is added by default if your command has subcommands. You can explicitly turn on or off the implicit help command with `.addHelpCommand()` and `.addHelpCommand(false)`.909+### .helpCommand()910 911+A help command is added by default if your command has subcommands. You can explicitly turn on or off the implicit help command with `.helpCommand(true)` and `.helpCommand(false)`.912+913 You can both turn on and customise the help command by supplying the name and description:914 915 ```js914-program.addHelpCommand('assist [command]', 'show assistance');916+program.helpCommand('assist [command]', 'show assistance');917 ```918 919+(Or use `.addHelpCommand()` to add a command you construct yourself.)920+921 ### More configuration922 923 The built-in help is formatted using the Help class.924 You can configure the Help behaviour by modifying data properties and methods using `.configureHelp()`, or by subclassing using `.createHelp()` if you prefer.217 unmodified lines1142 - [parsing life cycle and hooks](./docs/parsing-and-hooks.md)1143 1144 ## Support1145 1142-The current version of Commander is fully supported on Long Term Support versions of Node.js, and requires at least v16.1146+The current version of Commander is fully supported on Long Term Support versions of Node.js, and requires at least v18.1147 (For older versions of Node.js, use an older version of Commander.)1148 1149 The main forum for free and community support is the project [Issues](https://github.com/tj/commander.js/issues) on GitHub.1150 5 unmodified linesmodified:SECURITY.md+2 added-2 removed
4 unmodified lines5 Old versions receive security updates for six months.6 7 | Version | Supported |8 | ------- | ------------------------------------------ |9-| 10.x | :white_check_mark: support ends 2024-01-16 |10-| < 10 | :x: |9+| 11.x | :white_check_mark: support ends 2024-07-03 |10+| < 11 | :x: |11 12 Pull Requests for security issues will be considered for older versions back to 2.x.13 14 ## Reporting a Vulnerability4 unmodified lines