commander 14.0.1 → 14.0.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/lib/command.js +1 -1
- package/package.json +1 -1
- package/typings/index.d.ts +2 -2
package/lib/command.js
CHANGED
|
@@ -1756,7 +1756,7 @@ Expecting one of '${allowedValues.join("', '")}'`);
|
|
|
1756
1756
|
|
|
1757
1757
|
const negativeNumberArg = (arg) => {
|
|
1758
1758
|
// return false if not a negative number
|
|
1759
|
-
if (
|
|
1759
|
+
if (!/^-(\d+|\d*\.\d+)(e[+-]?\d+)?$/.test(arg)) return false;
|
|
1760
1760
|
// negative number is ok unless digit used as an option in command hierarchy
|
|
1761
1761
|
return !this._getCommandAndAncestors().some((cmd) =>
|
|
1762
1762
|
cmd.options
|
package/package.json
CHANGED
package/typings/index.d.ts
CHANGED
|
@@ -1044,7 +1044,7 @@ export class Command {
|
|
|
1044
1044
|
*/
|
|
1045
1045
|
outputHelp(context?: HelpContext): void;
|
|
1046
1046
|
/** @deprecated since v7 */
|
|
1047
|
-
outputHelp(cb
|
|
1047
|
+
outputHelp(cb: (str: string) => string): void;
|
|
1048
1048
|
|
|
1049
1049
|
/**
|
|
1050
1050
|
* Return command help documentation.
|
|
@@ -1071,7 +1071,7 @@ export class Command {
|
|
|
1071
1071
|
*/
|
|
1072
1072
|
help(context?: HelpContext): never;
|
|
1073
1073
|
/** @deprecated since v7 */
|
|
1074
|
-
help(cb
|
|
1074
|
+
help(cb: (str: string) => string): never;
|
|
1075
1075
|
|
|
1076
1076
|
/**
|
|
1077
1077
|
* Add additional text to be displayed with the built-in help.
|