Update ava to 4.3.3
The [release notes](https://github.com/avajs/ava/releases/tag/v4.3.3) mention compatibility with Node 18.8.
This commit is contained in:
parent
21530f507f
commit
bea5e4b220
160 changed files with 2647 additions and 2263 deletions
22
node_modules/yargs/build/lib/yargs-factory.js
generated
vendored
22
node_modules/yargs/build/lib/yargs-factory.js
generated
vendored
|
|
@ -9,7 +9,7 @@ var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (
|
|||
if (typeof state === "function" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError("Cannot read private member from an object whose class did not declare it");
|
||||
return kind === "m" ? f : kind === "a" ? f.call(receiver) : f ? f.value : state.get(receiver);
|
||||
};
|
||||
var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_versionOpt, _YargsInstance_validation;
|
||||
var _YargsInstance_command, _YargsInstance_cwd, _YargsInstance_context, _YargsInstance_completion, _YargsInstance_completionCommand, _YargsInstance_defaultShowHiddenOpt, _YargsInstance_exitError, _YargsInstance_detectLocale, _YargsInstance_emittedWarnings, _YargsInstance_exitProcess, _YargsInstance_frozens, _YargsInstance_globalMiddleware, _YargsInstance_groups, _YargsInstance_hasOutput, _YargsInstance_helpOpt, _YargsInstance_isGlobalContext, _YargsInstance_logger, _YargsInstance_output, _YargsInstance_options, _YargsInstance_parentRequire, _YargsInstance_parserConfig, _YargsInstance_parseFn, _YargsInstance_parseContext, _YargsInstance_pkgs, _YargsInstance_preservedGroups, _YargsInstance_processArgs, _YargsInstance_recommendCommands, _YargsInstance_shim, _YargsInstance_strict, _YargsInstance_strictCommands, _YargsInstance_strictOptions, _YargsInstance_usage, _YargsInstance_versionOpt, _YargsInstance_validation;
|
||||
import { command as Command, } from './command.js';
|
||||
import { assertNotStrictEqual, assertSingleKey, objectKeys, } from './typings/common-types.js';
|
||||
import { YError } from './yerror.js';
|
||||
|
|
@ -64,6 +64,7 @@ const kGetParseContext = Symbol('getParseContext');
|
|||
const kGetUsageInstance = Symbol('getUsageInstance');
|
||||
const kGetValidationInstance = Symbol('getValidationInstance');
|
||||
const kHasParseCallback = Symbol('hasParseCallback');
|
||||
const kIsGlobalContext = Symbol('isGlobalContext');
|
||||
const kPostProcess = Symbol('postProcess');
|
||||
const kRebase = Symbol('rebase');
|
||||
const kReset = Symbol('reset');
|
||||
|
|
@ -90,6 +91,7 @@ export class YargsInstance {
|
|||
_YargsInstance_groups.set(this, {});
|
||||
_YargsInstance_hasOutput.set(this, false);
|
||||
_YargsInstance_helpOpt.set(this, null);
|
||||
_YargsInstance_isGlobalContext.set(this, true);
|
||||
_YargsInstance_logger.set(this, void 0);
|
||||
_YargsInstance_output.set(this, '');
|
||||
_YargsInstance_options.set(this, void 0);
|
||||
|
|
@ -217,12 +219,19 @@ export class YargsInstance {
|
|||
__classPrivateFieldGet(this, _YargsInstance_options, "f").key[keys] = true;
|
||||
__classPrivateFieldGet(this, _YargsInstance_globalMiddleware, "f").addCoerceMiddleware((argv, yargs) => {
|
||||
let aliases;
|
||||
const shouldCoerce = Object.prototype.hasOwnProperty.call(argv, keys);
|
||||
if (!shouldCoerce) {
|
||||
return argv;
|
||||
}
|
||||
return maybeAsyncResult(() => {
|
||||
aliases = yargs.getAliases();
|
||||
return value(argv[keys]);
|
||||
}, (result) => {
|
||||
argv[keys] = result;
|
||||
if (aliases[keys]) {
|
||||
const stripAliased = yargs
|
||||
.getInternalMethods()
|
||||
.getParserConfiguration()['strip-aliased'];
|
||||
if (aliases[keys] && stripAliased !== true) {
|
||||
for (const alias of aliases[keys]) {
|
||||
argv[alias] = result;
|
||||
}
|
||||
|
|
@ -535,7 +544,7 @@ export class YargsInstance {
|
|||
}
|
||||
locale(locale) {
|
||||
argsert('[string]', [locale], arguments.length);
|
||||
if (!locale) {
|
||||
if (locale === undefined) {
|
||||
this[kGuessLocale]();
|
||||
return __classPrivateFieldGet(this, _YargsInstance_shim, "f").y18n.getLocale();
|
||||
}
|
||||
|
|
@ -946,7 +955,7 @@ export class YargsInstance {
|
|||
__classPrivateFieldGet(this, _YargsInstance_usage, "f").wrap(cols);
|
||||
return this;
|
||||
}
|
||||
[(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) {
|
||||
[(_YargsInstance_command = new WeakMap(), _YargsInstance_cwd = new WeakMap(), _YargsInstance_context = new WeakMap(), _YargsInstance_completion = new WeakMap(), _YargsInstance_completionCommand = new WeakMap(), _YargsInstance_defaultShowHiddenOpt = new WeakMap(), _YargsInstance_exitError = new WeakMap(), _YargsInstance_detectLocale = new WeakMap(), _YargsInstance_emittedWarnings = new WeakMap(), _YargsInstance_exitProcess = new WeakMap(), _YargsInstance_frozens = new WeakMap(), _YargsInstance_globalMiddleware = new WeakMap(), _YargsInstance_groups = new WeakMap(), _YargsInstance_hasOutput = new WeakMap(), _YargsInstance_helpOpt = new WeakMap(), _YargsInstance_isGlobalContext = new WeakMap(), _YargsInstance_logger = new WeakMap(), _YargsInstance_output = new WeakMap(), _YargsInstance_options = new WeakMap(), _YargsInstance_parentRequire = new WeakMap(), _YargsInstance_parserConfig = new WeakMap(), _YargsInstance_parseFn = new WeakMap(), _YargsInstance_parseContext = new WeakMap(), _YargsInstance_pkgs = new WeakMap(), _YargsInstance_preservedGroups = new WeakMap(), _YargsInstance_processArgs = new WeakMap(), _YargsInstance_recommendCommands = new WeakMap(), _YargsInstance_shim = new WeakMap(), _YargsInstance_strict = new WeakMap(), _YargsInstance_strictCommands = new WeakMap(), _YargsInstance_strictOptions = new WeakMap(), _YargsInstance_usage = new WeakMap(), _YargsInstance_versionOpt = new WeakMap(), _YargsInstance_validation = new WeakMap(), kCopyDoubleDash)](argv) {
|
||||
if (!argv._ || !argv['--'])
|
||||
return argv;
|
||||
argv._.push.apply(argv._, argv['--']);
|
||||
|
|
@ -1180,6 +1189,7 @@ export class YargsInstance {
|
|||
getUsageInstance: this[kGetUsageInstance].bind(this),
|
||||
getValidationInstance: this[kGetValidationInstance].bind(this),
|
||||
hasParseCallback: this[kHasParseCallback].bind(this),
|
||||
isGlobalContext: this[kIsGlobalContext].bind(this),
|
||||
postProcess: this[kPostProcess].bind(this),
|
||||
reset: this[kReset].bind(this),
|
||||
runValidation: this[kRunValidation].bind(this),
|
||||
|
|
@ -1211,6 +1221,9 @@ export class YargsInstance {
|
|||
[kHasParseCallback]() {
|
||||
return !!__classPrivateFieldGet(this, _YargsInstance_parseFn, "f");
|
||||
}
|
||||
[kIsGlobalContext]() {
|
||||
return __classPrivateFieldGet(this, _YargsInstance_isGlobalContext, "f");
|
||||
}
|
||||
[kPostProcess](argv, populateDoubleDash, calledFromCommand, runGlobalMiddleware) {
|
||||
if (calledFromCommand)
|
||||
return argv;
|
||||
|
|
@ -1345,6 +1358,7 @@ export class YargsInstance {
|
|||
helpOptSet = true;
|
||||
}
|
||||
}
|
||||
__classPrivateFieldSet(this, _YargsInstance_isGlobalContext, false, "f");
|
||||
const handlerKeys = __classPrivateFieldGet(this, _YargsInstance_command, "f").getCommands();
|
||||
const requestCompletions = __classPrivateFieldGet(this, _YargsInstance_completion, "f").completionKey in argv;
|
||||
const skipRecommendation = helpOptSet || requestCompletions || helpOnly;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue