diff --git a/node_modules/.package-lock.json b/node_modules/.package-lock.json index b4f0569301..17a67589b7 100644 --- a/node_modules/.package-lock.json +++ b/node_modules/.package-lock.json @@ -1526,9 +1526,9 @@ "license": "MIT" }, "node_modules/commander": { - "version": "8.0.0-1", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.0.0-1.tgz", - "integrity": "sha512-tSrRWF7x0QOO7bjPJIWxOmFtrqcUGWkyp4zANM8ZholgD2gtw9zRNtM5RtbQyOQAu/qp01tnvyFmP8KrlXokHQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.1.0.tgz", + "integrity": "sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA==", "engines": { "node": ">= 12" } diff --git a/node_modules/commander/CHANGELOG.md b/node_modules/commander/CHANGELOG.md deleted file mode 100644 index 3bba7d94ed..0000000000 --- a/node_modules/commander/CHANGELOG.md +++ /dev/null @@ -1,345 +0,0 @@ -# Changelog - -All notable changes to this project will be documented in this file. - -The format is based on [Keep a Changelog](http://keepachangelog.com/en/1.0.0/) -and this project adheres to [Semantic Versioning](http://semver.org/spec/v2.0.0.html). - - - - -## [8.0.0-1] (2021-05-30) - -### Added - -- `.addArgument()` ([#1490]) -- `Argument` supports `.choices()` ([#1525]) -- client typing of `.opts()` return type using TypeScript generics ([#1539]) - -### Changed - -- refactor `index.tab` into a file per class ([#1522]) -- update dependencies - -## [8.0.0-0] (2021-05-23) - -### Added - -- `.getOptionValue()` and `.setOptionValue()` ([#1521]) -- `.hook()` with support for `'preAction'` and `'postAction'` callbacks ([#1514]) -- `.argument(name, description)` for adding command-arguments ([#1490]) - - supports default value for optional command-arguments ([#1508]) - - supports custom processing function ([#1508]) -- `.createArgument()` factory method ([#1497]) -- the number of command-arguments is checked for programs without an action handler ([#1502]) - -### Changed - -- refactor and simplify TypeScript declarations (with no default export) ([#1520]) -- `.parseAsync()` is now declared as `async` ([#1513]) -- *Breaking:* `Help` method `.visibleArguments()` returns array of `Argument` ([#1490]) -- *Breaking:* Commander 8 requires Node.js 12 or higher ([#1500]) -- *Breaking:* `CommanderError` code `commander.invalidOptionArgument` renamed `commander.invalidArgument` ([#1508]) -- *Breaking:* TypeScript declaration for `.addTextHelp()` callback no longer allows result of `undefined`, now just `string` ([#1516]) - -### Deprecated - -- second parameter of `cmd.description(desc, argDescriptions)` for adding argument descriptions ([#1490]) - - (use new `.argument(name, description)` instead) -- `InvalidOptionArgumentError` (replaced by `InvalidArgumentError`) ([#1508]) - -### Removed - -- *Breaking:* TypeScript declaration for default export of global `Command` object ([#1520]) - - (still available as named `program` export) - -## [7.2.0] (2021-03-22) - -### Added - -- TypeScript typing for `parent` property on `Command` ([#1475]) -- TypeScript typing for `.attributeName()` on `Option` ([#1483]) -- support information in package ([#1477]) - -### Changed - -- improvements to error messages, README, and tests -- update dependencies - -## [7.1.0] (2021-02-15) - -### Added - -- support for named imports from ECMAScript modules ([#1440]) -- add `.cjs` to list of expected script file extensions ([#1449]) -- allow using option choices and variadic together ([#1454]) - -### Fixed - -- replace use of deprecated `process.mainModule` ([#1448]) -- regression for legacy `command('*')` and call when command line includes options ([#1464]) -- regression for `on('command:*', ...)` and call when command line includes unknown options ([#1464]) -- display best error for combination of unknown command and unknown option (i.e. unknown command) ([#1464]) - -### Changed - -- make TypeScript typings tests stricter ([#1453]) -- improvements to README and tests - -## [7.0.0] (2021-01-15) - -### Added - -- `.enablePositionalOptions()` to let program and subcommand reuse same option ([#1427]) -- `.passThroughOptions()` to pass options through to other programs without needing `--` ([#1427]) -- `.allowExcessArguments(false)` to show an error message if there are too many command-arguments on command line for the action handler ([#1409]) -- `.configureOutput()` to modify use of stdout and stderr or customise display of errors ([#1387]) -- use `.addHelpText()` to add text before or after the built-in help, for just current command or also for all subcommands ([#1296]) -- enhance Option class ([#1331]) - - allow hiding options from help - - allow restricting option arguments to a list of choices - - allow setting how default value is shown in help -- `.createOption()` to support subclassing of automatically created options (like `.createCommand()`) ([#1380]) -- refactor the code generating the help into a separate public Help class ([#1365]) - - support sorting subcommands and options in help - - support specifying wrap width (columns) - - allow subclassing Help class - - allow configuring Help class without subclassing - -### Changed - -- *Breaking:* options are stored safely by default, not as properties on the command ([#1409]) - - this especially affects accessing options on program, use `program.opts()` - - revert behaviour with `.storeOptionsAsProperties()` -- *Breaking:* action handlers are passed options and command separately ([#1409]) -- deprecated callback parameter to `.help()` and `.outputHelp()` (removed from README) ([#1296]) -- *Breaking:* errors now displayed using `process.stderr.write()` instead of `console.error()` -- deprecate `.on('--help')` (removed from README) ([#1296]) -- initialise the command description to empty string (previously undefined) ([#1365]) -- document and annotate deprecated routines ([#1349]) - -### Fixed - -- wrapping bugs in help ([#1365]) - - first line of command description was wrapping two characters early - - pad width calculation was not including help option and help command - - pad width calculation was including hidden options and commands -- improve backwards compatibility for custom command event listeners ([#1403]) - -### Deleted - -- *Breaking:* `.passCommandToAction()` ([#1409]) - - no longer needed as action handler is passed options and command -- *Breaking:* "extra arguments" parameter to action handler ([#1409]) - - if being used to detect excess arguments, there is now an error available by setting `.allowExcessArguments(false)` - -### Migration Tips - -The biggest change is the parsed option values. Previously the options were stored by default as properties on the command object, and now the options are stored separately. - -If you wish to restore the old behaviour and get running quickly you can call `.storeOptionsAsProperties()`. -To allow you to move to the new code patterns incrementally, the action handler will be passed the command _twice_, -to match the new "options" and "command" parameters (see below). - -**program options** - -Use the `.opts()` method to access the options. This is available on any command but is used most with the program. - -```js -program.option('-d, --debug'); -program.parse(); -// Old code before Commander 7 -if (program.debug) console.log(`Program name is ${program.name()}`); -``` - -```js -// New code -const options = program.opts(); -if (options.debug) console.log(`Program name is ${program.name()}`); -``` - -**action handler** - -The action handler gets passed a parameter for each command-argument you declared. Previously by default the next parameter was the command object with the options as properties. Now the next two parameters are instead the options and the command. If you -only accessed the options there may be no code changes required. - -```js -program - .command('compress ') - .option('-t, --trace') - // Old code before Commander 7 - .action((filename, cmd)) => { - if (cmd.trace) console.log(`Command name is ${cmd.name()}`); - }); -``` - -```js - // New code - .action((filename, options, command)) => { - if (options.trace) console.log(`Command name is ${command.name()}`); - }); -``` - -If you already set `.storeOptionsAsProperties(false)` you may still need to adjust your code. - -```js -program - .command('compress ') - .storeOptionsAsProperties(false) - .option('-t, --trace') - // Old code before Commander 7 - .action((filename, command)) => { - if (command.opts().trace) console.log(`Command name is ${command.name()}`); - }); -``` - -```js - // New code - .action((filename, options, command)) => { - if (command.opts().trace) console.log(`Command name is ${command.name()}`); - }); -``` - -## [7.0.0-2] (2020-12-14) - -(Released in 7.0.0) - -## [7.0.0-1] (2020-11-21) - -(Released in 7.0.0) - -## [7.0.0-0] (2020-10-25) - -(Released in 7.0.0) - -## [6.2.1] (2020-12-13) - -### Fixed - -- some tests failed if directory path included a space ([1390]) - -## [6.2.0] (2020-10-25) - -### Added - -- added 'tsx' file extension for stand-alone executable subcommands ([#1368]) -- documented second parameter to `.description()` to describe command arguments ([#1353]) -- documentation of special cases with options taking varying numbers of option-arguments ([#1332]) -- documentation for terminology ([#1361]) - -### Fixed - -- add missing TypeScript definition for `.addHelpCommand()' ([#1375]) -- removed blank line after "Arguments:" in help, to match "Options:" and "Commands:" ([#1360]) - -### Changed - -- update dependencies - -## [6.1.0] (2020-08-28) - -### Added - -- include URL to relevant section of README for error for potential conflict between Command properties and option values ([#1306]) -- `.combineFlagAndOptionalValue(false)` to ease upgrade path from older versions of Commander ([#1326]) -- allow disabling the built-in help option using `.helpOption(false)` ([#1325]) -- allow just some arguments in `argumentDescription` to `.description()` ([#1323]) - -### Changed - -- tidy async test and remove lint override ([#1312]) - -### Fixed - -- executable subcommand launching when script path not known ([#1322]) - -## [6.0.0] (2020-07-21) - -### Added - -- add support for variadic options ([#1250]) -- allow options to be added with just a short flag ([#1256]) - - *Breaking* the option property has same case as flag. e.g. flag `-n` accessed as `opts().n` (previously uppercase) -- *Breaking* throw an error if there might be a clash between option name and a Command property, with advice on how to resolve ([#1275]) - -### Fixed - -- Options which contain -no- in the middle of the option flag should not be treated as negatable. ([#1301]) - -## [6.0.0-0] (2020-06-20) - -(Released in 6.0.0) - - -## Older versions - -* [5.x](./changelogs/CHANGELOG-5.md) -* [4.x](./changelogs/CHANGELOG-4.md) -* [3.x](./changelogs/CHANGELOG-3.md) -* [2.x](./changelogs/CHANGELOG-2.md) -* [1.x](./changelogs/CHANGELOG-1.md) -* [0.x](./changelogs/CHANGELOG-0.md) - -[#948]: https://github.com/tj/commander.js/issues/948 -[#1032]: https://github.com/tj/commander.js/issues/1032 -[#1250]: https://github.com/tj/commander.js/pull/1250 -[#1256]: https://github.com/tj/commander.js/pull/1256 -[#1275]: https://github.com/tj/commander.js/pull/1275 -[#1296]: https://github.com/tj/commander.js/pull/1296 -[#1301]: https://github.com/tj/commander.js/issues/1301 -[#1306]: https://github.com/tj/commander.js/pull/1306 -[#1312]: https://github.com/tj/commander.js/pull/1312 -[#1322]: https://github.com/tj/commander.js/pull/1322 -[#1323]: https://github.com/tj/commander.js/pull/1323 -[#1325]: https://github.com/tj/commander.js/pull/1325 -[#1326]: https://github.com/tj/commander.js/pull/1326 -[#1331]: https://github.com/tj/commander.js/pull/1331 -[#1332]: https://github.com/tj/commander.js/pull/1332 -[#1349]: https://github.com/tj/commander.js/pull/1349 -[#1353]: https://github.com/tj/commander.js/pull/1353 -[#1360]: https://github.com/tj/commander.js/pull/1360 -[#1361]: https://github.com/tj/commander.js/pull/1361 -[#1365]: https://github.com/tj/commander.js/pull/1365 -[#1368]: https://github.com/tj/commander.js/pull/1368 -[#1375]: https://github.com/tj/commander.js/pull/1375 -[#1380]: https://github.com/tj/commander.js/pull/1380 -[#1387]: https://github.com/tj/commander.js/pull/1387 -[#1390]: https://github.com/tj/commander.js/pull/1390 -[#1403]: https://github.com/tj/commander.js/pull/1403 -[#1409]: https://github.com/tj/commander.js/pull/1409 -[#1427]: https://github.com/tj/commander.js/pull/1427 -[#1440]: https://github.com/tj/commander.js/pull/1440 -[#1448]: https://github.com/tj/commander.js/pull/1448 -[#1449]: https://github.com/tj/commander.js/pull/1449 -[#1453]: https://github.com/tj/commander.js/pull/1453 -[#1454]: https://github.com/tj/commander.js/pull/1454 -[#1464]: https://github.com/tj/commander.js/pull/1464 -[#1475]: https://github.com/tj/commander.js/pull/1475 -[#1477]: https://github.com/tj/commander.js/pull/1477 -[#1483]: https://github.com/tj/commander.js/pull/1483 -[#1490]: https://github.com/tj/commander.js/pull/1490 -[#1497]: https://github.com/tj/commander.js/pull/1497 -[#1500]: https://github.com/tj/commander.js/pull/1500 -[#1508]: https://github.com/tj/commander.js/pull/1508 -[#1513]: https://github.com/tj/commander.js/pull/1513 -[#1514]: https://github.com/tj/commander.js/pull/1514 -[#1516]: https://github.com/tj/commander.js/pull/1516 -[#1520]: https://github.com/tj/commander.js/pull/1520 -[#1521]: https://github.com/tj/commander.js/pull/1521 -[#1522]: https://github.com/tj/commander.js/pull/1522 -[#1525]: https://github.com/tj/commander.js/pull/1525 -[#1539]: https://github.com/tj/commander.js/pull/1539 - -[Unreleased]: https://github.com/tj/commander.js/compare/master...develop -[8.0.0-0]: https://github.com/tj/commander.js/compare/v7.2.0...v8.0.0-0 -[7.2.0]: https://github.com/tj/commander.js/compare/v7.1.0...v7.2.0 -[7.1.0]: https://github.com/tj/commander.js/compare/v7.0.0...v7.1.0 -[7.0.0]: https://github.com/tj/commander.js/compare/v6.2.1...v7.0.0 -[7.0.0-2]: https://github.com/tj/commander.js/compare/v7.0.0-1...v7.0.0-2 -[7.0.0-1]: https://github.com/tj/commander.js/compare/v7.0.0-0...v7.0.0-1 -[7.0.0-0]: https://github.com/tj/commander.js/compare/v6.2.0...v7.0.0-0 -[6.2.1]: https://github.com/tj/commander.js/compare/v6.2.0..v6.2.1 -[6.2.0]: https://github.com/tj/commander.js/compare/v6.1.0..v6.2.0 -[6.1.0]: https://github.com/tj/commander.js/compare/v6.0.0..v6.1.0 -[6.0.0]: https://github.com/tj/commander.js/compare/v5.1.0..v6.0.0 -[6.0.0-0]: https://github.com/tj/commander.js/compare/v5.1.0..v6.0.0-0 diff --git a/node_modules/commander/Readme.md b/node_modules/commander/Readme.md index 248bcf2d05..4cc640b945 100644 --- a/node_modules/commander/Readme.md +++ b/node_modules/commander/Readme.md @@ -30,6 +30,7 @@ Read this in other languages: English | [简体中文](./Readme_zh-CN.md) - [Life cycle hooks](#life-cycle-hooks) - [Automated help](#automated-help) - [Custom help](#custom-help) + - [Display help after errors](#display-help-after-errors) - [Display help from code](#display-help-from-code) - [.usage and .name](#usage-and-name) - [.helpOption(flags, description)](#helpoptionflags-description) @@ -112,7 +113,7 @@ By default options on the command line are not positional, and can be specified ### Common option types, boolean and value The two most used option types are a boolean option, and an option which takes its value -from the following argument (declared with angle brackets like `--expect `). Both are `undefined` unless specified on command line. +from the following argument (declared with angle brackets like `--expect `). Both are `undefined` unless specified on command line. Example file: [options-common.js](./examples/options-common.js) @@ -425,7 +426,7 @@ program .addCommand(build.makeBuildCommand()); ``` -Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will +Configuration options can be passed with the call to `.command()` and `.addCommand()`. Specifying `hidden: true` will remove the command from the generated help output. Specifying `isDefault: true` will run the subcommand if no other subcommand is specified ([example](./examples/defaultCommand.js)). @@ -435,7 +436,7 @@ For subcommands, you can specify the argument syntax in the call to `.command()` is the only method usable for subcommands implemented using a stand-alone executable, but for other subcommands you can instead use the following method. -To configure a command, you can use `.argument()` to specify each expected command-argument. +To configure a command, you can use `.argument()` to specify each expected command-argument. You supply the argument name and an optional description. The argument may be `` or `[optional]`. You can specify a default value for an optional command-argument. @@ -488,10 +489,12 @@ program #### Custom argument processing -You may specify a function to do custom processing of command-arguments before they are passed to the action handler. +You may specify a function to do custom processing of command-arguments (like for option-arguments). The callback function receives two parameters, the user specified command-argument and the previous value for the argument. It returns the new value for the argument. +The processed argument values are passed to the action handler, and saved as `.processedArgs`. + You can optionally specify the default/starting value for the argument after the function parameter. Example file: [arguments-custom-processing.js](./examples/arguments-custom-processing.js) @@ -510,7 +513,7 @@ program ### Action handler The action handler gets passed a parameter for each command-argument you declared, and two additional parameters -which are the parsed options and the command object itself. +which are the parsed options and the command object itself. Example file: [thank.js](./examples/thank.js) @@ -627,7 +630,7 @@ shell spawn --help ### Custom help -You can add extra text to be displayed along with the built-in help. +You can add extra text to be displayed along with the built-in help. Example file: [custom-help](./examples/custom-help) @@ -661,13 +664,30 @@ The positions in order displayed are: - `after`: display extra information after built-in help - `afterAll`: add to the program for a global footer (epilog) -The positions "beforeAll" and "afterAll" apply to the command and all its subcommands. +The positions "beforeAll" and "afterAll" apply to the command and all its subcommands. The second parameter can be a string, or a function returning a string. The function is passed a context object for your convenience. The properties are: - error: a boolean for whether the help is being displayed due to a usage error - command: the Command which is displaying the help +### Display help after errors + +The default behaviour for usage errors is to just display a short error message. +You can change the behaviour to show the full help or a custom help message after an error. + +```js +program.showHelpAfterError(); +// or +program.showHelpAfterError('(add --help for additional information)'); +``` + +```sh +$ pizza --unknown +error: unknown option '--unknown' +(add --help for additional information) +``` + ### Display help from code `.help()`: display help information and exit immediately. You can optionally pass `{ error: true }` to display on stderr and exit with an error status. @@ -727,7 +747,7 @@ There are methods getting the visible lists of arguments, options, and subcomman Example file: [configure-help.js](./examples/configure-help.js) -``` +```js program.configureHelp({ sortSubcommands: true, subcommandTerm: (cmd) => cmd.name() // Just show the name, instead of short usage. @@ -789,7 +809,7 @@ program subcommand -b By default options are recognised before and after command-arguments. To only process options that come before the command-arguments, use `.passThroughOptions()`. This lets you pass the arguments and following options through to another program -without needing to use `--` to end the option processing. +without needing to use `--` to end the option processing. To use pass through options in a subcommand, the program needs to enable positional options. Example file: [pass-through-options.js](./examples/pass-through-options.js) @@ -806,7 +826,7 @@ By default the option processing shows an error for an unknown option. To have a By default the argument processing does not display an error for more command-arguments than expected. To display an error for excess arguments, use`.allowExcessArguments(false)`. -### Legacy options as properties +### Legacy options as properties Before Commander 7, the option values were stored as properties on the command. This was convenient to code but the downside was possible clashes with @@ -966,7 +986,7 @@ Examples: $ deploy exec sequential $ deploy exec async` ); - + program.parse(process.argv); ``` diff --git a/node_modules/commander/lib/argument.js b/node_modules/commander/lib/argument.js index ac37ce4767..41548b6909 100644 --- a/node_modules/commander/lib/argument.js +++ b/node_modules/commander/lib/argument.js @@ -109,6 +109,22 @@ class Argument { }; return this; }; + + /** + * Make option-argument required. + */ + argRequired() { + this.required = true; + return this; + } + + /** + * Make option-argument optional. + */ + argOptional() { + this.required = false; + return this; + } } /** diff --git a/node_modules/commander/lib/command.js b/node_modules/commander/lib/command.js index 175213ae1f..4d080b1724 100644 --- a/node_modules/commander/lib/command.js +++ b/node_modules/commander/lib/command.js @@ -19,13 +19,19 @@ class Command extends EventEmitter { constructor(name) { super(); + /** @type {Command[]} */ this.commands = []; + /** @type {Option[]} */ this.options = []; this.parent = null; this._allowUnknownOption = false; this._allowExcessArguments = true; + /** @type {Argument[]} */ this._args = []; - this.rawArgs = null; + /** @type {string[]} */ + this.args = []; // cli args with options removed + this.rawArgs = []; + this.processedArgs = []; // like .args but after custom processing and collecting variadic this._scriptPath = null; this._name = name || ''; this._optionValues = {}; @@ -42,6 +48,8 @@ class Command extends EventEmitter { this._enablePositionalOptions = false; this._passThroughOptions = false; this._lifeCycleHooks = {}; // a hash of arrays + /** @type {boolean | string} */ + this._showHelpAfterError = false; // see .configureOutput() for docs this._outputConfiguration = { @@ -66,24 +74,52 @@ class Command extends EventEmitter { } /** - * Define a command. + * Copy settings that are useful to have in common across root command and subcommands. * - * There are two styles of command: pay attention to where to put the description. + * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.) * - * Examples: + * @param {Command} sourceCommand + * @return {Command} returns `this` for executable command + */ + copyInheritedSettings(sourceCommand) { + this._outputConfiguration = sourceCommand._outputConfiguration; + this._hasHelpOption = sourceCommand._hasHelpOption; + this._helpFlags = sourceCommand._helpFlags; + this._helpDescription = sourceCommand._helpDescription; + this._helpShortFlag = sourceCommand._helpShortFlag; + this._helpLongFlag = sourceCommand._helpLongFlag; + this._helpCommandName = sourceCommand._helpCommandName; + this._helpCommandnameAndArgs = sourceCommand._helpCommandnameAndArgs; + this._helpCommandDescription = sourceCommand._helpCommandDescription; + this._helpConfiguration = sourceCommand._helpConfiguration; + this._exitCallback = sourceCommand._exitCallback; + this._storeOptionsAsProperties = sourceCommand._storeOptionsAsProperties; + this._combineFlagAndOptionalValue = sourceCommand._combineFlagAndOptionalValue; + this._allowExcessArguments = sourceCommand._allowExcessArguments; + this._enablePositionalOptions = sourceCommand._enablePositionalOptions; + this._showHelpAfterError = sourceCommand._showHelpAfterError; + + return this; + } + + /** + * Define a command. * - * // Command implemented using action handler (description is supplied separately to `.command`) - * program - * .command('clone [destination]') - * .description('clone a repository into a newly created directory') - * .action((source, destination) => { - * console.log('clone command called'); - * }); + * There are two styles of command: pay attention to where to put the description. * - * // Command implemented using separate executable file (description is second parameter to `.command`) - * program - * .command('start ', 'start named service') - * .command('stop [service]', 'stop named service, or all if no name supplied'); + * @example + * // Command implemented using action handler (description is supplied separately to `.command`) + * program + * .command('clone [destination]') + * .description('clone a repository into a newly created directory') + * .action((source, destination) => { + * console.log('clone command called'); + * }); + * + * // Command implemented using separate executable file (description is second parameter to `.command`) + * program + * .command('start ', 'start named service') + * .command('stop [service]', 'stop named service, or all if no name supplied'); * * @param {string} nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` * @param {Object|string} [actionOptsOrExecDesc] - configuration options (for action), or description (for executable) @@ -100,36 +136,19 @@ class Command extends EventEmitter { } opts = opts || {}; const [, name, args] = nameAndArgs.match(/([^ ]+) *(.*)/); - const cmd = this.createCommand(name); + const cmd = this.createCommand(name); if (desc) { cmd.description(desc); cmd._executableHandler = true; } if (opts.isDefault) this._defaultCommandName = cmd._name; - - cmd._outputConfiguration = this._outputConfiguration; - cmd._hidden = !!(opts.noHelp || opts.hidden); // noHelp is deprecated old name for hidden - cmd._hasHelpOption = this._hasHelpOption; - cmd._helpFlags = this._helpFlags; - cmd._helpDescription = this._helpDescription; - cmd._helpShortFlag = this._helpShortFlag; - cmd._helpLongFlag = this._helpLongFlag; - cmd._helpCommandName = this._helpCommandName; - cmd._helpCommandnameAndArgs = this._helpCommandnameAndArgs; - cmd._helpCommandDescription = this._helpCommandDescription; - cmd._helpConfiguration = this._helpConfiguration; - cmd._exitCallback = this._exitCallback; - cmd._storeOptionsAsProperties = this._storeOptionsAsProperties; - cmd._combineFlagAndOptionalValue = this._combineFlagAndOptionalValue; - cmd._allowExcessArguments = this._allowExcessArguments; - cmd._enablePositionalOptions = this._enablePositionalOptions; - cmd._executableFile = opts.executableFile || null; // Custom name for executable file, set missing to null to match constructor if (args) cmd.arguments(args); this.commands.push(cmd); cmd.parent = this; + cmd.copyInheritedSettings(this); if (desc) return this; return cmd; @@ -181,14 +200,14 @@ class Command extends EventEmitter { * * The configuration properties are all functions: * - * // functions to change where being written, stdout and stderr - * writeOut(str) - * writeErr(str) - * // matching functions to specify width for wrapping help - * getOutHelpWidth() - * getErrHelpWidth() - * // functions based on what is being written out - * outputError(str, write) // used for displaying errors, and not used for displaying help + * // functions to change where being written, stdout and stderr + * writeOut(str) + * writeErr(str) + * // matching functions to specify width for wrapping help + * getOutHelpWidth() + * getErrHelpWidth() + * // functions based on what is being written out + * outputError(str, write) // used for displaying errors, and not used for displaying help * * @param {Object} [configuration] - configuration options * @return {Command|Object} `this` command for chaining, or stored configuration @@ -201,6 +220,18 @@ class Command extends EventEmitter { return this; } + /** + * Display the help or a custom message after an error occurs. + * + * @param {boolean|string} [displayHelp] + * @return {Command} `this` command for chaining + */ + showHelpAfterError(displayHelp = true) { + if (typeof displayHelp !== 'string') displayHelp = !!displayHelp; + this._showHelpAfterError = displayHelp; + return this; + } + /** * Add a prepared subcommand. * @@ -257,9 +288,8 @@ class Command extends EventEmitter { * indicate this with <> around the name. Put [] around the name for an optional argument. * * @example - * - * program.argument(''); - * program.argument('[output-file]'); + * program.argument(''); + * program.argument('[output-file]'); * * @param {string} name * @param {string} [description] @@ -284,8 +314,7 @@ class Command extends EventEmitter { * See also .argument(). * * @example - * - * program.arguments(' [env]'); + * program.arguments(' [env]'); * * @param {string} names * @return {Command} `this` command for chaining @@ -417,14 +446,13 @@ Expecting one of '${allowedValues.join("', '")}'`); /** * Register callback `fn` for the command. * - * Examples: - * - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); + * @example + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); * * @param {Function} fn * @return {Command} `this` command for chaining @@ -563,41 +591,40 @@ Expecting one of '${allowedValues.join("', '")}'`); * separated by comma, a pipe or space. The following are all valid * all will output this way when `--help` is used. * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" - * - * Examples: + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" * - * // simple boolean defaulting to undefined - * program.option('-p, --pepper', 'add pepper'); + * @example + * // simple boolean defaulting to undefined + * program.option('-p, --pepper', 'add pepper'); * - * program.pepper - * // => undefined + * program.pepper + * // => undefined * - * --pepper - * program.pepper - * // => true + * --pepper + * program.pepper + * // => true * - * // simple boolean defaulting to true (unless non-negated option is also defined) - * program.option('-C, --no-cheese', 'remove cheese'); + * // simple boolean defaulting to true (unless non-negated option is also defined) + * program.option('-C, --no-cheese', 'remove cheese'); * - * program.cheese - * // => true + * program.cheese + * // => true * - * --no-cheese - * program.cheese - * // => false + * --no-cheese + * program.cheese + * // => false * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); * - * --chdir /tmp - * program.chdir - * // => "/tmp" + * --chdir /tmp + * program.chdir + * // => "/tmp" * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); * * @param {string} flags * @param {string} [description] @@ -630,11 +657,10 @@ Expecting one of '${allowedValues.join("', '")}'`); /** * Alter parsing of short flags with optional values. * - * Examples: - * - * // for `.option('-f,--flag [value]'): - * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour - * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` + * @example + * // for `.option('-f,--flag [value]'): + * program.combineFlagAndOptionalValue(true); // `-f80` is treated like `--flag=80`, this is the default behaviour + * program.combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` * * @param {Boolean} [combine=true] - if `true` or omitted, an optional value can be specified directly after the flag. */ @@ -803,11 +829,10 @@ Expecting one of '${allowedValues.join("', '")}'`); * The default expectation is that the arguments are from node and have the application as argv[0] * and the script being run in argv[1], with user parameters after that. * - * Examples: - * - * program.parse(process.argv); - * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions - * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * @example + * program.parse(process.argv); + * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions + * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] * * @param {string[]} [argv] - optional, defaults to process.argv * @param {Object} [parseOptions] - optionally specify style of options with from: node/user/electron @@ -830,11 +855,10 @@ Expecting one of '${allowedValues.join("', '")}'`); * The default expectation is that the arguments are from node and have the application as argv[0] * and the script being run in argv[1], with user parameters after that. * - * Examples: - * - * await program.parseAsync(process.argv); - * await program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions - * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * @example + * await program.parseAsync(process.argv); + * await program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions + * await program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] * * @param {string[]} [argv] * @param {Object} [parseOptions] @@ -976,13 +1000,34 @@ Expecting one of '${allowedValues.join("', '")}'`); }; /** - * Package arguments (this.args) for passing to action handler based - * on declared arguments (this._args). + * Check this.args against expected this._args. * * @api private */ - _getActionArguments() { + _checkNumberOfArguments() { + // too few + this._args.forEach((arg, i) => { + if (arg.required && this.args[i] == null) { + this.missingArgument(arg.name()); + } + }); + // too many + if (this._args.length > 0 && this._args[this._args.length - 1].variadic) { + return; + } + if (this.args.length > this._args.length) { + this._excessArguments(this.args); + } + }; + + /** + * Process this.args using this._args and save as this.processedArgs! + * + * @api private + */ + + _processArguments() { const myParseArg = (argument, value, previous) => { // Extra processing for nice error message on parsing failure. let parsedValue = value; @@ -1000,7 +1045,9 @@ Expecting one of '${allowedValues.join("', '")}'`); return parsedValue; }; - const actionArgs = []; + this._checkNumberOfArguments(); + + const processedArgs = []; this._args.forEach((declaredArg, index) => { let value = declaredArg.defaultValue; if (declaredArg.variadic) { @@ -1021,9 +1068,9 @@ Expecting one of '${allowedValues.join("', '")}'`); value = myParseArg(declaredArg, value, declaredArg.defaultValue); } } - actionArgs[index] = value; + processedArgs[index] = value; }); - return actionArgs; + this.processedArgs = processedArgs; } /** @@ -1115,37 +1162,22 @@ Expecting one of '${allowedValues.join("', '")}'`); this.unknownOption(parsed.unknown[0]); } }; - const checkNumberOfArguments = () => { - // too few - this._args.forEach((arg, i) => { - if (arg.required && this.args[i] == null) { - this.missingArgument(arg.name()); - } - }); - // too many - if (this._args.length > 0 && this._args[this._args.length - 1].variadic) { - return; - } - if (this.args.length > this._args.length) { - this._excessArguments(this.args); - } - }; const commandEvent = `command:${this.name()}`; if (this._actionHandler) { checkForUnknownOptions(); - checkNumberOfArguments(); + this._processArguments(); let actionResult; actionResult = this._chainOrCallHooks(actionResult, 'preAction'); - actionResult = this._chainOrCall(actionResult, () => this._actionHandler(this._getActionArguments())); + actionResult = this._chainOrCall(actionResult, () => this._actionHandler(this.processedArgs)); if (this.parent) this.parent.emit(commandEvent, operands, unknown); // legacy actionResult = this._chainOrCallHooks(actionResult, 'postAction'); return actionResult; } if (this.parent && this.parent.listenerCount(commandEvent)) { checkForUnknownOptions(); - checkNumberOfArguments(); + this._processArguments(); this.parent.emit(commandEvent, operands, unknown); // legacy } else if (operands.length) { if (this._findCommand('*')) { // legacy default command @@ -1158,14 +1190,14 @@ Expecting one of '${allowedValues.join("', '")}'`); this.unknownCommand(); } else { checkForUnknownOptions(); - checkNumberOfArguments(); + this._processArguments(); } } else if (this.commands.length) { // This command has subcommands and nothing hooked up at this level, so display help (and exit). this.help({ error: true }); } else { checkForUnknownOptions(); - checkNumberOfArguments(); + this._processArguments(); // fall through for caller to handle after calling .parse() } }; @@ -1216,11 +1248,11 @@ Expecting one of '${allowedValues.join("', '")}'`); * * Examples: * - * argv => operands, unknown - * --known kkk op => [op], [] - * op --known kkk => [op], [] - * sub --unknown uuu op => [sub], [--unknown uuu op] - * sub -- --unknown uuu op => [sub --unknown uuu op], [] + * argv => operands, unknown + * --known kkk op => [op], [] + * op --known kkk => [op], [] + * sub --unknown uuu op => [sub], [--unknown uuu op] + * sub -- --unknown uuu op => [sub --unknown uuu op], [] * * @param {String[]} argv * @return {{operands: String[], unknown: String[]}} @@ -1370,6 +1402,12 @@ Expecting one of '${allowedValues.join("', '")}'`); */ _displayError(exitCode, code, message) { this._outputConfiguration.outputError(`${message}\n`, this._outputConfiguration.writeErr); + if (typeof this._showHelpAfterError === 'string') { + this._outputConfiguration.writeErr(`${this._showHelpAfterError}\n`); + } else if (this._showHelpAfterError) { + this._outputConfiguration.writeErr('\n'); + this.outputHelp({ error: true }); + } this._exit(exitCode, code, message); } @@ -1446,13 +1484,7 @@ Expecting one of '${allowedValues.join("', '")}'`); */ unknownCommand() { - const partCommands = [this.name()]; - for (let parentCmd = this.parent; parentCmd; parentCmd = parentCmd.parent) { - partCommands.unshift(parentCmd.name()); - } - const fullCommand = partCommands.join(' '); - const message = `error: unknown command '${this.args[0]}'.` + - (this._hasHelpOption ? ` See '${fullCommand} ${this._helpLongFlag}'.` : ''); + const message = `error: unknown command '${this.args[0]}'`; this._displayError(1, 'commander.unknownCommand', message); }; @@ -1513,6 +1545,7 @@ Expecting one of '${allowedValues.join("', '")}'`); alias(alias) { if (alias === undefined) return this._aliases[0]; // just return first, for backwards compatibility + /** @type {Command} */ let command = this; if (this.commands.length !== 0 && this.commands[this.commands.length - 1]._executableHandler) { // assume adding alias for last added executable subcommand, rather than this @@ -1629,14 +1662,7 @@ Expecting one of '${allowedValues.join("', '")}'`); } const context = this._getHelpContext(contextOptions); - const groupListeners = []; - let command = this; - while (command) { - groupListeners.push(command); // ordered from current command to root - command = command.parent; - } - - groupListeners.slice().reverse().forEach(command => command.emit('beforeAllHelp', context)); + getCommandAndParents(this).reverse().forEach(command => command.emit('beforeAllHelp', context)); this.emit('beforeHelp', context); let helpInformation = this.helpInformation(context); @@ -1650,7 +1676,7 @@ Expecting one of '${allowedValues.join("', '")}'`); this.emit(this._helpLongFlag); // deprecated this.emit('afterHelp', context); - groupListeners.forEach(command => command.emit('afterAllHelp', context)); + getCommandAndParents(this).forEach(command => command.emit('afterAllHelp', context)); }; /** diff --git a/node_modules/commander/lib/help.js b/node_modules/commander/lib/help.js index 61895258f5..025bc0743a 100644 --- a/node_modules/commander/lib/help.js +++ b/node_modules/commander/lib/help.js @@ -38,6 +38,7 @@ class Help { } if (this.sortSubcommands) { visibleCommands.sort((a, b) => { + // @ts-ignore: overloaded return type return a.name().localeCompare(b.name()); }); } diff --git a/node_modules/commander/package.json b/node_modules/commander/package.json index 28501f45b0..9db388e947 100644 --- a/node_modules/commander/package.json +++ b/node_modules/commander/package.json @@ -1,6 +1,6 @@ { "name": "commander", - "version": "8.0.0-1", + "version": "8.1.0", "description": "the complete solution for node.js command-line programs", "keywords": [ "commander", @@ -39,17 +39,17 @@ "dependencies": {}, "devDependencies": { "@types/jest": "^26.0.23", - "@types/node": "^14.17.1", - "@typescript-eslint/eslint-plugin": "^4.25.0", - "@typescript-eslint/parser": "^4.25.0", - "eslint": "^7.27.0", + "@types/node": "^14.17.3", + "@typescript-eslint/eslint-plugin": "^4.27.0", + "@typescript-eslint/parser": "^4.27.0", + "eslint": "^7.29.0", "eslint-config-standard": "^16.0.3", "eslint-plugin-jest": "^24.3.6", - "jest": "^27.0.1", + "jest": "^27.0.4", "standard": "^16.0.3", - "ts-jest": "^27.0.1", - "tsd": "^0.16.0", - "typescript": "^4.3.2" + "ts-jest": "^27.0.3", + "tsd": "^0.17.0", + "typescript": "^4.3.4" }, "types": "typings/index.d.ts", "jest": { diff --git a/node_modules/commander/typings/index.d.ts b/node_modules/commander/typings/index.d.ts index bb5a5451eb..2889e30e02 100644 --- a/node_modules/commander/typings/index.d.ts +++ b/node_modules/commander/typings/index.d.ts @@ -13,9 +13,9 @@ export class CommanderError extends Error { /** * Constructs the CommanderError class - * @param {number} exitCode suggested exit code which could be used with process.exit - * @param {string} code an id string representing the error - * @param {string} message human-readable description of the error + * @param exitCode - suggested exit code which could be used with process.exit + * @param code - an id string representing the error + * @param message - human-readable description of the error * @constructor */ constructor(exitCode: number, code: string, message: string); @@ -24,7 +24,7 @@ export class CommanderError extends Error { export class InvalidArgumentError extends CommanderError { /** * Constructs the InvalidArgumentError class - * @param {string} [message] explanation of why argument is invalid + * @param message - explanation of why argument is invalid * @constructor */ constructor(message: string); @@ -40,9 +40,6 @@ export class Argument { * Initialize a new command argument with the given name and description. * The default is that the argument is required, and you can explicitly * indicate this with <> around the name. Put [] around the name for an optional argument. - * - * @param {string} name - * @param {string} [description] */ constructor(arg: string, description?: string); @@ -66,6 +63,15 @@ export class Argument { */ choices(values: string[]): this; + /** + * Make option-argument required. + */ + argRequired(): this; + + /** + * Make option-argument optional. + */ + argOptional(): this; } export class Option { @@ -217,6 +223,7 @@ export interface OptionValues { export class Command { args: string[]; + processedArgs: any[]; commands: Command[]; parent: Command | null; @@ -240,12 +247,12 @@ export class Command { * * @example * ```ts - * program - * .command('clone [destination]') - * .description('clone a repository into a newly created directory') - * .action((source, destination) => { - * console.log('clone command called'); - * }); + * program + * .command('clone [destination]') + * .description('clone a repository into a newly created directory') + * .action((source, destination) => { + * console.log('clone command called'); + * }); * ``` * * @param nameAndArgs - command name and arguments, args are `` or `[optional]` and last may also be `variadic...` @@ -305,9 +312,10 @@ export class Command { * indicate this with <> around the name. Put [] around the name for an optional argument. * * @example - * - * program.argument(''); - * program.argument('[output-file]'); + * ``` + * program.argument(''); + * program.argument('[output-file]'); + * ``` * * @returns `this` command for chaining */ @@ -327,8 +335,9 @@ export class Command { * See also .argument(). * * @example - * - * program.arguments(' [env]'); + * ``` + * program.arguments(' [env]'); + * ``` * * @returns `this` command for chaining */ @@ -337,9 +346,12 @@ export class Command { /** * Override default decision whether to add implicit help command. * - * addHelpCommand() // force on - * addHelpCommand(false); // force off - * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details + * @example + * ``` + * addHelpCommand() // force on + * addHelpCommand(false); // force off + * addHelpCommand('help [cmd]', 'display help for [cmd]'); // force on with custom details + * ``` * * @returns `this` command for chaining */ @@ -374,30 +386,45 @@ export class Command { * applications. You can also customise the display of errors by overriding outputError. * * The configuration properties are all functions: - * - * // functions to change where being written, stdout and stderr - * writeOut(str) - * writeErr(str) - * // matching functions to specify width for wrapping help - * getOutHelpWidth() - * getErrHelpWidth() - * // functions based on what is being written out - * outputError(str, write) // used for displaying errors, and not used for displaying help + * ``` + * // functions to change where being written, stdout and stderr + * writeOut(str) + * writeErr(str) + * // matching functions to specify width for wrapping help + * getOutHelpWidth() + * getErrHelpWidth() + * // functions based on what is being written out + * outputError(str, write) // used for displaying errors, and not used for displaying help + * ``` */ configureOutput(configuration: OutputConfiguration): this; /** Get configuration */ configureOutput(): OutputConfiguration; + /** + * Copy settings that are useful to have in common across root command and subcommands. + * + * (Used internally when adding a command using `.command()` so subcommands inherit parent settings.) + */ + copyInheritedSettings(sourceCommand: Command): this; + + /** + * Display the help or a custom message after an error occurs. + */ + showHelpAfterError(displayHelp?: boolean | string): this; + /** * Register callback `fn` for the command. * * @example - * program - * .command('help') - * .description('display verbose help') - * .action(function() { - * // output help here - * }); + * ``` + * program + * .command('help') + * .description('display verbose help') + * .action(function() { + * // output help here + * }); + * ``` * * @returns `this` command for chaining */ @@ -411,37 +438,39 @@ export class Command { * separated by comma, a pipe or space. The following are all valid * all will output this way when `--help` is used. * - * "-p, --pepper" - * "-p|--pepper" - * "-p --pepper" + * "-p, --pepper" + * "-p|--pepper" + * "-p --pepper" * * @example - * // simple boolean defaulting to false - * program.option('-p, --pepper', 'add pepper'); + * ``` + * // simple boolean defaulting to false + * program.option('-p, --pepper', 'add pepper'); * - * --pepper - * program.pepper - * // => Boolean + * --pepper + * program.pepper + * // => Boolean * - * // simple boolean defaulting to true - * program.option('-C, --no-cheese', 'remove cheese'); + * // simple boolean defaulting to true + * program.option('-C, --no-cheese', 'remove cheese'); * - * program.cheese - * // => true + * program.cheese + * // => true * - * --no-cheese - * program.cheese - * // => false + * --no-cheese + * program.cheese + * // => false * - * // required argument - * program.option('-C, --chdir ', 'change the working directory'); + * // required argument + * program.option('-C, --chdir ', 'change the working directory'); * - * --chdir /tmp - * program.chdir - * // => "/tmp" + * --chdir /tmp + * program.chdir + * // => "/tmp" * - * // optional argument - * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * // optional argument + * program.option('-c, --cheese [type]', 'add cheese [marble]'); + * ``` * * @returns `this` command for chaining */ @@ -501,9 +530,11 @@ export class Command { * Alter parsing of short flags with optional values. * * @example - * // for `.option('-f,--flag [value]'): - * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour - * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` + * ``` + * // for `.option('-f,--flag [value]'): + * .combineFlagAndOptionalValue(true) // `-f80` is treated like `--flag=80`, this is the default behaviour + * .combineFlagAndOptionalValue(false) // `-fb` is treated like `-f -b` + * ``` * * @returns `this` command for chaining */ @@ -550,11 +581,12 @@ export class Command { * The default expectation is that the arguments are from node and have the application as argv[0] * and the script being run in argv[1], with user parameters after that. * - * Examples: - * - * program.parse(process.argv); - * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions - * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * @example + * ``` + * program.parse(process.argv); + * program.parse(); // implicitly use process.argv and auto-detect node vs electron conventions + * program.parse(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * ``` * * @returns `this` command for chaining */ @@ -568,11 +600,12 @@ export class Command { * The default expectation is that the arguments are from node and have the application as argv[0] * and the script being run in argv[1], with user parameters after that. * - * Examples: - * - * program.parseAsync(process.argv); - * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions - * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * @example + * ``` + * program.parseAsync(process.argv); + * program.parseAsync(); // implicitly use process.argv and auto-detect node vs electron conventions + * program.parseAsync(my-args, { from: 'user' }); // just user supplied arguments, nothing special about argv[0] + * ``` * * @returns Promise */ @@ -582,12 +615,11 @@ export class Command { * Parse options from `argv` removing known options, * and return argv split into operands and unknown arguments. * - * @example - * argv => operands, unknown - * --known kkk op => [op], [] - * op --known kkk => [op], [] - * sub --unknown uuu op => [sub], [--unknown uuu op] - * sub -- --unknown uuu op => [sub --unknown uuu op], [] + * argv => operands, unknown + * --known kkk op => [op], [] + * op --known kkk => [op], [] + * sub --unknown uuu op => [sub], [--unknown uuu op] + * sub -- --unknown uuu op => [sub --unknown uuu op], [] */ parseOptions(argv: string[]): ParseOptionsResult; diff --git a/package-lock.json b/package-lock.json index 67d7cdc930..754f07909d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -19,7 +19,7 @@ "@chrisgavin/safe-which": "^1.0.2", "@octokit/plugin-retry": "^3.0.9", "@octokit/types": "^6.21.1", - "commander": "^8.0.0-1", + "commander": "^8.1.0", "console-log-level": "^1.4.1", "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", @@ -1580,9 +1580,9 @@ "license": "MIT" }, "node_modules/commander": { - "version": "8.0.0-1", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.0.0-1.tgz", - "integrity": "sha512-tSrRWF7x0QOO7bjPJIWxOmFtrqcUGWkyp4zANM8ZholgD2gtw9zRNtM5RtbQyOQAu/qp01tnvyFmP8KrlXokHQ==", + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.1.0.tgz", + "integrity": "sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA==", "engines": { "node": ">= 12" } @@ -7129,9 +7129,9 @@ "version": "1.1.3" }, "commander": { - "version": "8.0.0-1", - "resolved": "https://registry.npmjs.org/commander/-/commander-8.0.0-1.tgz", - "integrity": "sha512-tSrRWF7x0QOO7bjPJIWxOmFtrqcUGWkyp4zANM8ZholgD2gtw9zRNtM5RtbQyOQAu/qp01tnvyFmP8KrlXokHQ==" + "version": "8.1.0", + "resolved": "https://registry.npmjs.org/commander/-/commander-8.1.0.tgz", + "integrity": "sha512-mf45ldcuHSYShkplHHGKWb4TrmwQadxOn7v4WuhDJy0ZVoY5JFajaRDKD0PNe5qXzBX0rhovjTnP6Kz9LETcuA==" }, "common-path-prefix": { "version": "3.0.0", diff --git a/package.json b/package.json index ee4b9cef64..97be0e8409 100644 --- a/package.json +++ b/package.json @@ -31,7 +31,7 @@ "@chrisgavin/safe-which": "^1.0.2", "@octokit/plugin-retry": "^3.0.9", "@octokit/types": "^6.21.1", - "commander": "^8.0.0-1", + "commander": "^8.1.0", "console-log-level": "^1.4.1", "fast-deep-equal": "^3.1.3", "file-url": "^3.0.0", pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy