From 219fb74c80e9231eda1cd44e9041981648d9d3a8 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Tue, 19 Sep 2023 14:39:04 -0600 Subject: [PATCH 1/6] chore: update eslint libs --- .eslintrc.json | 3 +- package.json | 11 +- src/args.ts | 24 +- src/cli-ux/action/base.ts | 23 +- src/cli-ux/action/simple.ts | 14 +- src/cli-ux/action/spinner.ts | 4 +- src/cli-ux/config.ts | 8 +- src/cli-ux/flush.ts | 4 +- src/cli-ux/index.ts | 60 +- src/cli-ux/prompt.ts | 38 +- src/cli-ux/styled/index.ts | 17 +- src/cli-ux/styled/object.ts | 5 +- src/cli-ux/styled/table.ts | 51 +- src/cli-ux/wait.ts | 8 +- src/command.ts | 16 +- src/config/config.ts | 50 +- src/config/plugin-loader.ts | 2 +- src/config/plugin.ts | 16 +- src/config/ts-node.ts | 4 +- src/config/util.ts | 8 +- src/errors/handle.ts | 2 +- src/errors/index.ts | 3 +- src/flags.ts | 82 +- src/help/command.ts | 24 +- src/help/docopts.ts | 10 +- src/help/index.ts | 18 +- src/help/util.ts | 3 +- src/index.ts | 74 +- src/module-loader.ts | 13 +- src/parser/parse.ts | 31 +- src/parser/validate.ts | 15 +- src/performance.ts | 8 +- src/util.ts | 13 +- test/cli-ux/fancy.ts | 10 +- test/cli-ux/prompt.test.ts | 2 +- test/command/command.test.ts | 272 +-- .../test-help-in-src/src/test-help-plugin.ts | 1 - test/config/config.flexible.test.ts | 6 +- test/config/config.test.ts | 19 +- .../fixtures/typescript/src/hooks/postrun.ts | 2 +- test/config/test.ts | 7 +- test/config/ts-node.test.ts | 2 + test/errors/handle.test.ts | 3 +- test/help/fixtures/fixtures.ts | 42 +- test/help/format-command-with-options.test.ts | 168 +- test/help/format-command.test.ts | 270 +-- test/help/format-root.test.ts | 76 +- test/help/format-topic.test.ts | 4 +- test/help/help-test-utils.ts | 2 +- test/help/show-customized-help.test.ts | 10 +- test/help/show-help.test.ts | 16 +- test/integration/esm-cjs.ts | 4 +- test/integration/util.ts | 13 +- test/interfaces/args.test-types.ts | 2 +- test/interfaces/flags.test-types.ts | 6 +- test/parser/parse.test.ts | 12 +- test/parser/validate.test.ts | 30 +- test/perf/parser.perf.ts | 10 +- yarn.lock | 1673 ++++++++++------- 59 files changed, 1781 insertions(+), 1543 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index 94705b9d1..c8d00b297 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -16,6 +16,7 @@ ], "unicorn/no-array-reduce": "off", "unicorn/prefer-array-some": "off", - "no-useless-constructor": "off" + "no-useless-constructor": "off", + "unicorn/prefer-string-replace-all": "off" } } diff --git a/package.json b/package.json index 881d260d7..e300dadc3 100644 --- a/package.json +++ b/package.json @@ -45,14 +45,12 @@ "@types/chai-as-promised": "^7.1.5", "@types/clean-stack": "^2.1.1", "@types/ejs": "^3.1.2", - "@types/glob": "^8.1.0", "@types/indent-string": "^4.0.1", "@types/js-yaml": "^3.12.7", "@types/mocha": "^8.2.3", "@types/nock": "^11.1.0", - "@types/node": "^16", + "@types/node": "^18", "@types/node-notifier": "^8.0.2", - "@types/shelljs": "^0.8.12", "@types/slice-ansi": "^4.0.0", "@types/strip-ansi": "^5.2.1", "@types/supports-color": "^8.1.1", @@ -63,15 +61,14 @@ "chai-as-promised": "^7.1.1", "commitlint": "^12.1.4", "cross-env": "^7.0.3", - "eslint": "^7.32.0", - "eslint-config-oclif": "^4.0.0", - "eslint-config-oclif-typescript": "^1.0.3", + "eslint": "^8.49.0", + "eslint-config-oclif": "^5.0.0", + "eslint-config-oclif-typescript": "^2.0.1", "fancy-test": "^2.0.16", "globby": "^11.1.0", "husky": "6", "mocha": "^10.2.0", "nock": "^13.3.0", - "shelljs": "^0.8.5", "shx": "^0.3.4", "sinon": "^11.1.2", "tsd": "^0.29.0", diff --git a/src/args.ts b/src/args.ts index 3c19b7c8f..861bf8954 100644 --- a/src/args.ts +++ b/src/args.ts @@ -23,15 +23,13 @@ import {URL} from 'node:url' */ export function custom>(defaults: Partial>): ArgDefinition export function custom>(defaults: Partial>): ArgDefinition { - return (options: any = {}) => { - return { - parse: async (i: string, _context: Command, _opts: P) => i, - ...defaults, - ...options, - input: [] as string[], - type: 'option', - } - } + return (options: any = {}) => ({ + parse: async (i: string, _context: Command, _opts: P) => i, + ...defaults, + ...options, + input: [] as string[], + type: 'option', + }) } export const boolean = custom({ @@ -39,7 +37,7 @@ export const boolean = custom({ }) export const integer = custom({ - parse: async (input, _, opts) => { + async parse(input, _, opts) { if (!/^-?\d+$/.test(input)) throw new Error(`Expected an integer but received: ${input}`) const num = Number.parseInt(input, 10) @@ -52,7 +50,7 @@ export const integer = custom({ }) export const directory = custom({ - parse: async (input, _, opts) => { + async parse(input, _, opts) { if (opts.exists) return dirExists(input) return input @@ -60,7 +58,7 @@ export const directory = custom({ }) export const file = custom({ - parse: async (input, _, opts) => { + async parse(input, _, opts) { if (opts.exists) return fileExists(input) return input @@ -72,7 +70,7 @@ export const file = custom({ * if the string is not a valid URL. */ export const url = custom({ - parse: async input => { + async parse(input) { try { return new URL(input) } catch { diff --git a/src/cli-ux/action/base.ts b/src/cli-ux/action/base.ts index c85bc6c36..bd2a5e54e 100644 --- a/src/cli-ux/action/base.ts +++ b/src/cli-ux/action/base.ts @@ -37,7 +37,7 @@ export class ActionBase { } public stop(msg = 'done'): void { - const task = this.task + const {task} = this if (!task) { return } @@ -80,7 +80,7 @@ export class ActionBase { } set status(status: string | undefined) { - const task = this.task + const {task} = this if (!task) { return } @@ -93,8 +93,8 @@ export class ActionBase { task.status = status } - public async pauseAsync(fn: () => Promise, icon?: string): Promise { - const task = this.task + public async pauseAsync(fn: () => Promise, icon?: string): Promise { + const {task} = this const active = task && task.active if (task && active) { this._pause(icon) @@ -111,7 +111,7 @@ export class ActionBase { } public pause(fn: () => any, icon?: string): Promise { - const task = this.task + const {task} = this const active = task && task.active if (task && active) { this._pause(icon) @@ -193,7 +193,7 @@ export class ActionBase { // add newline if there isn't one already // otherwise we'll just overwrite it when we render - if (output && std && output[output.length - 1] !== '\n') { + if (output && std && output.at(-1) !== '\n') { this._write(std, '\n') } } catch (error) { @@ -204,14 +204,19 @@ export class ActionBase { // write to the real stdout/stderr protected _write(std: 'stdout' | 'stderr', s: string | string[]): void { switch (std) { - case 'stdout': + case 'stdout': { this.stdmockOrigs.stdout.apply(stdout, castArray(s) as [string]) break - case 'stderr': + } + + case 'stderr': { this.stdmockOrigs.stderr.apply(stderr, castArray(s) as [string]) break - default: + } + + default: { throw new Error(`invalid std: ${std}`) } + } } } diff --git a/src/cli-ux/action/simple.ts b/src/cli-ux/action/simple.ts index a38f59f2f..30db51f2f 100644 --- a/src/cli-ux/action/simple.ts +++ b/src/cli-ux/action/simple.ts @@ -4,7 +4,7 @@ export default class SimpleAction extends ActionBase { public type: ActionType = 'simple' protected _start(): void { - const task = this.task + const {task} = this if (!task) return this._render(task.action, task.status) } @@ -19,24 +19,24 @@ export default class SimpleAction extends ActionBase { } protected _updateStatus(status: string, prevStatus?: string, newline = false): void { - const task = this.task + const {task, std} = this if (!task) return - if (task.active && !prevStatus) this._write(this.std, ` ${status}`) - else this._write(this.std, `${task.action}... ${status}`) + if (task.active && !prevStatus) this._write(std, ` ${status}`) + else this._write(std, `${task.action}... ${status}`) if (newline || !prevStatus) this._flush() } protected _stop(status: string): void { - const task = this.task + const {task} = this if (!task) return this._updateStatus(status, task.status, true) } private _render(action: string, status?: string) { - const task = this.task + const {task, std} = this if (!task) return if (task.active) this._flush() - this._write(this.std, status ? `${action}... ${status}` : `${action}...`) + this._write(std, status ? `${action}... ${status}` : `${action}...`) } private _flush() { diff --git a/src/cli-ux/action/spinner.ts b/src/cli-ux/action/spinner.ts index 62a90690b..4d48143b4 100644 --- a/src/cli-ux/action/spinner.ts +++ b/src/cli-ux/action/spinner.ts @@ -61,14 +61,14 @@ export default class SpinnerAction extends ActionBase { } private _render(icon?: string) { - const task = this.task + const {task, std, output} = this if (!task) return this._reset() this._flushStdout() const frame = icon === 'spinner' ? ` ${this._frame()}` : icon || '' const status = task.status ? ` ${task.status}` : '' this.output = `${task.action}...${frame}${status}\n` - this._write(this.std, this.output) + this._write(std, output!) } private _reset() { diff --git a/src/cli-ux/config.ts b/src/cli-ux/config.ts index 2df1abecb..5718f9775 100644 --- a/src/cli-ux/config.ts +++ b/src/cli-ux/config.ts @@ -16,10 +16,10 @@ const g: any = global const globals = g.ux || (g.ux = {}) const actionType = ( - Boolean(process.stderr.isTTY) && - !process.env.CI && - !['dumb', 'emacs-color'].includes(process.env.TERM!) && - 'spinner' + Boolean(process.stderr.isTTY) + && !process.env.CI + && !['dumb', 'emacs-color'].includes(process.env.TERM!) + && 'spinner' ) || 'simple' const Action = actionType === 'spinner' ? spinner : simple diff --git a/src/cli-ux/flush.ts b/src/cli-ux/flush.ts index 148975efb..c6a0c152d 100644 --- a/src/cli-ux/flush.ts +++ b/src/cli-ux/flush.ts @@ -17,9 +17,7 @@ async function _flush() { }) const flushed = stdout.write('') - if (flushed) { - return Promise.resolve() - } + if (flushed) return return p } diff --git a/src/cli-ux/index.ts b/src/cli-ux/index.ts index 260904ce1..4f6c907c4 100644 --- a/src/cli-ux/index.ts +++ b/src/cli-ux/index.ts @@ -5,9 +5,6 @@ import * as styled from './styled' import * as uxPrompt from './prompt' import {Config, config} from './config' import {ActionBase} from './action/base' -import {ExitError} from './exit' -import {IPromptOptions} from './prompt' -import {Table} from './styled' import {flush as _flush} from './flush' import {stdout} from './stream' import {format as utilFormat} from 'node:util' @@ -37,7 +34,6 @@ export class ux { return config.action } - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types public static styledObject(obj: any, keys?: string[]): void { this.info(styled.styledObject(obj, keys)) } @@ -114,45 +110,40 @@ export class ux { } } -const action = ux.action -const annotation = ux.annotation -const anykey = ux.anykey -const confirm = ux.confirm -const debug = ux.debug -const done = ux.done -const error = Errors.error -const exit = Errors.exit -const flush = ux.flush -const info = ux.info -const log = ux.log -const progress = ux.progress -const prompt = ux.prompt -const styledHeader = ux.styledHeader -const styledJSON = ux.styledJSON -const styledObject = ux.styledObject -const table = ux.table -const trace = ux.trace -const tree = ux.tree -const url = ux.url -const wait = ux.wait -const warn = Errors.warn +const { + action, + annotation, + anykey, + confirm, + debug, + done, + flush, + info, + log, + progress, + prompt, + styledHeader, + styledJSON, + styledObject, + table, + trace, + tree, + url, + wait, +} = ux +const {error, exit, warn} = Errors export { action, - ActionBase, annotation, anykey, - config, - Config, confirm, debug, done, error, exit, - ExitError, flush, info, - IPromptOptions, log, progress, prompt, @@ -160,7 +151,6 @@ export { styledJSON, styledObject, table, - Table, trace, tree, url, @@ -183,3 +173,9 @@ const uxListener = process.listeners('exit').find(fn => fn.name === uxProcessExi if (!uxListener) { process.once('exit', uxProcessExitHandler) } + +export {ExitError} from './exit' +export {IPromptOptions} from './prompt' +export {Table} from './styled' +export {ActionBase} from './action/base' +export {config, Config} from './config' diff --git a/src/cli-ux/prompt.ts b/src/cli-ux/prompt.ts index 18c2daabf..54d1149e9 100644 --- a/src/cli-ux/prompt.ts +++ b/src/cli-ux/prompt.ts @@ -1,6 +1,6 @@ import * as Errors from '../errors' import * as chalk from 'chalk' -import config from './config' +import {config} from './config' import {stderr} from './stream' export interface IPromptOptions { @@ -76,8 +76,8 @@ async function single(options: IPromptConfig): Promise { function replacePrompt(prompt: string) { const ansiEscapes = require('ansi-escapes') - stderr.write(ansiEscapes.cursorHide + ansiEscapes.cursorUp(1) + ansiEscapes.cursorLeft + prompt + - ansiEscapes.cursorDown(1) + ansiEscapes.cursorLeft + ansiEscapes.cursorShow) + stderr.write(ansiEscapes.cursorHide + ansiEscapes.cursorUp(1) + ansiEscapes.cursorLeft + prompt + + ansiEscapes.cursorDown(1) + ansiEscapes.cursorLeft + ansiEscapes.cursorShow) } async function _prompt(name: string, inputOptions: Partial = {}): Promise { @@ -94,11 +94,15 @@ async function _prompt(name: string, inputOptions: Partial = {}) const passwordPrompt = require('password-prompt') switch (options.type) { - case 'normal': + case 'normal': { return normal(options) - case 'single': + } + + case 'single': { return single(options) - case 'mask': + } + + case 'mask': { return passwordPrompt(options.prompt, { method: options.type, required: options.required, @@ -107,15 +111,20 @@ async function _prompt(name: string, inputOptions: Partial = {}) replacePrompt(getPrompt(name, 'hide', inputOptions.default)) return value }) - case 'hide': + } + + case 'hide': { return passwordPrompt(options.prompt, { method: options.type, required: options.required, default: options.default, }) - default: + } + + default: { throw new Error(`unexpected type ${options.type}`) } + } } /** @@ -125,9 +134,7 @@ async function _prompt(name: string, inputOptions: Partial = {}) * @returns Promise */ export async function prompt(name: string, options: IPromptOptions = {}): Promise { - return config.action.pauseAsync(() => { - return _prompt(name, options) - }, chalk.cyan('?')) + return config.action.pauseAsync(() => _prompt(name, options), chalk.cyan('?')) } /** @@ -138,7 +145,8 @@ export async function prompt(name: string, options: IPromptOptions = {}): Promis export function confirm(message: string): Promise { return config.action.pauseAsync(async () => { const confirm = async (): Promise => { - const response = (await _prompt(message)).toLowerCase() + const raw = await _prompt(message) + const response = raw.toLowerCase() if (['n', 'no'].includes(response)) return false if (['y', 'yes'].includes(response)) return true return confirm() @@ -156,9 +164,9 @@ export function confirm(message: string): Promise { export async function anykey(message?: string): Promise { const tty = Boolean(process.stdin.setRawMode) if (!message) { - message = tty ? - `Press any key to continue or ${chalk.yellow('q')} to exit` : - `Press enter to continue or ${chalk.yellow('q')} to exit` + message = tty + ? `Press any key to continue or ${chalk.yellow('q')} to exit` + : `Press enter to continue or ${chalk.yellow('q')} to exit` } const char = await prompt(message, {type: 'single', required: false}) diff --git a/src/cli-ux/styled/index.ts b/src/cli-ux/styled/index.ts index ceb66474d..93ce7faa2 100644 --- a/src/cli-ux/styled/index.ts +++ b/src/cli-ux/styled/index.ts @@ -1,13 +1,6 @@ -import * as Table from './table' -import progress from './progress' -import styledJSON from './json' -import styledObject from './object' -import tree from './tree' -export { - styledJSON, - styledObject, - Table, - tree, - progress, -} +export * as Table from './table' +export {default as progress} from './progress' +export {default as styledJSON} from './json' +export {default as styledObject} from './object' +export {default as tree} from './tree' diff --git a/src/cli-ux/styled/object.ts b/src/cli-ux/styled/object.ts index cabc8f466..5da422e7b 100644 --- a/src/cli-ux/styled/object.ts +++ b/src/cli-ux/styled/object.ts @@ -1,7 +1,6 @@ import * as chalk from 'chalk' import {inspect} from 'node:util' -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types export default function styledObject(obj: any, keys?: string[]): string { const output: string[] = [] const keyLengths = Object.keys(obj).map(key => key.toString().length) @@ -17,9 +16,7 @@ export default function styledObject(obj: any, keys?: string[]): string { return inspect(obj) } - const logKeyValue = (key: string, value: any): string => { - return `${chalk.blue(key)}:` + ' '.repeat(maxKeyLength - key.length - 1) + pp(value) - } + const logKeyValue = (key: string, value: any): string => `${chalk.blue(key)}:` + ' '.repeat(maxKeyLength - key.length - 1) + pp(value) for (const key of keys || Object.keys(obj).sort()) { const value = obj[key] diff --git a/src/cli-ux/styled/table.ts b/src/cli-ux/styled/table.ts index 7d89b8cda..e4dee355a 100644 --- a/src/cli-ux/styled/table.ts +++ b/src/cli-ux/styled/table.ts @@ -66,7 +66,6 @@ class Table> { // filter rows if (this.options.filter) { - /* eslint-disable-next-line prefer-const */ let [header, regex] = this.options.filter!.split('=') const isNot = header[0] === '-' if (isNot) header = header.slice(1) @@ -84,9 +83,7 @@ class Table> { if (this.options.sort) { const sorters = this.options.sort!.split(',') const sortHeaders = sorters.map(k => k[0] === '-' ? k.slice(1) : k) - const sortKeys = this.filterColumnsFromHeaders(sortHeaders).map(c => { - return ((v: any) => v[c.key]) - }) + const sortKeys = this.filterColumnsFromHeaders(sortHeaders).map(c => ((v: any) => v[c.key])) const sortKeysOrder = sorters.map(k => k[0] === '-' ? 'desc' : 'asc') rows = orderBy(rows, sortKeys, sortKeysOrder) } @@ -103,18 +100,25 @@ class Table> { this.data = rows switch (this.options.output) { - case 'csv': + case 'csv': { this.outputCSV() break - case 'json': + } + + case 'json': { this.outputJSON() break - case 'yaml': + } + + case 'yaml': { this.outputYAML() break - default: + } + + default: { this.outputTable() } + } } private findColumnFromHeader(header: string): (table.Column & { key: string; width?: number; maxWidth?: number }) | undefined { @@ -141,15 +145,10 @@ class Table> { private resolveColumnsToObjectArray() { const {data, columns} = this - return data.map((d: any) => { - // eslint-disable-next-line unicorn/prefer-object-from-entries - return columns.reduce((obj, col) => { - return { - ...obj, - [col.key]: d[col.key] ?? '', - } - }, {}) - }) + return data.map((d: any) => + + Object.fromEntries(columns.map(col => [col.key, d[col.key] ?? ''])), + ) } private outputJSON() { @@ -338,7 +337,7 @@ export namespace table { export function flags(): IFlags export function flags(opts: { except: Z | Z[] }): ExcludeFlags export function flags(opts: { only: K | K[] }): IncludeFlags - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + export function flags(opts?: any): any { if (opts) { const f = {} @@ -380,12 +379,10 @@ export namespace table { } } -const getWidestColumnWith = (data: any[], columnKey: string): number => { - return data.reduce((previous, current) => { - const d = current[columnKey] - // convert multi-line cell to single longest line - // for width calculations - const manyLines = (d as string).split('\n') - return Math.max(previous, manyLines.length > 1 ? Math.max(...manyLines.map((r: string) => sw(r))) : sw(d)) - }, 0) -} +const getWidestColumnWith = (data: any[], columnKey: string): number => data.reduce((previous, current) => { + const d = current[columnKey] + // convert multi-line cell to single longest line + // for width calculations + const manyLines = (d as string).split('\n') + return Math.max(previous, manyLines.length > 1 ? Math.max(...manyLines.map((r: string) => sw(r))) : sw(d)) +}, 0) diff --git a/src/cli-ux/wait.ts b/src/cli-ux/wait.ts index 3d5560c4b..7514385ff 100644 --- a/src/cli-ux/wait.ts +++ b/src/cli-ux/wait.ts @@ -1,5 +1,3 @@ -export default (ms = 1000): Promise => { - return new Promise(resolve => { - setTimeout(resolve, ms) - }) -} +export default (ms = 1000): Promise => new Promise(resolve => { + setTimeout(resolve, ms) +}) diff --git a/src/command.ts b/src/command.ts index c29d722ee..5164a3bdd 100644 --- a/src/command.ts +++ b/src/command.ts @@ -64,7 +64,7 @@ export abstract class Command { * The tweet-sized description for your class, used in a parent-commands * sub-command listing and as the header for the command help. */ - public static summary?: string; + public static summary?: string /** * A full description of how to use the command. @@ -77,9 +77,9 @@ export abstract class Command { public static hidden: boolean /** Mark the command as a given state (e.g. beta or deprecated) in help */ - public static state?: 'beta' | 'deprecated' | string; + public static state?: 'beta' | 'deprecated' | string - public static deprecationOptions?: Deprecation; + public static deprecationOptions?: Deprecation /** * Emit deprecation warning when a command alias is used @@ -104,9 +104,9 @@ export abstract class Command { public static plugin: Plugin | undefined - public static readonly pluginName?: string; - public static readonly pluginType?: string; - public static readonly pluginAlias?: string; + public static readonly pluginName?: string + public static readonly pluginType?: string + public static readonly pluginAlias?: string /** * An array of examples to show at the end of the command's help. @@ -191,6 +191,7 @@ export abstract class Command { } static set baseFlags(flags: FlagInput) { + // eslint-disable-next-line prefer-object-spread this._baseFlags = Object.assign({}, this.baseFlags, flags) this.flags = {} // force the flags setter to run } @@ -203,6 +204,7 @@ export abstract class Command { } public static set flags(flags: FlagInput) { + // eslint-disable-next-line prefer-object-spread this._flags = Object.assign({}, this._flags ?? {}, this.baseFlags, flags) } @@ -378,7 +380,7 @@ export abstract class Command { protected async finally(_: Error | undefined): Promise { try { - const config = Errors.config + const {config} = Errors if (config.errorLogger) await config.errorLogger.flush() } catch (error: any) { console.error(error) diff --git a/src/config/config.ts b/src/config/config.ts index d4f06f910..d62fd6d8a 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -2,12 +2,12 @@ import * as ejs from 'ejs' import {ArchTypes, Config as IConfig, LoadOptions, PlatformTypes, VersionDetails} from '../interfaces/config' import {Arg, OptionFlag} from '../interfaces/parser' import {CLIError, error, exit, warn} from '../errors' -import {Debug, collectUsableIds, compact, getCommandIdPermutations} from './util' +import {Debug, collectUsableIds, getCommandIdPermutations} from './util' import {Hook, Hooks, PJSON, Topic} from '../interfaces' import {Plugin as IPlugin, Options} from '../interfaces/plugin' import {URL, fileURLToPath} from 'node:url' import {arch, homedir, userInfo as osUserInfo, platform, release, tmpdir, type} from 'node:os' -import {ensureArgObject, isProd, requireJson} from '../util' +import {compact, ensureArgObject, isProd, requireJson} from '../util' import {join, sep} from 'node:path' import {Command} from '../command' @@ -95,8 +95,8 @@ export class Config implements IConfig { public valid!: boolean public version!: string public windows!: boolean - public binAliases?: string[]; - public nsisCustomization?:string; + public binAliases?: string[] + public nsisCustomization?:string protected warned = false @@ -316,9 +316,9 @@ export class Config implements IConfig { const {isESM, module, filePath} = await loadWithData(p, join(p.root, hook)) debug('start', isESM ? '(import)' : '(require)', filePath) - const result = timeout ? - await withTimeout(timeout, search(module).call(context, {...opts as any, config: this})) : - await search(module).call(context, {...opts as any, config: this}) + const result = timeout + ? await withTimeout(timeout, search(module).call(context, {...opts as any, config: this})) + : await search(module).call(context, {...opts as any, config: this}) final.successes.push({plugin: p, result}) if (p.name === '@oclif/plugin-legacy' && event === 'init') { @@ -355,9 +355,9 @@ export class Config implements IConfig { let c = cachedCommand ?? this.findCommand(id) if (!c) { const matches = this.flexibleTaxonomy ? this.findMatches(id, argv) : [] - const hookResult = this.flexibleTaxonomy && matches.length > 0 ? - await this.runHook('command_incomplete', {id, argv, matches}) : - await this.runHook('command_not_found', {id, argv}) + const hookResult = this.flexibleTaxonomy && matches.length > 0 + ? await this.runHook('command_incomplete', {id, argv, matches}) + : await this.runHook('command_not_found', {id, argv}) if (hookResult.successes[0]) return hookResult.successes[0].result as T if (hookResult.failures[0]) throw hookResult.failures[0].error @@ -425,7 +425,7 @@ export class Config implements IConfig { * @returns {string[]} e.g. ['SF_DEBUG', 'SFDX_DEBUG'] */ public scopedEnvVarKeys(k: string): string[] { - return [this.bin, ...this.binAliases ?? []].filter(alias => Boolean(alias)).map(alias => + return [this.bin, ...this.binAliases ?? []].filter(Boolean).map(alias => [alias.replace(/@/g, '').replace(/[/-]/g, '_'), k].join('_').toUpperCase()) } @@ -469,9 +469,7 @@ export class Config implements IConfig { const possibleMatches = [...this.commandPermutations.get(partialCmdId)].map(k => this._commands.get(k)!) const matches = possibleMatches.filter(command => { - const cmdFlags = Object.entries(command.flags).flatMap(([flag, def]) => { - return def.char ? [def.char, flag] : [flag] - }) as string[] + const cmdFlags = Object.entries(command.flags).flatMap(([flag, def]) => def.char ? [def.char, flag] : [flag]) as string[] // A command is a match if the provided flags belong to the full command return flags.every(f => cmdFlags.includes(f)) @@ -540,7 +538,7 @@ export class Config implements IConfig { } public s3Url(key: string): string { - const host = this.pjson.oclif.update.s3.host + const {host} = this.pjson.oclif.update.s3 if (!host) throw new Error('no s3 host is set') const url = new URL(host) url.pathname = join(url.pathname, key) @@ -552,9 +550,9 @@ export class Config implements IConfig { } protected dir(category: 'cache' | 'data' | 'config'): string { - const base = process.env[`XDG_${category.toUpperCase()}_HOME`] || - (this.windows && process.env.LOCALAPPDATA) || - join(this.home, category === 'data' ? '.local/share' : '.' + category) + const base = process.env[`XDG_${category.toUpperCase()}_HOME`] + || (this.windows && process.env.LOCALAPPDATA) + || join(this.home, category === 'data' ? '.local/share' : '.' + category) return join(base, this.dirname) } @@ -576,7 +574,7 @@ export class Config implements IConfig { protected _shell(): string { let shellPath - const COMSPEC = process.env.COMSPEC + const {COMSPEC} = process.env const SHELL = process.env.SHELL ?? osUserInfo().shell?.split(sep)?.pop() if (SHELL) { shellPath = SHELL.split('/') @@ -586,7 +584,7 @@ export class Config implements IConfig { shellPath = ['unknown'] } - return shellPath[shellPath.length - 1] + return shellPath.at(-1) ?? 'unknown' } protected _debug(): number { @@ -671,9 +669,9 @@ export class Config implements IConfig { // v3 moved command id permutations to the manifest, but some plugins may not have // the new manifest yet. For those, we need to calculate the permutations here. - const permutations = this.flexibleTaxonomy && command.permutations === undefined ? - getCommandIdPermutations(command.id) : - command.permutations ?? [command.id] + const permutations = this.flexibleTaxonomy && command.permutations === undefined + ? getCommandIdPermutations(command.id) + : command.permutations ?? [command.id] // set every permutation for (const permutation of permutations) { this.commandPermutations.add(permutation, command.id) @@ -692,9 +690,9 @@ export class Config implements IConfig { // v3 moved command alias permutations to the manifest, but some plugins may not have // the new manifest yet. For those, we need to calculate the permutations here. - const aliasPermutations = this.flexibleTaxonomy && command.aliasPermutations === undefined ? - getCommandIdPermutations(alias) : - command.permutations ?? [alias] + const aliasPermutations = this.flexibleTaxonomy && command.aliasPermutations === undefined + ? getCommandIdPermutations(alias) + : command.permutations ?? [alias] // set every permutation for (const permutation of aliasPermutations) { this.commandPermutations.add(permutation, command.id) diff --git a/src/config/plugin-loader.ts b/src/config/plugin-loader.ts index cea5b121f..79183d3dd 100644 --- a/src/config/plugin-loader.ts +++ b/src/config/plugin-loader.ts @@ -81,7 +81,7 @@ export default class PluginLoader { // do not load oclif.devPlugins in production if (isProd()) return try { - const devPlugins = opts.rootPlugin.pjson.oclif.devPlugins + const {devPlugins} = opts.rootPlugin.pjson.oclif if (devPlugins) await this.loadPlugins(opts.rootPlugin.root, 'dev', devPlugins) } catch (error: any) { process.emitWarning(error) diff --git a/src/config/plugin.ts b/src/config/plugin.ts index 873928304..71d86eaab 100644 --- a/src/config/plugin.ts +++ b/src/config/plugin.ts @@ -1,8 +1,6 @@ -import * as globby from 'globby' import {CLIError, error} from '../errors' import { Debug, - compact, flatMap, getCommandIdPermutations, loadJSON, @@ -10,8 +8,8 @@ import { resolvePackage, } from './util' import {Plugin as IPlugin, PluginOptions} from '../interfaces/plugin' +import {compact, exists, isProd, requireJson} from '../util' import {dirname, join, parse, relative, sep} from 'node:path' -import {exists, isProd, requireJson} from '../util' import {loadWithData, loadWithDataFromManifest} from '../module-loader' import {Command} from '../command' import {Manifest} from '../interfaces/manifest' @@ -19,6 +17,7 @@ import {PJSON} from '../interfaces/pjson' import Performance from '../performance' import {Topic} from '../interfaces/topic' import {inspect} from 'node:util' +import {sync} from 'globby' import {toCached} from './config' import {tsPath} from './ts-node' @@ -216,12 +215,12 @@ export class Plugin implements IPlugin { '**/*.+(js|cjs|mjs|ts|tsx)', '!**/*.+(d.ts|test.ts|test.js|spec.ts|spec.js)?(x)', ] - const ids = globby.sync(patterns, {cwd: this.commandsDir}) + const ids = sync(patterns, {cwd: this.commandsDir}) .map(file => { const p = parse(file) const topics = p.dir.split('/') const command = p.name !== 'index' && p.name - const id = [...topics, command].filter(f => f).join(':') + const id = [...topics, command].filter(Boolean).join(':') return id === '' ? '.' : id }) this._debug('found commands', ids) @@ -243,9 +242,9 @@ export class Plugin implements IPlugin { let isESM: boolean | undefined let filePath: string | undefined try { - ({isESM, module, filePath} = cachedCommandCanBeUsed(this.manifest, id) ? - await loadWithDataFromManifest(this.manifest.commands[id], this.root) : - await loadWithData(this, join(this.commandsDir ?? this.pjson.oclif.commands, ...id.split(':')))) + ({isESM, module, filePath} = cachedCommandCanBeUsed(this.manifest, id) + ? await loadWithDataFromManifest(this.manifest.commands[id], this.root) + : await loadWithData(this, join(this.commandsDir ?? this.pjson.oclif.commands, ...id.split(':')))) this._debug(isESM ? '(import)' : '(require)', filePath) } catch (error: any) { if (!opts.must && error.code === 'MODULE_NOT_FOUND') return @@ -320,6 +319,7 @@ export class Plugin implements IPlugin { else throw this.addErrorScope(error, scope) } }))) + // eslint-disable-next-line unicorn/no-await-expression-member, unicorn/prefer-native-coercion-functions .filter((f): f is [string, Command.Cached] => Boolean(f)) .reduce((commands, [id, c]) => { commands[id] = c diff --git a/src/config/ts-node.ts b/src/config/ts-node.ts index 5f03b51bb..fd27bc33f 100644 --- a/src/config/ts-node.ts +++ b/src/config/ts-node.ts @@ -33,8 +33,8 @@ function loadTSConfig(root: string): TSConfig | undefined { ).config if (!tsconfig || !tsconfig.compilerOptions) { throw new Error( - `Could not read and parse tsconfig.json at ${tsconfigPath}, or it ` + - 'did not contain a "compilerOptions" section.') + `Could not read and parse tsconfig.json at ${tsconfigPath}, or it ` + + 'did not contain a "compilerOptions" section.') } TS_CONFIGS[root] = tsconfig diff --git a/src/config/util.ts b/src/config/util.ts index 7a2934416..4e5df77be 100644 --- a/src/config/util.ts +++ b/src/config/util.ts @@ -32,10 +32,6 @@ export function loadJSON(path: string): Promise { }) } -export function compact(a: (T | undefined)[]): T[] { - return a.filter((a): a is T => Boolean(a)) -} - function displayWarnings() { if (process.listenerCount('warning') > 1) return process.on('warning', (warning: any) => { @@ -102,6 +98,4 @@ export function getCommandIdPermutations(commandId: string): string[] { * @returns string[] */ export const collectUsableIds = (commandIds: string[]): Set => - new Set(commandIds.flatMap(id => { - return id.split(':').map((_, i, a) => a.slice(0, i + 1).join(':')) - })) + new Set(commandIds.flatMap(id => id.split(':').map((_, i, a) => a.slice(0, i + 1).join(':')))) diff --git a/src/errors/handle.ts b/src/errors/handle.ts index c7592b280..8147101ce 100644 --- a/src/errors/handle.ts +++ b/src/errors/handle.ts @@ -17,7 +17,7 @@ export async function handle(err: Error & Partial & Partia const stack = clean(err.stack || '', {pretty: true}) if (shouldPrint) { - console.error(pretty ? pretty : stack) + console.error(pretty ?? stack) } const exitCode = err.oclif?.exit !== undefined && err.oclif?.exit !== false ? err.oclif?.exit : 1 diff --git a/src/errors/index.ts b/src/errors/index.ts index 339ac8afd..17cc8217f 100644 --- a/src/errors/index.ts +++ b/src/errors/index.ts @@ -10,7 +10,6 @@ export {ModuleLoadError} from './errors/module-load' export {CLIError} from './errors/cli' export {Logger} from './logger' export {config} from './config' -export {PrettyPrintableError} export function exit(code = 0): never { throw new ExitError(code) @@ -60,3 +59,5 @@ export function memoizedWarn(input: string | Error): void { WARNINGS.add(input) } + +export {PrettyPrintableError} from '../interfaces' diff --git a/src/flags.ts b/src/flags.ts index 016157b8d..61df7db68 100644 --- a/src/flags.ts +++ b/src/flags.ts @@ -60,16 +60,14 @@ export function custom(): F export function custom( defaults?: Partial>, ): FlagDefinition { - return (options: any = {}) => { - return { - parse: async (input, _ctx, _opts) => input, - ...defaults, - ...options, - input: [] as string[], - multiple: Boolean(options.multiple === undefined ? defaults?.multiple ?? false : options.multiple), - type: 'option', - } - } + return (options: any = {}) => ({ + parse: async (input, _ctx, _opts) => input, + ...defaults, + ...options, + input: [] as string[], + multiple: Boolean(options.multiple === undefined ? defaults?.multiple ?? false : options.multiple), + type: 'option', + }) } export function boolean( @@ -84,7 +82,7 @@ export function boolean( } export const integer = custom({ - parse: async (input, _, opts) => { + async parse(input, _, opts) { if (!/^-?\d+$/.test(input)) throw new CLIError(`Expected an integer but received: ${input}`) const num = Number.parseInt(input, 10) @@ -97,7 +95,7 @@ export const integer = custom({ }) export const directory = custom({ - parse: async (input, _, opts) => { + async parse(input, _, opts) { if (opts.exists) return dirExists(input) return input @@ -105,7 +103,7 @@ export const directory = custom({ }) export const file = custom({ - parse: async (input, _, opts) => { + async parse(input, _, opts) { if (opts.exists) return fileExists(input) return input @@ -117,7 +115,7 @@ export const file = custom({ * if the string is not a valid URL. */ export const url = custom({ - parse: async input => { + async parse(input) { try { return new URL(input) } catch { @@ -128,28 +126,24 @@ export const url = custom({ export const string = custom() -export const version = (opts: Partial> = {}): BooleanFlag => { - return boolean({ - description: 'Show CLI version.', - ...opts, - parse: async (_, ctx) => { - ctx.log(ctx.config.userAgent) - ctx.exit(0) - }, - }) -} +export const version = (opts: Partial> = {}): BooleanFlag => boolean({ + description: 'Show CLI version.', + ...opts, + async parse(_, ctx) { + ctx.log(ctx.config.userAgent) + ctx.exit(0) + }, +}) -export const help = (opts: Partial> = {}): BooleanFlag => { - return boolean({ - description: 'Show CLI help.', - ...opts, - parse: async (_, cmd) => { - const Help = await loadHelpClass(cmd.config) - await new Help(cmd.config, cmd.config.pjson.helpOptions).showHelp(cmd.id ? [cmd.id, ...cmd.argv] : cmd.argv) - cmd.exit(0) - }, - }) -} +export const help = (opts: Partial> = {}): BooleanFlag => boolean({ + description: 'Show CLI help.', + ...opts, + async parse(_, cmd) { + const Help = await loadHelpClass(cmd.config) + await new Help(cmd.config, cmd.config.pjson.helpOptions).showHelp(cmd.id ? [cmd.id, ...cmd.argv] : cmd.argv) + cmd.exit(0) + }, +}) type ElementType> = T[number]; @@ -206,14 +200,12 @@ export function option( export function option( defaults: Partial, P>> & {options: T}, ): FlagDefinition { - return (options: any = {}) => { - return { - parse: async (input, _ctx, _opts) => input, - ...defaults, - ...options, - input: [] as string[], - multiple: Boolean(options.multiple === undefined ? defaults.multiple : options.multiple), - type: 'option', - } - } + return (options: any = {}) => ({ + parse: async (input, _ctx, _opts) => input, + ...defaults, + ...options, + input: [] as string[], + multiple: Boolean(options.multiple === undefined ? defaults.multiple : options.multiple), + type: 'option', + }) } diff --git a/src/help/command.ts b/src/help/command.ts index a495f7a03..7fd9524be 100644 --- a/src/help/command.ts +++ b/src/help/command.ts @@ -119,15 +119,15 @@ export class CommandHelp extends HelpFormatter { } protected usage(): string { - const usage = this.command.usage + const {usage} = this.command const body = (usage ? castArray(usage) : [this.defaultUsage()]) .map(u => { const allowedSpacing = this.opts.maxWidth - this.indentSpacing const line = `$ ${this.config.bin} ${u}`.trim() if (line.length > allowedSpacing) { const splitIndex = line.slice(0, Math.max(0, allowedSpacing)).lastIndexOf(' ') - return line.slice(0, Math.max(0, splitIndex)) + '\n' + - this.indent(this.wrap(line.slice(Math.max(0, splitIndex)), this.indentSpacing * 2)) + return line.slice(0, Math.max(0, splitIndex)) + '\n' + + this.indent(this.wrap(line.slice(Math.max(0, splitIndex)), this.indentSpacing * 2)) } return this.wrap(line) @@ -182,7 +182,7 @@ export class CommandHelp extends HelpFormatter { if (typeof a === 'string') { const lines = a .split(POSSIBLE_LINE_FEED) - .filter(line => Boolean(line)) + .filter(Boolean) // If the example is \n then format correctly if (lines.length >= 2 && !this.isCommand(lines[0]) && lines.slice(1).every(i => this.isCommand(i))) { description = lines[0] @@ -195,19 +195,19 @@ export class CommandHelp extends HelpFormatter { commands = [a.command] } - const multilineSeparator = - this.config.platform === 'win32' ? - (this.config.shell.includes('powershell') ? '`' : '^') : - '\\' + const multilineSeparator + = this.config.platform === 'win32' + ? (this.config.shell.includes('powershell') ? '`' : '^') + : '\\' // The command will be indented in the section, which is also indented const finalIndentedSpacing = this.indentSpacing * 2 - const multilineCommands = commands.map(c => { + const multilineCommands = commands.map(c => // First indent keeping room for escaped newlines - return this.indent(this.wrap(this.formatIfCommand(c), finalIndentedSpacing + 4)) + this.indent(this.wrap(this.formatIfCommand(c), finalIndentedSpacing + 4)) // Then add the escaped newline - .split(POSSIBLE_LINE_FEED).join(` ${multilineSeparator}\n `) - }).join('\n') + .split(POSSIBLE_LINE_FEED).join(` ${multilineSeparator}\n `), + ).join('\n') return `${this.wrap(description, finalIndentedSpacing)}\n\n${multilineCommands}` }).join('\n\n') diff --git a/src/help/docopts.ts b/src/help/docopts.ts index 37ef17e52..3ee8f8299 100644 --- a/src/help/docopts.ts +++ b/src/help/docopts.ts @@ -79,9 +79,7 @@ export class DocOpts { public toString(): string { const opts = this.cmd.id === '.' || this.cmd.id === '' ? [] : ['<%= command.id %>'] if (this.cmd.args) { - const a = Object.values(ensureArgObject(this.cmd.args)).map(arg => { - return arg.required ? arg.name.toUpperCase() : `[${arg.name.toUpperCase()}]` - }) || [] + const a = Object.values(ensureArgObject(this.cmd.args)).map(arg => arg.required ? arg.name.toUpperCase() : `[${arg.name.toUpperCase()}]`) || [] opts.push(...a) } @@ -156,11 +154,7 @@ export class DocOpts { delete this.flagMap[toCombine] } - if (isRequired) { - elementMap[flagName] = `(${elementMap[flagName] || ''})` - } else { - elementMap[flagName] = `[${elementMap[flagName] || ''}]` - } + elementMap[flagName] = isRequired ? `(${elementMap[flagName] || ''})` : `[${elementMap[flagName] || ''}]` // We handled this flag, don't handle it again delete this.flagMap[flagName] diff --git a/src/help/index.ts b/src/help/index.ts index 5118d81d8..92a270177 100644 --- a/src/help/index.ts +++ b/src/help/index.ts @@ -2,7 +2,7 @@ import * as Interfaces from '../interfaces' import {compact, sortBy, uniqBy} from '../util' import {formatCommandDeprecationWarning, getHelpFlagAdditions, standardizeIDFromArgv, toConfiguredId} from './util' import {Command} from '../command' -import CommandHelp from './command' +import {CommandHelp} from './command' import {HelpFormatter} from './formatter' import RootHelp from './root' import {error} from '../errors' @@ -64,7 +64,7 @@ export class Help extends HelpBase { } protected get sortedCommands(): Command.Loadable[] { - let commands = this.config.commands + let {commands} = this.config commands = commands.filter(c => this.opts.all || !c.hidden) commands = sortBy(commands, c => c.id) @@ -150,9 +150,9 @@ export class Help extends HelpBase { if (state) { this.log( - state === 'deprecated' ? - `${formatCommandDeprecationWarning(toConfiguredId(name, this.config), command.deprecationOptions)}` : - `This command is in ${state}.\n`, + state === 'deprecated' + ? `${formatCommandDeprecationWarning(toConfiguredId(name, this.config), command.deprecationOptions)}` + : `This command is in ${state}.\n`, ) } @@ -187,9 +187,9 @@ export class Help extends HelpBase { const state = this.config.pjson?.oclif?.state if (state) { this.log( - state === 'deprecated' ? - `${this.config.bin} is deprecated` : - `${this.config.bin} is in ${state}.\n`, + state === 'deprecated' + ? `${this.config.bin} is deprecated` + : `${this.config.bin} is in ${state}.\n`, ) } @@ -214,7 +214,7 @@ export class Help extends HelpBase { } protected async showTopicHelp(topic: Interfaces.Topic): Promise { - const name = topic.name + const {name} = topic const depth = name.split(':').length const subTopics = this.sortedTopics.filter(t => t.name.startsWith(name + ':') && t.name.split(':').length === depth + 1) diff --git a/src/help/util.ts b/src/help/util.ts index 594cde087..03e2c758a 100644 --- a/src/help/util.ts +++ b/src/help/util.ts @@ -13,7 +13,7 @@ function extractClass(exported: any): HelpBaseDerived { } export async function loadHelpClass(config: IConfig): Promise { - const pjson = config.pjson + const {pjson} = config const configuredClass = pjson && pjson.oclif && pjson.oclif.helpClass if (configuredClass) { @@ -28,7 +28,6 @@ export async function loadHelpClass(config: IConfig): Promise { return Help } -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types export function template(context: any): (t: string) => string { function render(t: string): string { return ejs.render(t, context) diff --git a/src/index.ts b/src/index.ts index 9985d7afd..9a9188363 100644 --- a/src/index.ts +++ b/src/index.ts @@ -1,56 +1,4 @@ -import * as Args from './args' -import * as Errors from './errors' -import * as Flags from './flags' -import * as Interfaces from './interfaces' -import * as Parser from './parser' -import * as ux from './cli-ux' -import {CommandHelp, Help, HelpBase, loadHelpClass} from './help' -import {Config, Plugin, toCached, tsPath} from './config' -import {HelpSection, HelpSectionKeyValueTable, HelpSectionRenderer} from './help/formatter' -import {Settings, settings} from './settings' -import {stderr, stdout} from './cli-ux/stream' -import {toConfiguredId, toStandardizedId} from './help/util' - -import {Command} from './command' -import {Hook} from './interfaces/hooks' -import Performance from './performance' -import execute from './execute' -import {flush} from './cli-ux/flush' -import {handle} from './errors/handle' -import run from './main' - -export { - Args, - Command, - CommandHelp, - Config, - Errors, - execute, - Flags, - flush, - handle, - Help, - HelpBase, - HelpSection, - HelpSectionKeyValueTable, - HelpSectionRenderer, - Hook, - Interfaces, - loadHelpClass, - Parser, - Performance, - Plugin, - run, - settings, - Settings, - stderr, - stdout, - toCached, - toConfiguredId, - toStandardizedId, - tsPath, - ux, -} +import {stderr} from './cli-ux/stream' function checkCWD() { try { @@ -63,3 +11,23 @@ function checkCWD() { } checkCWD() + +export * as Args from './args' +export * as Errors from './errors' +export * as Flags from './flags' +export * as Interfaces from './interfaces' +export * as Parser from './parser' +export * as ux from './cli-ux' +export {CommandHelp, HelpBase, Help, loadHelpClass} from './help' +export {Config, toCached, Plugin, tsPath} from './config' +export {HelpSection, HelpSectionRenderer, HelpSectionKeyValueTable} from './help/formatter' +export {Settings, settings} from './settings' +export {stdout, stderr} from './cli-ux/stream' +export {toConfiguredId, toStandardizedId} from './help/util' +export {Command} from './command' +export {Hook} from './interfaces/hooks' +export {default as Performance} from './performance' +export {default as execute} from './execute' +export {flush} from './cli-ux/flush' +export {handle} from './errors/handle' +export {default as run} from './main' diff --git a/src/module-loader.ts b/src/module-loader.ts index 3e751ae19..c3105d027 100644 --- a/src/module-loader.ts +++ b/src/module-loader.ts @@ -14,9 +14,7 @@ const getPackageType = require('get-package-type') // eslint-disable-next-line camelcase const s_EXTENSIONS: string[] = ['.ts', '.js', '.mjs', '.cjs'] -const isPlugin = (config: IConfig|IPlugin): config is IPlugin => { - return (config).type !== undefined -} +const isPlugin = (config: IConfig|IPlugin): config is IPlugin => (config).type !== undefined /** * Loads and returns a module. @@ -140,16 +138,19 @@ export function isPathModule(filePath: string): boolean { case '.js': case '.jsx': case '.ts': - case '.tsx': + case '.tsx': { return getPackageType.sync(filePath) === 'module' + } case '.mjs': - case '.mts': + case '.mts': { return true + } - default: + default: { return false } + } } /** diff --git a/src/parser/parse.ts b/src/parser/parse.ts index 0e2988c3c..6376ec80c 100644 --- a/src/parser/parse.ts +++ b/src/parser/parse.ts @@ -22,10 +22,9 @@ import {createInterface} from 'node:readline' let debug: any try { - // eslint-disable-next-line no-negated-condition - debug = process.env.CLI_FLAGS_DEBUG !== '1' ? () => { + debug = process.env.CLI_FLAGS_DEBUG === '1' ? require('debug')('../parser') : () => { // noop - } : require('debug')('../parser') + } } catch { debug = () => { // noop @@ -46,7 +45,7 @@ const readStdin = async (): Promise => { return new Promise(resolve => { let result = '' const ac = new AbortController() - const signal = ac.signal + const {signal} = ac const timeout = setTimeout(() => ac.abort(), 100) const rl = createInterface({ @@ -101,9 +100,7 @@ export class Parser f.type === 'boolean') as any - this.flagAliases = Object.fromEntries(Object.values(input.flags).flatMap(flag => { - return ([...flag.aliases ?? [], ...flag.charAliases ?? []]).map(a => [a, flag]) - })) + this.flagAliases = Object.fromEntries(Object.values(input.flags).flatMap(flag => ([...flag.aliases ?? [], ...flag.charAliases ?? []]).map(a => [a, flag]))) } public async parse(): Promise> { @@ -142,7 +139,7 @@ export class Parser v.trim().replace(/^"(.*)"$/, '$1').replace(/^'(.*)'$/, '$1')) .map(async v => parseFlagOrThrowError(v, i.inputFlag.flag, this.context, {...last(i.tokens) as FlagToken, input: v})), + // eslint-disable-next-line unicorn/no-await-expression-member )).map(v => validateOptions(i.inputFlag.flag as OptionFlag, v)), } } @@ -321,18 +319,19 @@ export class Parser Promise.resolve(isTruthy(process.env[i.inputFlag.flag.env as string] ?? 'false')), + valueFunction: async (i: FlagWithStrategy) => isTruthy(process.env[i.inputFlag.flag.env as string] ?? 'false'), } } } // no input, but flag has default value + // eslint-disable-next-line no-constant-binary-expression, valid-typeof if (typeof fws.inputFlag.flag.default !== undefined) { return { ...fws, metadata: {setFromDefault: true}, - valueFunction: typeof fws.inputFlag.flag.default === 'function' ? - (i: FlagWithStrategy, allFlags = {}) => fws.inputFlag.flag.default({options: i.inputFlag.flag, flags: allFlags}) : - async () => fws.inputFlag.flag.default, + valueFunction: typeof fws.inputFlag.flag.default === 'function' + ? (i: FlagWithStrategy, allFlags = {}) => fws.inputFlag.flag.default({options: i.inputFlag.flag, flags: allFlags}) + : async () => fws.inputFlag.flag.default, } } @@ -343,11 +342,11 @@ export class Parser { if (fws.inputFlag.flag.type === 'option' && fws.inputFlag.flag.defaultHelp) { return { - ...fws, helpFunction: typeof fws.inputFlag.flag.defaultHelp === 'function' ? + ...fws, helpFunction: typeof fws.inputFlag.flag.defaultHelp === 'function' // @ts-expect-error flag type isn't specific enough to know defaultHelp will definitely be there - (i: FlagWithStrategy, flags: Record, ...context) => i.inputFlag.flag.defaultHelp({options: i.inputFlag, flags}, ...context) : + ? (i: FlagWithStrategy, flags: Record, ...context) => i.inputFlag.flag.defaultHelp({options: i.inputFlag, flags}, ...context) // @ts-expect-error flag type isn't specific enough to know defaultHelp will definitely be there - (i: FlagWithStrategy) => i.inputFlag.flag.defaultHelp, + : (i: FlagWithStrategy) => i.inputFlag.flag.defaultHelp, } } @@ -465,7 +464,7 @@ export class Parser): Promise[] { return ((flag.relationships ?? []).map(relationship => { switch (relationship.type) { - case 'all': + case 'all': { return validateDependsOn(name, relationship.flags) - case 'some': + } + + case 'some': { return validateSome(name, relationship.flags) - case 'none': + } + + case 'none': { return validateExclusive(name, relationship.flags) - default: + } + + default: { throw new Error(`Unknown relationship type: ${relationship.type}`) } + } })) } diff --git a/src/performance.ts b/src/performance.ts index 6420e4d10..24cc11f03 100644 --- a/src/performance.ts +++ b/src/performance.ts @@ -25,10 +25,10 @@ type PerfHighlights = { } class Marker { - public module: string; - public method: string; - public scope: string; - public stopped = false; + public module: string + public method: string + public scope: string + public stopped = false private startMarker: string private stopMarker: string diff --git a/src/util.ts b/src/util.ts index be4091618..ccd8ad9f9 100644 --- a/src/util.ts +++ b/src/util.ts @@ -13,6 +13,7 @@ export function pickBy(a: (T | undefined)[]): T[] { + // eslint-disable-next-line unicorn/prefer-native-coercion-functions return a.filter((a): a is T => Boolean(a)) } @@ -25,7 +26,7 @@ export function uniqBy(arr: T[], fn: (cur: T) => any): T[] { export function last(arr?: T[]): T | undefined { if (!arr) return - return arr.slice(-1)[0] + return arr.at(-1) } type SortTypes = string | number | undefined | boolean @@ -93,7 +94,8 @@ export const dirExists = async (input: string): Promise => { throw new Error(`No directory found at ${input}`) } - if (!(await stat(input)).isDirectory()) { + const fileStat = await stat(input) + if (!fileStat.isDirectory()) { throw new Error(`${input} exists but is not a directory`) } @@ -105,7 +107,8 @@ export const fileExists = async (input: string): Promise => { throw new Error(`No file found at ${input}`) } - if (!(await stat(input)).isFile()) { + const fileStat = await stat(input) + if (!fileStat.isFile()) { throw new Error(`${input} exists but is not a file`) } @@ -132,9 +135,7 @@ export function requireJson(...pathParts: string[]): T { * @returns ArgInput */ export function ensureArgObject(args?: any[] | ArgInput | { [name: string]: Command.Arg.Cached}): ArgInput { - return (Array.isArray(args) ? (args ?? []).reduce((x, y) => { - return {...x, [y.name]: y} - }, {} as ArgInput) : args ?? {}) as ArgInput + return (Array.isArray(args) ? (args ?? []).reduce((x, y) => ({...x, [y.name]: y}), {} as ArgInput) : args ?? {}) as ArgInput } export function uniq(arr: T[]): T[] { diff --git a/test/cli-ux/fancy.ts b/test/cli-ux/fancy.ts index b68fd2f9c..f6709c0d3 100644 --- a/test/cli-ux/fancy.ts +++ b/test/cli-ux/fancy.ts @@ -1,14 +1,9 @@ -import {FancyTypes, fancy as base, expect} from 'fancy-test' +import {fancy as base} from 'fancy-test' import {rm} from 'node:fs/promises' import {join} from 'node:path' import {ux} from '../../src/cli-ux' -export { - expect, - FancyTypes, -} - let count = 0 export const fancy = base @@ -19,6 +14,9 @@ export const fancy = base const chalk = require('chalk') chalk.level = 0 }) +// eslint-disable-next-line unicorn/prefer-top-level-await .finally(async () => { await ux.done() }) + +export {FancyTypes, expect} from 'fancy-test' diff --git a/test/cli-ux/prompt.test.ts b/test/cli-ux/prompt.test.ts index fd8c6815c..59ae25ce6 100644 --- a/test/cli-ux/prompt.test.ts +++ b/test/cli-ux/prompt.test.ts @@ -1,6 +1,6 @@ import * as chai from 'chai' -const expect = chai.expect +const {expect} = chai import {ux} from '../../src/cli-ux' diff --git a/test/command/command.test.ts b/test/command/command.test.ts index 182625ba9..ea1ee65d4 100644 --- a/test/command/command.test.ts +++ b/test/command/command.test.ts @@ -31,11 +31,11 @@ describe('command', () => { fancy .do(async () => { class Command extends Base { - static description = 'test command' + static description = 'test command' - async run() { - return 101 - } + async run() { + return 101 + } } expect(await Command.run([])).to.equal(101) @@ -73,45 +73,45 @@ describe('command', () => { fancy .do(async () => { class C extends Command { - static id = 'foo:bar' - static title = 'cmd title' - static type = 'mytype' - static usage = ['$ usage'] - static description = 'test command' - static aliases = ['alias1', 'alias2'] - static hidden = true - // @ts-ignore - static flags = { - flaga: Flags.boolean(), - flagb: Flags.string({ - char: 'b', - hidden: true, - required: false, - description: 'flagb desc', - options: ['a', 'b'], - default: async () => 'a', - }), - flagc: Flags.integer({ - char: 'c', - min: 1, - max: 10, - required: false, - description: 'flagc desc', - options: ['a', 'b'], - // @ts-expect-error: context is any - default: async context => context.options.min + 1, - }), - } - - static args = { - arg1: Args.string({ - description: 'arg1 desc', - required: true, - hidden: false, - options: ['af', 'b'], - default: async () => 'a', - }), - } + static id = 'foo:bar' + static title = 'cmd title' + static type = 'mytype' + static usage = ['$ usage'] + static description = 'test command' + static aliases = ['alias1', 'alias2'] + static hidden = true + // @ts-ignore + static flags = { + flaga: Flags.boolean(), + flagb: Flags.string({ + char: 'b', + hidden: true, + required: false, + description: 'flagb desc', + options: ['a', 'b'], + default: async () => 'a', + }), + flagc: Flags.integer({ + char: 'c', + min: 1, + max: 10, + required: false, + description: 'flagc desc', + options: ['a', 'b'], + // @ts-expect-error: context is any + default: async context => context.options.min + 1, + }), + } + + static args = { + arg1: Args.string({ + description: 'arg1 desc', + required: true, + hidden: false, + options: ['af', 'b'], + default: async () => 'a', + }), + } } const c = await toCached(C, undefined, false) @@ -276,14 +276,14 @@ describe('command', () => { .stdout() .it('has a flag', async ctx => { class CMD extends Base { - static flags = { - foo: Flags.string(), - } - - async run() { - const {flags} = await this.parse(CMD) - this.log(flags.foo) - } + static flags = { + foo: Flags.string(), + } + + async run() { + const {flags} = await this.parse(CMD) + this.log(flags.foo) + } } await CMD.run(['--foo=bar']) @@ -373,20 +373,20 @@ describe('command', () => { .stderr() .do(async () => { class CMD extends Command { - static flags = { - name: Flags.string({ - deprecated: { - to: '--full-name', - version: '2.0.0', - }, - }), - force: Flags.boolean(), - } - - async run() { - await this.parse(CMD) - this.log('running command') - } + static flags = { + name: Flags.string({ + deprecated: { + to: '--full-name', + version: '2.0.0', + }, + }), + force: Flags.boolean(), + } + + async run() { + await this.parse(CMD) + this.log('running command') + } } await CMD.run(['--name', 'astro']) @@ -401,20 +401,20 @@ describe('command', () => { .stderr() .do(async () => { class CMD extends Command { - static flags = { - name: Flags.string({ - deprecated: { - to: '--full-name', - version: '2.0.0', - }, - }), - force: Flags.boolean(), - } - - async run() { - await this.parse(CMD) - this.log('running command') - } + static flags = { + name: Flags.string({ + deprecated: { + to: '--full-name', + version: '2.0.0', + }, + }), + force: Flags.boolean(), + } + + async run() { + await this.parse(CMD) + this.log('running command') + } } await CMD.run(['--force']) @@ -429,12 +429,12 @@ describe('command', () => { .stderr() .do(async () => { class CMD extends Command { - static id = 'my:command' - static state = 'deprecated' + static id = 'my:command' + static state = 'deprecated' - async run() { - this.log('running command') - } + async run() { + this.log('running command') + } } await CMD.run([]) @@ -449,16 +449,16 @@ describe('command', () => { .stderr() .do(async () => { class CMD extends Command { - static id = 'my:command' - static state = 'deprecated' - static deprecationOptions = { - version: '2.0.0', - to: 'my:other:command', - } - - async run() { - this.log('running command') - } + static id = 'my:command' + static state = 'deprecated' + static deprecationOptions = { + version: '2.0.0', + to: 'my:other:command', + } + + async run() { + this.log('running command') + } } await CMD.run([]) @@ -506,11 +506,11 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true + static enableJsonFlag = true - async run() { - this.log('not json output') - } + async run() { + this.log('not json output') + } } const cmd = new CMD([], {} as any) @@ -522,9 +522,9 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true + static enableJsonFlag = true - async run() {} + async run() {} } const cmd = new CMD(['--json'], {} as any) @@ -536,8 +536,8 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true - async run() {} + static enableJsonFlag = true + async run() {} } // mock a scopedEnvVar being set to JSON @@ -552,13 +552,13 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true - static '--' = true + static enableJsonFlag = true + static '--' = true - async run() { - const {flags} = await cmd.parse(CMD, ['--json']) - expect(flags.json).to.equal(true, 'json flag should be true') - } + async run() { + const {flags} = await cmd.parse(CMD, ['--json']) + expect(flags.json).to.equal(true, 'json flag should be true') + } } const cmd = new CMD(['--json'], {} as any) @@ -570,14 +570,14 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true - static '--' = true - - async run() { - const {flags} = await cmd.parse(CMD, ['--', '--json']) - expect(flags.json).to.equal(false, 'json flag should be false') - expect(this.passThroughEnabled).to.equal(true, 'pass through should be true') - } + static enableJsonFlag = true + static '--' = true + + async run() { + const {flags} = await cmd.parse(CMD, ['--', '--json']) + expect(flags.json).to.equal(false, 'json flag should be false') + expect(this.passThroughEnabled).to.equal(true, 'pass through should be true') + } } const cmd = new CMD(['--', '--json'], {} as any) @@ -589,13 +589,13 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true - static '--' = true + static enableJsonFlag = true + static '--' = true - async run() { - const {flags} = await cmd.parse(CMD, ['--foo', '--json']) - expect(flags.json).to.equal(true, 'json flag should be true') - } + async run() { + const {flags} = await cmd.parse(CMD, ['--foo', '--json']) + expect(flags.json).to.equal(true, 'json flag should be true') + } } const cmd = new CMD(['foo', '--json'], {} as any) @@ -607,14 +607,14 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true - static '--' = true - - async run() { - const {flags} = await cmd.parse(CMD, ['--foo', '--', '--json']) - expect(flags.json).to.equal(false, 'json flag should be false') - expect(this.passThroughEnabled).to.equal(true, 'pass through should be true') - } + static enableJsonFlag = true + static '--' = true + + async run() { + const {flags} = await cmd.parse(CMD, ['--foo', '--', '--json']) + expect(flags.json).to.equal(false, 'json flag should be false') + expect(this.passThroughEnabled).to.equal(true, 'pass through should be true') + } } const cmd = new CMD(['--foo', '--', '--json'], {} as any) @@ -626,10 +626,10 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = true - static '--' = true + static enableJsonFlag = true + static '--' = true - async run() {} + async run() {} } const cmd = new CMD(['--json', '--'], {} as any) @@ -641,10 +641,10 @@ describe('command', () => { .stdout() .do(async () => { class CMD extends Command { - static enableJsonFlag = false - static '--' = true + static enableJsonFlag = false + static '--' = true - async run() {} + async run() {} } const cmd = new CMD(['--json'], {} as any) diff --git a/test/command/helpers/test-help-in-src/src/test-help-plugin.ts b/test/command/helpers/test-help-in-src/src/test-help-plugin.ts index 13af2ed38..de25f5e50 100644 --- a/test/command/helpers/test-help-in-src/src/test-help-plugin.ts +++ b/test/command/helpers/test-help-in-src/src/test-help-plugin.ts @@ -4,7 +4,6 @@ import {HelpBase, Interfaces} from '../../../../../src' export type TestHelpClassConfig = Interfaces.Config & { showCommandHelpSpy?: SinonSpy; showHelpSpy?: SinonSpy } export default class extends HelpBase { - // eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types constructor(config: any, opts: any) { super(config, opts) config.showCommandHelpSpy = this.showCommandHelp diff --git a/test/config/config.flexible.test.ts b/test/config/config.flexible.test.ts index 4799af0c2..161896812 100644 --- a/test/config/config.flexible.test.ts +++ b/test/config/config.flexible.test.ts @@ -49,9 +49,7 @@ describe('Config with flexible taxonomy', () => { .stub(os, 'platform', () => platform) const load = async (): Promise => {} - const findCommand = async (): Promise => { - return MyCommandClass - } + const findCommand = async (): Promise => MyCommandClass const commandPluginA: Command.Loadable = { strict: false, @@ -163,7 +161,7 @@ describe('Config with flexible taxonomy', () => { }) .it('has populated command permutation index', config => { // @ts-expect-error because private member - const commandPermutations = config.commandPermutations + const {commandPermutations} = config expect(commandPermutations.get('foo')).to.deep.equal(new Set(['foo:bar', 'foo:baz'])) expect(commandPermutations.get('foo:bar')).to.deep.equal(new Set(['foo:bar'])) expect(commandPermutations.get('bar')).to.deep.equal(new Set(['foo:bar'])) diff --git a/test/config/config.test.ts b/test/config/config.test.ts index 53ec2f112..6b0e57b35 100644 --- a/test/config/config.test.ts +++ b/test/config/config.test.ts @@ -69,7 +69,6 @@ describe('Config', () => { // @ts-expect-error because readonly property config.channel = 'stable' - // eslint-disable-next-line prefer-const let {ext, ...options} = extra options = { bin: 'oclif-cli', @@ -235,23 +234,21 @@ describe('Config', () => { types = [], }: Options = {}) => { class MyCommandClass extends Command { - _base = '' + _base = '' - aliases: string[] = [] + aliases: string[] = [] - hidden = false + hidden = false - id = 'foo:bar' + id = 'foo:bar' - run(): Promise { - return Promise.resolve() - } + run(): Promise { + return Promise.resolve() + } } const load = async (): Promise => {} - const findCommand = async (): Promise => { - return MyCommandClass - } + const findCommand = async (): Promise => MyCommandClass const commandPluginA: Command.Loadable = { strict: false, diff --git a/test/config/fixtures/typescript/src/hooks/postrun.ts b/test/config/fixtures/typescript/src/hooks/postrun.ts index e88ef9687..f78977809 100644 --- a/test/config/fixtures/typescript/src/hooks/postrun.ts +++ b/test/config/fixtures/typescript/src/hooks/postrun.ts @@ -1,4 +1,4 @@ -// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types + export default function postrun(options: any): void { console.log('running ts postrun hook') if (options.Command.id === 'foo:bar:test-result') { diff --git a/test/config/test.ts b/test/config/test.ts index 898847ec7..1e7866017 100644 --- a/test/config/test.ts +++ b/test/config/test.ts @@ -1,4 +1,4 @@ -import {FancyTypes, fancy as base, expect} from 'fancy-test' +import {fancy as base} from 'fancy-test' import {Interfaces} from '../../src' @@ -10,7 +10,4 @@ export const fancy = base }, })) -export { - expect, - FancyTypes, -} +export {FancyTypes, expect} from 'fancy-test' diff --git a/test/config/ts-node.test.ts b/test/config/ts-node.test.ts index adf7b857b..5d512365a 100644 --- a/test/config/ts-node.test.ts +++ b/test/config/ts-node.test.ts @@ -35,8 +35,10 @@ describe('tsPath', () => { sandbox.restore() // Clear caches so that unit tests don't affect each other // @ts-expect-error because TS_CONFIGS is not exported + // eslint-disable-next-line import/namespace configTsNode.TS_CONFIGS = {} // @ts-expect-error because REGISTERED is not exported + // eslint-disable-next-line import/namespace configTsNode.REGISTERED = new Set() }) diff --git a/test/errors/handle.test.ts b/test/errors/handle.test.ts index 094a3ac21..11a284520 100644 --- a/test/errors/handle.test.ts +++ b/test/errors/handle.test.ts @@ -3,9 +3,8 @@ import {readFileSync} from 'node:fs' import {join} from 'node:path' import * as process from 'node:process' -import {CLIError, ExitError, config} from '../../src/errors' +import {CLIError, ExitError, config, exit as exitErrorThrower} from '../../src/errors' import {handle} from '../../src/errors/handle' -import {exit as exitErrorThrower} from '../../src/errors' const errlog = join(__dirname, '../tmp/mytest/error.log') const x = process.platform === 'win32' ? 'ยป' : 'โ€บ' diff --git a/test/help/fixtures/fixtures.ts b/test/help/fixtures/fixtures.ts index 3a4497f29..4a1661891 100644 --- a/test/help/fixtures/fixtures.ts +++ b/test/help/fixtures/fixtures.ts @@ -8,11 +8,11 @@ export class AppsCreate extends Command { static summary = 'Create an app' - static description = 'this only shows up in command help under DESCRIPTION'; + static description = 'this only shows up in command help under DESCRIPTION' - static flags = {}; + static flags = {} - static args = {}; + static args = {} async run(): Promise { 'run' @@ -23,11 +23,11 @@ export class AppsDestroy extends Command { static id = 'apps:destroy' static description = `Destroy an app - this only shows up in command help under DESCRIPTION`; + this only shows up in command help under DESCRIPTION` - static flags: Record = {}; + static flags: Record = {} - static args = {}; + static args = {} async run(): Promise { 'run' @@ -37,11 +37,11 @@ export class AppsDestroy extends Command { export class AppsIndex extends Command { static id = 'apps' - static summary = 'List all apps (app index command)'; + static summary = 'List all apps (app index command)' - static flags: Record = {}; + static flags: Record = {} - static args = {}; + static args = {} async run(): Promise { 'run' @@ -52,11 +52,11 @@ export class AppsIndexWithDesc extends Command { static id = 'apps' static description = `List all apps (app index command) -this only shows up in command help under DESCRIPTION`; +this only shows up in command help under DESCRIPTION` - static flags: Record = {}; + static flags: Record = {} - static args = {}; + static args = {} async run(): Promise { 'run' @@ -79,11 +79,11 @@ export class AppsAdminIndex extends Command { static id = 'apps:admin' static description = `List of admins for an app - this only shows up in command help under DESCRIPTION`; + this only shows up in command help under DESCRIPTION` - static flags: Record = {}; + static flags: Record = {} - static args = {}; + static args = {} async run(): Promise { 'run' @@ -94,11 +94,11 @@ export class AppsAdminAdd extends Command { static id = 'apps:admin:add' static description = `Add user to an app - this only shows up in command help under DESCRIPTION`; + this only shows up in command help under DESCRIPTION` - static flags: Record = {}; + static flags: Record = {} - static args = {}; + static args = {} async run(): Promise { 'run' @@ -111,11 +111,11 @@ export class DbCreate extends Command { static id = 'db:create' static description = `Create a db - this only shows up in command help under DESCRIPTION`; + this only shows up in command help under DESCRIPTION` - static flags = {}; + static flags = {} - static args = {}; + static args = {} async run(): Promise { 'run' diff --git a/test/help/format-command-with-options.test.ts b/test/help/format-command-with-options.test.ts index 9fe4ecaa6..f3a816dc6 100644 --- a/test/help/format-command-with-options.test.ts +++ b/test/help/format-command-with-options.test.ts @@ -20,26 +20,26 @@ const test = base describe('formatCommand', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static description = `first line + static description = `first line multiline help` - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'}), - } - - static flags = { - app: flags.string({char: 'a', hidden: true}), - foo: flags.string({char: 'f', description: 'foobar'.repeat(18)}), - force: flags.boolean({description: 'force it '.repeat(15)}), - ss: flags.boolean({description: 'newliney\n'.repeat(4)}), - remote: flags.string({char: 'r'}), - label: flags.string({char: 'l', helpLabel: '-l'}), - } + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'}), + } + + static flags = { + app: flags.string({char: 'a', hidden: true}), + foo: flags.string({char: 'f', description: 'foobar'.repeat(18)}), + force: flags.boolean({description: 'force it '.repeat(15)}), + ss: flags.boolean({description: 'newliney\n'.repeat(4)}), + remote: flags.string({char: 'r'}), + label: flags.string({char: 'l', helpLabel: '-l'}), + } }) .it('handles multi-line help output', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [-f ] [--force] [--ss] [-r @@ -71,24 +71,24 @@ ALIASES describe('arg and flag multiline handling', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'description of apps:create' + static description = 'description of apps:create' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'.repeat(35)}), - } + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'.repeat(35)}), + } - static flags = { - app: flags.string({char: 'a', hidden: true}), - foo: flags.string({char: 'f', description: 'foobar'.repeat(15)}), - force: flags.boolean({description: 'force it '.repeat(15)}), - ss: flags.boolean({description: 'newliney\n'.repeat(4)}), - remote: flags.string({char: 'r'}), - } + static flags = { + app: flags.string({char: 'a', hidden: true}), + foo: flags.string({char: 'f', description: 'foobar'.repeat(15)}), + force: flags.boolean({description: 'force it '.repeat(15)}), + ss: flags.boolean({description: 'newliney\n'.repeat(4)}), + remote: flags.string({char: 'r'}), + } }) .it('show args and flags side by side when their output do not exceed 4 lines ', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [-f ] [--force] [--ss] [-r @@ -120,24 +120,24 @@ ALIASES test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'description of apps:create' + static description = 'description of apps:create' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'.repeat(35)}), - } + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'.repeat(35)}), + } - static flags = { - app: flags.string({char: 'a', hidden: true}), - foo: flags.string({char: 'f', description: 'foobar'.repeat(20)}), - force: flags.boolean({description: 'force it '.repeat(29)}), - ss: flags.boolean({description: 'newliney\n'.repeat(5)}), - remote: flags.string({char: 'r'}), - } + static flags = { + app: flags.string({char: 'a', hidden: true}), + foo: flags.string({char: 'f', description: 'foobar'.repeat(20)}), + force: flags.boolean({description: 'force it '.repeat(29)}), + ss: flags.boolean({description: 'newliney\n'.repeat(5)}), + remote: flags.string({char: 'r'}), + } }) .it('shows stacked args and flags when the lines exceed 4', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [-f ] [--force] [--ss] [-r @@ -179,20 +179,20 @@ ALIASES describe('description', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'description of apps:create\nthese values are after and will show up in the command description' + static description = 'description of apps:create\nthese values are after and will show up in the command description' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'}), - } + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'}), + } - static flags = { - force: flags.boolean({description: 'forces'}), - } + static flags = { + force: flags.boolean({description: 'forces'}), + } }) .it('outputs command description with values after a \\n newline character', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [--force] @@ -212,9 +212,9 @@ ALIASES test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'root part of the description\nThe <%= config.bin %> CLI has <%= command.id %>' + static description = 'root part of the description\nThe <%= config.bin %> CLI has <%= command.id %>' }) .it('renders template string from description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create @@ -226,13 +226,13 @@ DESCRIPTION describe(('flags'), () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static flags = { - myenum: flags.string({ - options: ['a', 'b', 'c'], - }), - } + static flags = { + myenum: flags.string({ + options: ['a', 'b', 'c'], + }), + } }) .it('outputs flag enum', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--myenum a|b|c] @@ -271,11 +271,11 @@ OPTIONS test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static flags = { - opt: flags.boolean({allowNo: true}), - } + static flags = { + opt: flags.boolean({allowNo: true}), + } }) .it('outputs with with no options', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--opt] @@ -287,11 +287,11 @@ OPTIONS describe('args', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static args = { - arg1: Args.string({description: 'Show the options', options: ['option1', 'option2']}), - } + static args = { + arg1: Args.string({description: 'Show the options', options: ['option1', 'option2']}), + } }) .it('outputs with arg options', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [ARG1] @@ -303,18 +303,18 @@ ARGUMENTS describe('usage', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static usage = '<%= config.bin %> <%= command.id %> usage' + static usage = '<%= config.bin %> <%= command.id %> usage' }) .it('outputs usage with templates', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif apps:create usage`)) test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static usage = ['<%= config.bin %>', '<%= command.id %> usage'] + static usage = ['<%= config.bin %>', '<%= command.id %> usage'] }) .it('outputs usage arrays with templates', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif @@ -333,7 +333,7 @@ ARGUMENTS describe('examples', () => { test .commandHelp(class extends Command { - static examples = ['it handles a list of examples', 'more example text'] + static examples = ['it handles a list of examples', 'more example text'] }) .it('outputs multiple examples', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif @@ -345,7 +345,7 @@ EXAMPLES test .commandHelp(class extends Command { - static examples = ['it handles a single example'] + static examples = ['it handles a single example'] }) .it('outputs a single example', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif @@ -355,9 +355,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = ['the bin is <%= config.bin %>', 'the command id is <%= command.id %>'] + static examples = ['the bin is <%= config.bin %>', 'the command id is <%= command.id %>'] }) .it('outputs examples using templates', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -369,9 +369,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = ['<%= config.bin %> <%= command.id %> --help'] + static examples = ['<%= config.bin %> <%= command.id %> --help'] }) .it('formats if command', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -381,9 +381,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = ['Prints out help.\n<%= config.bin %> <%= command.id %> --help'] + static examples = ['Prints out help.\n<%= config.bin %> <%= command.id %> --help'] }) .it('formats if command with description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -395,9 +395,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = [{description: 'Prints out help.', command: '<%= config.bin %> <%= command.id %> --help'}] + static examples = [{description: 'Prints out help.', command: '<%= config.bin %> <%= command.id %> --help'}] }) .it('formats example object', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command diff --git a/test/help/format-command.test.ts b/test/help/format-command.test.ts index 96051ce98..ef101b8bc 100644 --- a/test/help/format-command.test.ts +++ b/test/help/format-command.test.ts @@ -20,29 +20,29 @@ const test = base describe('formatCommand', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static description = `first line + static description = `first line multiline help` - static enableJsonFlag = true - - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'}), - } - - static flags = { - app: flags.string({char: 'a', hidden: true}), - foo: flags.string({char: 'f', description: 'foobar'.repeat(18)}), - force: flags.boolean({description: 'force it '.repeat(15)}), - ss: flags.boolean({description: 'newliney\n'.repeat(4)}), - remote: flags.string({char: 'r'}), - label: flags.string({char: 'l', helpLabel: '-l'}), - } + static enableJsonFlag = true + + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'}), + } + + static flags = { + app: flags.string({char: 'a', hidden: true}), + foo: flags.string({char: 'f', description: 'foobar'.repeat(18)}), + force: flags.boolean({description: 'force it '.repeat(15)}), + ss: flags.boolean({description: 'newliney\n'.repeat(4)}), + remote: flags.string({char: 'r'}), + label: flags.string({char: 'l', helpLabel: '-l'}), + } }) .it('handles multi-line help output', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [--json] [-f ] [--force] [--ss] @@ -79,26 +79,26 @@ ALIASES describe('arg and flag multiline handling', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'description of apps:create' + static description = 'description of apps:create' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static enableJsonFlag = true + static enableJsonFlag = true - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'.repeat(35)}), - } + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'.repeat(35)}), + } - static flags = { - app: flags.string({char: 'a', hidden: true}), - foo: flags.string({char: 'f', description: 'foobar'.repeat(15)}), - force: flags.boolean({description: 'force it '.repeat(15)}), - ss: flags.boolean({description: 'newliney\n'.repeat(4)}), - remote: flags.string({char: 'r'}), - } + static flags = { + app: flags.string({char: 'a', hidden: true}), + foo: flags.string({char: 'f', description: 'foobar'.repeat(15)}), + force: flags.boolean({description: 'force it '.repeat(15)}), + ss: flags.boolean({description: 'newliney\n'.repeat(4)}), + remote: flags.string({char: 'r'}), + } }) .it('show args and flags side by side when their output do not exceed 4 lines ', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [--json] [-f ] [--force] [--ss] @@ -136,26 +136,26 @@ ALIASES test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'description of apps:create' + static description = 'description of apps:create' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static enableJsonFlag = true + static enableJsonFlag = true - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'.repeat(35)}), - } + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'.repeat(35)}), + } - static flags = { - app: flags.string({char: 'a', hidden: true}), - foo: flags.string({char: 'f', description: 'foobar'.repeat(20)}), - force: flags.boolean({description: 'force it '.repeat(29)}), - ss: flags.boolean({description: 'newliney\n'.repeat(5)}), - remote: flags.string({char: 'r'}), - } + static flags = { + app: flags.string({char: 'a', hidden: true}), + foo: flags.string({char: 'f', description: 'foobar'.repeat(20)}), + force: flags.boolean({description: 'force it '.repeat(29)}), + ss: flags.boolean({description: 'newliney\n'.repeat(5)}), + remote: flags.string({char: 'r'}), + } }) .it('shows stacked args and flags when the lines exceed 4', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [--json] [-f ] [--force] [--ss] @@ -230,22 +230,22 @@ DESCRIPTION describe('description', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'description of apps:create\n\nthese values are after and will show up in the command description' + static description = 'description of apps:create\n\nthese values are after and will show up in the command description' - static aliases = ['app:init', 'create'] + static aliases = ['app:init', 'create'] - static enableJsonFlag = true + static enableJsonFlag = true - static args = { - // eslint-disable-next-line camelcase - app_name: Args.string({description: 'app to use'}), - } + static args = { + // eslint-disable-next-line camelcase + app_name: Args.string({description: 'app to use'}), + } - static flags = { - force: flags.boolean({description: 'forces'}), - } + static flags = { + force: flags.boolean({description: 'forces'}), + } }) .it('outputs command description with values after a \\n newline character', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [APP_NAME] [--json] [--force] @@ -270,9 +270,9 @@ ALIASES test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'root part of the description\n\nThe <%= config.bin %> CLI has <%= command.id %>' + static description = 'root part of the description\n\nThe <%= config.bin %> CLI has <%= command.id %>' }) .it('renders template string from description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create @@ -284,9 +284,9 @@ DESCRIPTION test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static description = 'root part of the description\r\n\nusing both carriage \n\nreturn and new line' + static description = 'root part of the description\r\n\nusing both carriage \n\nreturn and new line' }) .it('splits on carriage return and new lines', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create @@ -303,14 +303,14 @@ DESCRIPTION describe(('flags'), () => { test .commandHelp(class extends Command { - static id = 'apps:create' - - static flags = { - myenum: flags.string({ - description: 'the description', - options: myEnumValues, - }), - } + static id = 'apps:create' + + static flags = { + myenum: flags.string({ + description: 'the description', + options: myEnumValues, + }), + } }) .it('outputs flag enum', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--myenum a|b|c] @@ -321,14 +321,14 @@ FLAGS test .commandHelp(class extends Command { - static id = 'apps:create' - - static flags = { - myenum: flags.string({ - options: myEnumValues, - helpValue: myEnumValues.join('|'), - }), - } + static id = 'apps:create' + + static flags = { + myenum: flags.string({ + options: myEnumValues, + helpValue: myEnumValues.join('|'), + }), + } }) .it('outputs flag enum with helpValue', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--myenum a|b|c] @@ -367,11 +367,11 @@ FLAGS test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static flags = { - opt: flags.boolean({allowNo: true}), - } + static flags = { + opt: flags.boolean({allowNo: true}), + } }) .it('outputs with with no options', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--opt] @@ -381,14 +381,14 @@ FLAGS test .commandHelp(class extends Command { - static id = 'apps:create' - - static flags = { - opt: flags.string({ - summary: 'one line summary', - description: 'multiline\ndescription', - }), - } + static id = 'apps:create' + + static flags = { + opt: flags.string({ + summary: 'one line summary', + description: 'multiline\ndescription', + }), + } }) .it('outputs flag summary and description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--opt ] @@ -404,14 +404,14 @@ FLAG DESCRIPTIONS test .commandHelp(class extends Command { - static id = 'apps:create' - - static flags = { - opt: flags.string({ - summary: 'one line summary', - description: 'single line description', - }), - } + static id = 'apps:create' + + static flags = { + opt: flags.string({ + summary: 'one line summary', + description: 'single line description', + }), + } }) .it('outputs flag summary and single line description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--opt ] @@ -426,14 +426,14 @@ FLAG DESCRIPTIONS test .commandHelp(class extends Command { - static id = 'apps:create' - - static flags = { - opt: flags.string({ - summary: 'one line summary'.repeat(15), - description: 'single line description', - }), - } + static id = 'apps:create' + + static flags = { + opt: flags.string({ + summary: 'one line summary'.repeat(15), + description: 'single line description', + }), + } }) .it('outputs long flag summary and single line description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [--opt ] @@ -458,11 +458,11 @@ FLAG DESCRIPTIONS describe('args', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static args = { - arg1: Args.string({description: 'Show the options', options: ['option1', 'option2']}), - } + static args = { + arg1: Args.string({description: 'Show the options', options: ['option1', 'option2']}), + } }) .it('outputs with arg options', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif apps:create [ARG1] @@ -474,18 +474,18 @@ ARGUMENTS describe('usage', () => { test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static usage = '<%= config.bin %> <%= command.id %> usage' + static usage = '<%= config.bin %> <%= command.id %> usage' }) .it('outputs usage with templates', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif apps:create usage`)) test .commandHelp(class extends Command { - static id = 'apps:create' + static id = 'apps:create' - static usage = ['<%= config.bin %>', '<%= command.id %> usage'] + static usage = ['<%= config.bin %>', '<%= command.id %> usage'] }) .it('outputs usage arrays with templates', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif @@ -504,7 +504,7 @@ ARGUMENTS describe('examples', () => { test .commandHelp(class extends Command { - static examples = ['it handles a list of examples', 'more example text'] + static examples = ['it handles a list of examples', 'more example text'] }) .it('outputs multiple examples', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif @@ -516,7 +516,7 @@ EXAMPLES test .commandHelp(class extends Command { - static examples = ['it handles a single example'] + static examples = ['it handles a single example'] }) .it('outputs a single example', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif @@ -526,9 +526,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = ['the bin is <%= config.bin %>', 'the command id is <%= command.id %>'] + static examples = ['the bin is <%= config.bin %>', 'the command id is <%= command.id %>'] }) .it('outputs examples using templates', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -540,9 +540,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = ['<%= config.bin %> <%= command.id %> --help'] + static examples = ['<%= config.bin %> <%= command.id %> --help'] }) .it('formats if command', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -552,9 +552,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = ['Prints out help.\n<%= config.bin %> <%= command.id %> --help'] + static examples = ['Prints out help.\n<%= config.bin %> <%= command.id %> --help'] }) .it('formats if command with description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -566,9 +566,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = ['Prints out help.\n<%= config.bin %> <%= command.id %> --help\n<%= config.bin %> <%= command.id %> --help'] + static examples = ['Prints out help.\n<%= config.bin %> <%= command.id %> --help\n<%= config.bin %> <%= command.id %> --help'] }) .it('formats if multiple command with description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -581,9 +581,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = [{description: 'Prints out help.', command: '<%= config.bin %> <%= command.id %> --help'}] + static examples = [{description: 'Prints out help.', command: '<%= config.bin %> <%= command.id %> --help'}] }) .it('formats example object', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -595,9 +595,9 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = [{description: 'force it '.repeat(15), command: '<%= config.bin %> <%= command.id %> --help'}] + static examples = [{description: 'force it '.repeat(15), command: '<%= config.bin %> <%= command.id %> --help'}] }) .it('formats example object with long description', (ctx: any) => expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command @@ -610,15 +610,15 @@ EXAMPLES test .commandHelp(class extends Command { - static id = 'oclif:command' + static id = 'oclif:command' - static examples = [{description: 'Prints out help.', command: '<%= config.bin %> <%= command.id %> ' + 'force it '.repeat(15)}] + static examples = [{description: 'Prints out help.', command: '<%= config.bin %> <%= command.id %> ' + 'force it '.repeat(15)}] }) .it('formats example object with long command', (ctx: any) => { - const multilineSeparator = - ctx.config.platform === 'win32' ? - (ctx.config.shell.includes('powershell') ? '`' : '^') : - '\\' + const multilineSeparator + = ctx.config.platform === 'win32' + ? (ctx.config.shell.includes('powershell') ? '`' : '^') + : '\\' expect(ctx.commandHelp).to.equal(`USAGE $ oclif oclif:command diff --git a/test/help/format-root.test.ts b/test/help/format-root.test.ts index 094223c6c..c8d18a956 100644 --- a/test/help/format-root.test.ts +++ b/test/help/format-root.test.ts @@ -48,15 +48,13 @@ USAGE describe('description', () => { test - .rootHelp(config => { - return { - ...config, - pjson: { - ...config.pjson, - description: 'This is the top-level description that appears in the root\nThis appears in the description section after usage', - }, - } - }) + .rootHelp(config => ({ + ...config, + pjson: { + ...config.pjson, + description: 'This is the top-level description that appears in the root\nThis appears in the description section after usage', + }, + })) .it('splits on \\n for the description into the top-level and description sections', ctx => { expect(ctx.commandHelp).to.equal(`This is the top-level description that appears in the root @@ -71,15 +69,13 @@ DESCRIPTION }) test - .rootHelp(config => { - return { - ...config, - pjson: { - ...config.pjson, - description: 'This is the top-level description for <%= config.bin %>\nThis <%= config.bin %> appears in the description section after usage', - }, - } - }) + .rootHelp(config => ({ + ...config, + pjson: { + ...config.pjson, + description: 'This is the top-level description for <%= config.bin %>\nThis <%= config.bin %> appears in the description section after usage', + }, + })) .it('shows description from a template', ctx => { expect(ctx.commandHelp).to.equal(`This is the top-level description for oclif @@ -94,19 +90,17 @@ DESCRIPTION }) test - .rootHelp(config => { - return { - ...config, - pjson: { - ...config.pjson, - description: 'THIS IS THE PJSON DESCRIPTION', - oclif: { - ...config.pjson?.oclif, - description: 'THIS IS THE OCLIF DESCRIPTION IN PJSON', - }, + .rootHelp(config => ({ + ...config, + pjson: { + ...config.pjson, + description: 'THIS IS THE PJSON DESCRIPTION', + oclif: { + ...config.pjson?.oclif, + description: 'THIS IS THE OCLIF DESCRIPTION IN PJSON', }, - } - }) + }, + })) .it('prefers the oclif description over the package.json description', ctx => { expect(ctx.commandHelp).to.equal(`THIS IS THE OCLIF DESCRIPTION IN PJSON @@ -118,19 +112,17 @@ USAGE }) test - .rootHelp(config => { - return { - ...config, - pjson: { - ...config.pjson, - description: 'THIS IS THE PJSON DESCRIPTION', - oclif: { - ...config.pjson?.oclif, - description: undefined, - }, + .rootHelp(config => ({ + ...config, + pjson: { + ...config.pjson, + description: 'THIS IS THE PJSON DESCRIPTION', + oclif: { + ...config.pjson?.oclif, + description: undefined, }, - } - }) + }, + })) .it('uses package.json description when the oclif description is not set', ctx => { expect(ctx.commandHelp).to.equal(`THIS IS THE PJSON DESCRIPTION diff --git a/test/help/format-topic.test.ts b/test/help/format-topic.test.ts index d3e784b98..4dfcf01ed 100644 --- a/test/help/format-topic.test.ts +++ b/test/help/format-topic.test.ts @@ -6,9 +6,7 @@ g.oclif.columns = 80 const test = base .loadConfig() -.add('help', ctx => { - return new TestHelp(ctx.config as any) -}) +.add('help', ctx => new TestHelp(ctx.config as any)) .register('topicHelp', topicHelp) describe('formatHelp', () => { diff --git a/test/help/help-test-utils.ts b/test/help/help-test-utils.ts index e225fbaed..cf94558b2 100644 --- a/test/help/help-test-utils.ts +++ b/test/help/help-test-utils.ts @@ -1,4 +1,4 @@ -/* eslint-disable @typescript-eslint/explicit-module-boundary-types */ + import {Command} from '../../src/command' import stripAnsi = require('strip-ansi') diff --git a/test/help/show-customized-help.test.ts b/test/help/show-customized-help.test.ts index a4fefe586..0c3c2d70d 100644 --- a/test/help/show-customized-help.test.ts +++ b/test/help/show-customized-help.test.ts @@ -32,7 +32,7 @@ ${this.indent(this.wrap('force it '.repeat(29)))}`, class TestHelp extends Help { CommandHelpClass = TestCommandHelp - public config: any; + public config: any constructor(config: Interfaces.Config, opts: Partial = {}) { super(config, opts) @@ -87,7 +87,7 @@ describe('showHelp for root', () => { .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', @@ -119,7 +119,7 @@ COMMANDS .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', @@ -150,7 +150,7 @@ describe('showHelp for a command', () => { .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', @@ -180,7 +180,7 @@ CUSTOM .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', diff --git a/test/help/show-help.test.ts b/test/help/show-help.test.ts index 3ca027700..d00f8fdd2 100644 --- a/test/help/show-help.test.ts +++ b/test/help/show-help.test.ts @@ -13,7 +13,7 @@ g.oclif.columns = 80 // extension makes previously protected methods public class TestHelp extends Help { - public config: any; + public config: any public async showRootHelp() { return super.showRootHelp() @@ -97,7 +97,7 @@ COMMANDS .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', @@ -127,7 +127,7 @@ describe('showHelp for a topic', () => { .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', @@ -153,7 +153,7 @@ COMMANDS .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', @@ -182,7 +182,7 @@ COMMANDS .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', @@ -212,7 +212,7 @@ COMMANDS .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', commands: [AppsCreate, AppsDestroy, AppsAdminAdd, DbCreate], @@ -242,7 +242,7 @@ describe('showHelp for a command', () => { .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', commands: [AppsCreate], @@ -268,7 +268,7 @@ DESCRIPTION .loadConfig() .stdout() .do(async ctx => { - const config = ctx.config + const {config} = ctx monkeyPatchCommands(config, [{ name: 'plugin-1', commands: [AppsIndex, AppsCreate, AppsAdminAdd], diff --git a/test/integration/esm-cjs.ts b/test/integration/esm-cjs.ts index 5946252f6..8c74544df 100644 --- a/test/integration/esm-cjs.ts +++ b/test/integration/esm-cjs.ts @@ -98,6 +98,7 @@ type PluginConfig = { hookText: string; } +// eslint-disable-next-line unicorn/prefer-top-level-await (async () => { const PLUGINS: Record = { esm1: { @@ -202,7 +203,8 @@ type PluginConfig = { async function cleanUp(options: CleanUpOptions): Promise { await options.executor.executeCommand(`plugins:uninstall ${options.plugin.package}`) - expect((await options.executor.executeCommand('plugins')).stdout).to.not.include(options.plugin.package) + const {stdout} = await options.executor.executeCommand('plugins') + expect(stdout).to.not.include(options.plugin.package) } const args = process.argv.slice(process.argv.indexOf(__filename) + 1) diff --git a/test/integration/util.ts b/test/integration/util.ts index ea5c3e489..2bf3e8cf5 100644 --- a/test/integration/util.ts +++ b/test/integration/util.ts @@ -1,6 +1,5 @@ -import {rm} from 'shelljs' -import {mkdir} from 'node:fs/promises' +import {mkdir, rm} from 'node:fs/promises' import {ExecException, ExecSyncOptionsWithBufferEncoding, execSync} from 'node:child_process' import * as chalk from 'chalk' import {existsSync, readFileSync, writeFileSync} from 'node:fs' @@ -35,7 +34,7 @@ export type ExecOptions = ExecSyncOptionsWithBufferEncoding & {silent?: boolean} function updatePkgJson(testDir: string, obj: Record): Interfaces.PJSON { const pkgJsonFile = join(testDir, 'package.json') - const pkgJson = JSON.parse(readFileSync(pkgJsonFile, 'utf-8')) + const pkgJson = JSON.parse(readFileSync(pkgJsonFile, 'utf8')) obj.dependencies = Object.assign(pkgJson.dependencies || {}, obj.dependencies || {}) obj.resolutions = Object.assign(pkgJson.resolutions || {}, obj.resolutions || {}) const updated = Object.assign(pkgJson, obj) @@ -72,9 +71,9 @@ export class Executor { } public executeCommand(cmd: string, script: 'run' | 'dev' = 'run', options: ExecOptions = {}): Promise { - const executable = process.platform === 'win32' ? - join('bin', `${script}.cmd`) : - join('bin', `${script}${this.usesJsScript ? '.js' : ''}`) + const executable = process.platform === 'win32' + ? join('bin', `${script}.cmd`) + : join('bin', `${script}${this.usesJsScript ? '.js' : ''}`) return this.executeInTestDir(`${executable} ${cmd}`, options) } @@ -140,7 +139,7 @@ export async function setup(testFile: string, options: SetupOptions): Promise({ - parse: async (input, _, opts) => { + async parse(input, _, opts) { const value = opts.unit === 'minutes' ? new Date(input).getMinutes() : new Date(input).getSeconds() - return Promise.resolve(value) + return value }, default: async _ctx => _ctx.options.unit === 'minutes' ? 1 : 2, defaultHelp: async _ctx => _ctx.options.unit === 'minutes' ? '1 minute' : '2 seconds', diff --git a/test/parser/parse.test.ts b/test/parser/parse.test.ts index 4074cc0ca..642a46f91 100644 --- a/test/parser/parse.test.ts +++ b/test/parser/parse.test.ts @@ -5,7 +5,7 @@ import {parse} from '../../src/parser' import {Args, Flags} from '../../src' import {FlagDefault} from '../../src/interfaces/parser' import {URL} from 'node:url' -import * as sinon from 'sinon' +import {createSandbox, SinonStub} from 'sinon' import {CLIError} from '../../src/errors' config.truncateThreshold = 0 @@ -109,7 +109,7 @@ describe('parse', () => { const out = await parse(['--foo', 'baz'], { flags: { foo: Flags.custom({ - defaultHelp: async () => { + async defaultHelp() { throw new Error('failed to get default help value') }, })(), @@ -831,7 +831,7 @@ See more help with --help`) describe('parse with a default/value of another type (class)', async () => { class TestClass { - public prop: string; + public prop: string constructor(input: string) { this.prop = input } @@ -1561,9 +1561,9 @@ See more help with --help`) }) describe('fs flags', () => { - const sandbox = sinon.createSandbox() - let accessStub: sinon.SinonStub - let statStub: sinon.SinonStub + const sandbox = createSandbox() + let accessStub: SinonStub + let statStub: SinonStub beforeEach(() => { accessStub = sandbox.stub(fs.promises, 'access') diff --git a/test/parser/validate.test.ts b/test/parser/validate.test.ts index bd80e66f6..c5c1513c9 100644 --- a/test/parser/validate.test.ts +++ b/test/parser/validate.test.ts @@ -207,7 +207,7 @@ describe('validate', () => { type: 'all', flags: [ 'cookies', - {name: 'sprinkles', when: async () => Promise.resolve(false)}, + {name: 'sprinkles', when: async () => false}, ], }, ], @@ -292,7 +292,7 @@ describe('validate', () => { 'cookies', { name: 'sprinkles', - when: async (flags: {birthday: boolean}) => Promise.resolve(flags.birthday), + when: async (flags: {birthday: boolean}) => flags.birthday, }, ], }, @@ -340,7 +340,7 @@ describe('validate', () => { 'cookies', { name: 'sprinkles', - when: async (flags: {birthday: boolean}) => Promise.resolve(flags.birthday), + when: async (flags: {birthday: boolean}) => flags.birthday, }, ], }, @@ -469,7 +469,7 @@ describe('validate', () => { 'cookies', { name: 'sprinkles', - when: async (flags: {birthday: boolean}) => Promise.resolve(flags.birthday), + when: async (flags: {birthday: boolean}) => flags.birthday, }, ], }, @@ -517,7 +517,7 @@ describe('validate', () => { 'cookies', { name: 'sprinkles', - when: async (flags: {birthday: boolean}) => Promise.resolve(flags.birthday), + when: async (flags: {birthday: boolean}) => flags.birthday, }, ], }, @@ -652,7 +652,7 @@ describe('validate', () => { flags: [ { name: 'sprinkles', - when: async (flags: {birthday: boolean}) => Promise.resolve(flags.birthday), + when: async (flags: {birthday: boolean}) => flags.birthday, }, ], }, @@ -709,7 +709,7 @@ describe('validate', () => { flags: [ { name: 'sprinkles', - when: async (flags: {birthday: boolean}) => Promise.resolve(flags.birthday), + when: async (flags: {birthday: boolean}) => flags.birthday, }, ], }, @@ -759,7 +759,7 @@ describe('validate', () => { type: 'all', flags: [ 'sprinkles', - {name: 'cookies', when: async () => Promise.resolve(true)}, + {name: 'cookies', when: async () => true}, ], }, ], @@ -796,7 +796,7 @@ describe('validate', () => { dessert: { input: [], name: 'dessert', - exclusive: [{name: 'cookies', when: async () => Promise.resolve(true)}], + exclusive: [{name: 'cookies', when: async () => true}], }, }, args: [], @@ -848,24 +848,24 @@ describe('validate', () => { type: 'all', flags: [ 'cookies', - {name: 'sprinkles', when: async () => Promise.resolve(false)}, - {name: 'cake', when: async () => Promise.resolve(true)}, + {name: 'sprinkles', when: async () => false}, + {name: 'cake', when: async () => true}, ], }, { type: 'some', flags: [ 'brownies', - {name: 'pie', when: async () => Promise.resolve(false)}, - {name: 'fudge', when: async () => Promise.resolve(true)}, + {name: 'pie', when: async () => false}, + {name: 'fudge', when: async () => true}, ], }, { type: 'none', flags: [ 'cupcake', - {name: 'muffin', when: async () => Promise.resolve(false)}, - {name: 'scone', when: async () => Promise.resolve(true)}, + {name: 'muffin', when: async () => false}, + {name: 'scone', when: async () => true}, ], }, ], diff --git a/test/perf/parser.perf.ts b/test/perf/parser.perf.ts index da529f3c1..55e0ec213 100644 --- a/test/perf/parser.perf.ts +++ b/test/perf/parser.perf.ts @@ -17,7 +17,7 @@ suite .add('simple', { defer: true, - fn: function (deferred: { resolve: () => any }) { + fn(deferred: { resolve: () => any }) { parse(['--bool'], { flags: { bool: Flags.boolean(), @@ -27,17 +27,17 @@ suite }) .add('multiple async flags that take time', { defer: true, - fn: function (deferred: { resolve: () => any }) { + fn(deferred: { resolve: () => any }) { parse(['--flagA', 'foo', '--flagA', 'bar'], { flags: { flagA: Flags.string({ - parse: async input => { + async parse(input) { await delay100() return input }, }), flagB: Flags.string({ - parse: async input => { + async parse(input) { await delay100() return input }, @@ -49,7 +49,7 @@ suite .add('flagstravaganza', { defer: true, - fn: function (deferred: { resolve: () => any }) { + fn(deferred: { resolve: () => any }) { const flags = [ ['--bool'], ['-S', 'foo'], diff --git a/yarn.lock b/yarn.lock index 12ad48a03..8bf4bcaf9 100644 --- a/yarn.lock +++ b/yarn.lock @@ -7,21 +7,6 @@ resolved "https://registry.yarnpkg.com/@aashutoshrathi/word-wrap/-/word-wrap-1.2.6.tgz#bd9154aec9983f77b3a034ecaa015c2e4201f6cf" integrity sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA== -"@ampproject/remapping@^2.2.0": - version "2.2.1" - resolved "https://registry.yarnpkg.com/@ampproject/remapping/-/remapping-2.2.1.tgz#99e8e11851128b8702cd57c33684f1d0f260b630" - integrity sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg== - dependencies: - "@jridgewell/gen-mapping" "^0.3.0" - "@jridgewell/trace-mapping" "^0.3.9" - -"@babel/code-frame@7.12.11": - version "7.12.11" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.12.11.tgz#f4ad435aa263db935b8f10f2c552d23fb716a63f" - integrity sha512-Zt1yodBx1UcyiePMSkWnU4hPqhwq7hGi2nFL1LeA3EUl+q2LQx16MISgJ0+z7dnmgvP9QtIleuETGOiOH1RcIw== - dependencies: - "@babel/highlight" "^7.10.4" - "@babel/code-frame@^7.0.0": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.14.5.tgz#23b08d740e83f49c5e59945fbf1b43e80bbf4edb" @@ -29,160 +14,16 @@ dependencies: "@babel/highlight" "^7.14.5" -"@babel/code-frame@^7.22.13": - version "7.22.13" - resolved "https://registry.yarnpkg.com/@babel/code-frame/-/code-frame-7.22.13.tgz#e3c1c099402598483b7a8c46a721d1038803755e" - integrity sha512-XktuhWlJ5g+3TJXc5upd9Ks1HutSArik6jf2eAjYFyIOf4ej3RN+184cZbzDvbPnuTJIUhPKKJE3cIsYTiAT3w== - dependencies: - "@babel/highlight" "^7.22.13" - chalk "^2.4.2" - -"@babel/compat-data@^7.22.9": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/compat-data/-/compat-data-7.22.20.tgz#8df6e96661209623f1975d66c35ffca66f3306d0" - integrity sha512-BQYjKbpXjoXwFW5jGqiizJQQT/aC7pFm9Ok1OWssonuguICi264lbgMzRp2ZMmRSlfkX6DsWDDcsrctK8Rwfiw== - -"@babel/core@^7.12.16": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/core/-/core-7.22.20.tgz#e3d0eed84c049e2a2ae0a64d27b6a37edec385b7" - integrity sha512-Y6jd1ahLubuYweD/zJH+vvOY141v4f9igNQAQ+MBgq9JlHS2iTsZKn1aMsb3vGccZsXI16VzTBw52Xx0DWmtnA== - dependencies: - "@ampproject/remapping" "^2.2.0" - "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.22.15" - "@babel/helper-compilation-targets" "^7.22.15" - "@babel/helper-module-transforms" "^7.22.20" - "@babel/helpers" "^7.22.15" - "@babel/parser" "^7.22.16" - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.22.20" - "@babel/types" "^7.22.19" - convert-source-map "^1.7.0" - debug "^4.1.0" - gensync "^1.0.0-beta.2" - json5 "^2.2.3" - semver "^6.3.1" - -"@babel/eslint-parser@^7.12.16": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/eslint-parser/-/eslint-parser-7.22.15.tgz#263f059c476e29ca4972481a17b8b660cb025a34" - integrity sha512-yc8OOBIQk1EcRrpizuARSQS0TWAcOMpEJ1aafhNznaeYkeL+OhqnDObGFylB8ka8VFF/sZc+S4RzHyO+3LjQxg== - dependencies: - "@nicolo-ribaudo/eslint-scope-5-internals" "5.1.1-v1" - eslint-visitor-keys "^2.1.0" - semver "^6.3.1" - -"@babel/generator@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/generator/-/generator-7.22.15.tgz#1564189c7ec94cb8f77b5e8a90c4d200d21b2339" - integrity sha512-Zu9oWARBqeVOW0dZOjXc3JObrzuqothQ3y/n1kUtrjCoCPLkXUwMvOo/F/TCfoHMbWIFlWwpZtkZVb9ga4U2pA== - dependencies: - "@babel/types" "^7.22.15" - "@jridgewell/gen-mapping" "^0.3.2" - "@jridgewell/trace-mapping" "^0.3.17" - jsesc "^2.5.1" - -"@babel/helper-compilation-targets@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-compilation-targets/-/helper-compilation-targets-7.22.15.tgz#0698fc44551a26cf29f18d4662d5bf545a6cfc52" - integrity sha512-y6EEzULok0Qvz8yyLkCvVX+02ic+By2UdOhylwUOvOn9dvYc9mKICJuuU1n1XBI02YWsNsnrY1kc6DVbjcXbtw== - dependencies: - "@babel/compat-data" "^7.22.9" - "@babel/helper-validator-option" "^7.22.15" - browserslist "^4.21.9" - lru-cache "^5.1.1" - semver "^6.3.1" - -"@babel/helper-environment-visitor@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-environment-visitor/-/helper-environment-visitor-7.22.20.tgz#96159db61d34a29dba454c959f5ae4a649ba9167" - integrity sha512-zfedSIzFhat/gFhWfHtgWvlec0nqB9YEIVrpuwjruLlXfUSnA8cJB0miHKwqDnQ7d32aKo2xt88/xZptwxbfhA== - -"@babel/helper-function-name@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-function-name/-/helper-function-name-7.22.5.tgz#ede300828905bb15e582c037162f99d5183af1be" - integrity sha512-wtHSq6jMRE3uF2otvfuD3DIvVhOsSNshQl0Qrd7qC9oQJzHvOL4qQXlQn2916+CXGywIjpGuIkoyZRRxHPiNQQ== - dependencies: - "@babel/template" "^7.22.5" - "@babel/types" "^7.22.5" - -"@babel/helper-hoist-variables@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-hoist-variables/-/helper-hoist-variables-7.22.5.tgz#c01a007dac05c085914e8fb652b339db50d823bb" - integrity sha512-wGjk9QZVzvknA6yKIUURb8zY3grXCcOZt+/7Wcy8O2uctxhplmUPkOdlgoNhmdVee2c92JXbf1xpMtVNbfoxRw== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-module-imports@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-module-imports/-/helper-module-imports-7.22.15.tgz#16146307acdc40cc00c3b2c647713076464bdbf0" - integrity sha512-0pYVBnDKZO2fnSPCrgM/6WMc7eS20Fbok+0r88fp+YtWVLZrp4CkafFGIp+W0VKw4a22sgebPT99y+FDNMdP4w== - dependencies: - "@babel/types" "^7.22.15" - -"@babel/helper-module-transforms@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/helper-module-transforms/-/helper-module-transforms-7.22.20.tgz#da9edc14794babbe7386df438f3768067132f59e" - integrity sha512-dLT7JVWIUUxKOs1UnJUBR3S70YK+pKX6AbJgB2vMIvEkZkrfJDbYDJesnPshtKV4LhDOR3Oc5YULeDizRek+5A== - dependencies: - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-module-imports" "^7.22.15" - "@babel/helper-simple-access" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/helper-validator-identifier" "^7.22.20" - -"@babel/helper-simple-access@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-simple-access/-/helper-simple-access-7.22.5.tgz#4938357dc7d782b80ed6dbb03a0fba3d22b1d5de" - integrity sha512-n0H99E/K+Bika3++WNL17POvo4rKWZ7lZEp1Q+fStVbUi8nxPQEBOlTmCOxW/0JsS56SKKQ+ojAe2pHKJHN35w== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-split-export-declaration@^7.22.6": - version "7.22.6" - resolved "https://registry.yarnpkg.com/@babel/helper-split-export-declaration/-/helper-split-export-declaration-7.22.6.tgz#322c61b7310c0997fe4c323955667f18fcefb91c" - integrity sha512-AsUnxuLhRYsisFiaJwvp1QF+I3KjD5FOxut14q/GzovUe6orHLesW2C7d754kRm53h5gqrz6sFl6sxc4BVtE/g== - dependencies: - "@babel/types" "^7.22.5" - -"@babel/helper-string-parser@^7.22.5": - version "7.22.5" - resolved "https://registry.yarnpkg.com/@babel/helper-string-parser/-/helper-string-parser-7.22.5.tgz#533f36457a25814cf1df6488523ad547d784a99f" - integrity sha512-mM4COjgZox8U+JcXQwPijIZLElkgEpO5rsERVDJTc2qfCDfERyob6k5WegS14SX18IIjv+XD+GrqNumY5JRCDw== - "@babel/helper-validator-identifier@^7.14.5": version "7.15.7" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.15.7.tgz#220df993bfe904a4a6b02ab4f3385a5ebf6e2389" integrity sha512-K4JvCtQqad9OY2+yTU8w+E82ywk/fe+ELNlt1G8z3bVGlZfn/hOcQQsUhGhW/N+tb3fxK800wLtKOE/aM0m72w== -"@babel/helper-validator-identifier@^7.14.9", "@babel/helper-validator-identifier@^7.22.19", "@babel/helper-validator-identifier@^7.22.20": +"@babel/helper-validator-identifier@^7.22.5": version "7.22.20" resolved "https://registry.yarnpkg.com/@babel/helper-validator-identifier/-/helper-validator-identifier-7.22.20.tgz#c4ae002c61d2879e724581d96665583dbc1dc0e0" integrity sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A== -"@babel/helper-validator-option@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helper-validator-option/-/helper-validator-option-7.22.15.tgz#694c30dfa1d09a6534cdfcafbe56789d36aba040" - integrity sha512-bMn7RmyFjY/mdECUbgn9eoSY4vqvacUnS9i9vGAGttgFWesO6B4CYWA7XlpbWgBt71iv/hfbPlynohStqnu5hA== - -"@babel/helpers@^7.22.15": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/helpers/-/helpers-7.22.15.tgz#f09c3df31e86e3ea0b7ff7556d85cdebd47ea6f1" - integrity sha512-7pAjK0aSdxOwR+CcYAqgWOGy5dcfvzsTIfFTb2odQqW47MDfv14UaJDY6eng8ylM2EaeKXdxaSWESbkmaQHTmw== - dependencies: - "@babel/template" "^7.22.15" - "@babel/traverse" "^7.22.15" - "@babel/types" "^7.22.15" - -"@babel/highlight@^7.10.4", "@babel/highlight@^7.22.13": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.22.20.tgz#4ca92b71d80554b01427815e06f2df965b9c1f54" - integrity sha512-dkdMCN3py0+ksCgYmGG8jKeGA/8Tk+gJwSYYlFGxG5lmhfKNoAy004YpLxpS1W2J8m/EK2Ew+yOs9pVRwO89mg== - dependencies: - "@babel/helper-validator-identifier" "^7.22.20" - chalk "^2.4.2" - js-tokens "^4.0.0" - "@babel/highlight@^7.14.5": version "7.14.5" resolved "https://registry.yarnpkg.com/@babel/highlight/-/highlight-7.14.5.tgz#6861a52f03966405001f6aa534a01a24d99e8cd9" @@ -192,45 +33,6 @@ chalk "^2.0.0" js-tokens "^4.0.0" -"@babel/parser@^7.22.15", "@babel/parser@^7.22.16": - version "7.22.16" - resolved "https://registry.yarnpkg.com/@babel/parser/-/parser-7.22.16.tgz#180aead7f247305cce6551bea2720934e2fa2c95" - integrity sha512-+gPfKv8UWeKKeJTUxe59+OobVcrYHETCsORl61EmSkmgymguYk/X5bp7GuUIXaFsc6y++v8ZxPsLSSuujqDphA== - -"@babel/template@^7.22.15", "@babel/template@^7.22.5": - version "7.22.15" - resolved "https://registry.yarnpkg.com/@babel/template/-/template-7.22.15.tgz#09576efc3830f0430f4548ef971dde1350ef2f38" - integrity sha512-QPErUVm4uyJa60rkI73qneDacvdvzxshT3kksGqlGWYdOTIUOwJ7RDUL8sGqslY1uXWSL6xMFKEXDS3ox2uF0w== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/parser" "^7.22.15" - "@babel/types" "^7.22.15" - -"@babel/traverse@^7.22.15", "@babel/traverse@^7.22.20": - version "7.22.20" - resolved "https://registry.yarnpkg.com/@babel/traverse/-/traverse-7.22.20.tgz#db572d9cb5c79e02d83e5618b82f6991c07584c9" - integrity sha512-eU260mPZbU7mZ0N+X10pxXhQFMGTeLb9eFS0mxehS8HZp9o1uSnFeWQuG1UPrlxgA7QoUzFhOnilHDp0AXCyHw== - dependencies: - "@babel/code-frame" "^7.22.13" - "@babel/generator" "^7.22.15" - "@babel/helper-environment-visitor" "^7.22.20" - "@babel/helper-function-name" "^7.22.5" - "@babel/helper-hoist-variables" "^7.22.5" - "@babel/helper-split-export-declaration" "^7.22.6" - "@babel/parser" "^7.22.16" - "@babel/types" "^7.22.19" - debug "^4.1.0" - globals "^11.1.0" - -"@babel/types@^7.22.15", "@babel/types@^7.22.19", "@babel/types@^7.22.5": - version "7.22.19" - resolved "https://registry.yarnpkg.com/@babel/types/-/types-7.22.19.tgz#7425343253556916e440e662bb221a93ddb75684" - integrity sha512-P7LAw/LbojPzkgp5oznjE6tQEIWbp4PkkfrZDINTro9zgBRtI324/EYsiSI7lhPbpIQ+DCeR2NNmMWANGGfZsg== - dependencies: - "@babel/helper-string-parser" "^7.22.5" - "@babel/helper-validator-identifier" "^7.22.19" - to-fast-properties "^2.0.0" - "@colors/colors@1.5.0": version "1.5.0" resolved "https://registry.yarnpkg.com/@colors/colors/-/colors-1.5.0.tgz#bb504579c1cae923e6576a4f5da43d25f97bdbd9" @@ -380,31 +182,53 @@ dependencies: "@jridgewell/trace-mapping" "0.3.9" -"@eslint/eslintrc@^0.4.3": - version "0.4.3" - resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-0.4.3.tgz#9e42981ef035beb3dd49add17acb96e8ff6f394c" - integrity sha512-J6KFFz5QCYUJq3pf0mjEcCJVERbzv71PUIDczuh9JkwGEzced6CO5ADLHB1rbf/+oPBtoPfMYNOpGDzCANlbXw== +"@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": + version "4.4.0" + resolved "https://registry.yarnpkg.com/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz#a23514e8fb9af1269d5f7788aa556798d61c6b59" + integrity sha512-1/sA4dwrzBAyeUoQ6oxahHKmrZvsnLCg4RfxW3ZFGGmQkSNQPFNLV9CUEFQP1x9EYXHTo5p6xdhZM1Ne9p/AfA== + dependencies: + eslint-visitor-keys "^3.3.0" + +"@eslint-community/regexpp@^4.5.1", "@eslint-community/regexpp@^4.6.1": + version "4.8.1" + resolved "https://registry.yarnpkg.com/@eslint-community/regexpp/-/regexpp-4.8.1.tgz#8c4bb756cc2aa7eaf13cfa5e69c83afb3260c20c" + integrity sha512-PWiOzLIUAjN/w5K17PoF4n6sKBw0gqLHPhywmYHP4t1VFQQVYeb1yWsJwnMVEMl3tUHME7X/SJPZLmtG7XBDxQ== + +"@eslint/eslintrc@^2.1.2": + version "2.1.2" + resolved "https://registry.yarnpkg.com/@eslint/eslintrc/-/eslintrc-2.1.2.tgz#c6936b4b328c64496692f76944e755738be62396" + integrity sha512-+wvgpDsrB1YqAMdEUCcnTlpfVBH7Vqn6A/NT3D8WVXFIaKMlErPIZT3oCIAVCOtarRpMtelZLqJeU3t7WY6X6g== dependencies: ajv "^6.12.4" - debug "^4.1.1" - espree "^7.3.0" - globals "^13.9.0" - ignore "^4.0.6" + debug "^4.3.2" + espree "^9.6.0" + globals "^13.19.0" + ignore "^5.2.0" import-fresh "^3.2.1" - js-yaml "^3.13.1" - minimatch "^3.0.4" + js-yaml "^4.1.0" + minimatch "^3.1.2" strip-json-comments "^3.1.1" -"@humanwhocodes/config-array@^0.5.0": - version "0.5.0" - resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.5.0.tgz#1407967d4c6eecd7388f83acf1eaf4d0c6e58ef9" - integrity sha512-FagtKFz74XrTl7y6HCzQpwDfXP0yhxe9lHLD1UZxjvZIcbyRz8zTFF/yYNfSfzU414eDwZ1SrO0Qvtyf+wFMQg== +"@eslint/js@8.49.0": + version "8.49.0" + resolved "https://registry.yarnpkg.com/@eslint/js/-/js-8.49.0.tgz#86f79756004a97fa4df866835093f1df3d03c333" + integrity sha512-1S8uAY/MTJqVx0SC4epBq+N2yhuwtNwLbJYNZyhL2pO1ZVKn5HFXav5T41Ryzy9K9V7ZId2JB2oy/W4aCd9/2w== + +"@humanwhocodes/config-array@^0.11.11": + version "0.11.11" + resolved "https://registry.yarnpkg.com/@humanwhocodes/config-array/-/config-array-0.11.11.tgz#88a04c570dbbc7dd943e4712429c3df09bc32844" + integrity sha512-N2brEuAadi0CcdeMXUkhbZB84eskAc8MEX1By6qEchoVywSgXPIjou4rYsl0V3Hj0ZnuGycGCjdNgockbzeWNA== dependencies: - "@humanwhocodes/object-schema" "^1.2.0" + "@humanwhocodes/object-schema" "^1.2.1" debug "^4.1.1" - minimatch "^3.0.4" + minimatch "^3.0.5" -"@humanwhocodes/object-schema@^1.2.0": +"@humanwhocodes/module-importer@^1.0.1": + version "1.0.1" + resolved "https://registry.yarnpkg.com/@humanwhocodes/module-importer/-/module-importer-1.0.1.tgz#af5b2691a22b44be847b0ca81641c5fb6ad0172c" + integrity sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA== + +"@humanwhocodes/object-schema@^1.2.1": version "1.2.1" resolved "https://registry.yarnpkg.com/@humanwhocodes/object-schema/-/object-schema-1.2.1.tgz#b520529ec21d8e5945a1851dfd1c32e94e39ff45" integrity sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA== @@ -433,40 +257,16 @@ dependencies: "@sinclair/typebox" "^0.27.8" -"@jridgewell/gen-mapping@^0.3.0", "@jridgewell/gen-mapping@^0.3.2": - version "0.3.3" - resolved "https://registry.yarnpkg.com/@jridgewell/gen-mapping/-/gen-mapping-0.3.3.tgz#7e02e6eb5df901aaedb08514203b096614024098" - integrity sha512-HLhSWOLRi875zjjMG/r+Nv0oCW8umGb0BgEhyX3dDX3egwZtB8PqLnjz3yedt8R5StBrzcg4aBpnh8UA9D1BoQ== - dependencies: - "@jridgewell/set-array" "^1.0.1" - "@jridgewell/sourcemap-codec" "^1.4.10" - "@jridgewell/trace-mapping" "^0.3.9" - "@jridgewell/resolve-uri@^3.0.3": version "3.1.0" resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.0.tgz#2203b118c157721addfe69d47b70465463066d78" integrity sha512-F2msla3tad+Mfht5cJq7LSXcdudKTWCVYUgw6pLFOOHSTtZlj6SWNYAp+AhuqLmWdBO2X5hPrLcu8cVP8fy28w== -"@jridgewell/resolve-uri@^3.1.0": - version "3.1.1" - resolved "https://registry.yarnpkg.com/@jridgewell/resolve-uri/-/resolve-uri-3.1.1.tgz#c08679063f279615a3326583ba3a90d1d82cc721" - integrity sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA== - -"@jridgewell/set-array@^1.0.1": - version "1.1.2" - resolved "https://registry.yarnpkg.com/@jridgewell/set-array/-/set-array-1.1.2.tgz#7c6cf998d6d20b914c0a55a91ae928ff25965e72" - integrity sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw== - "@jridgewell/sourcemap-codec@^1.4.10": version "1.4.14" resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.14.tgz#add4c98d341472a289190b424efbdb096991bb24" integrity sha512-XPSJHWmi394fuUuzDnGz1wiKqWfo1yXecHQMRf2l6hztTO+nPru658AyDngaBe7isIxEkRsPR3FZh+s7iVa4Uw== -"@jridgewell/sourcemap-codec@^1.4.14": - version "1.4.15" - resolved "https://registry.yarnpkg.com/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz#d7c6e6755c78567a951e04ab52ef0fd26de59f32" - integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== - "@jridgewell/trace-mapping@0.3.9": version "0.3.9" resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz#6534fd5933a53ba7cbf3a17615e273a0d1273ff9" @@ -475,21 +275,6 @@ "@jridgewell/resolve-uri" "^3.0.3" "@jridgewell/sourcemap-codec" "^1.4.10" -"@jridgewell/trace-mapping@^0.3.17", "@jridgewell/trace-mapping@^0.3.9": - version "0.3.19" - resolved "https://registry.yarnpkg.com/@jridgewell/trace-mapping/-/trace-mapping-0.3.19.tgz#f8a3249862f91be48d3127c3cfe992f79b4b8811" - integrity sha512-kf37QtfW+Hwx/buWGMPcR60iF9ziHa6r/CZJIHbmcm4+0qrXiVdxegAH0F6yddEVQ7zdkjcGCgCzUu+BcbhQxw== - dependencies: - "@jridgewell/resolve-uri" "^3.1.0" - "@jridgewell/sourcemap-codec" "^1.4.14" - -"@nicolo-ribaudo/eslint-scope-5-internals@5.1.1-v1": - version "5.1.1-v1" - resolved "https://registry.yarnpkg.com/@nicolo-ribaudo/eslint-scope-5-internals/-/eslint-scope-5-internals-5.1.1-v1.tgz#dbf733a965ca47b1973177dc0bb6c889edcfb129" - integrity sha512-54/JRvkLIzzDWshCWfuhadfrfZVPiElY8Fcgmg1HroEly/EDSszzhBAsarCux+D/kOslTRquNzuyGSmUSTTHGg== - dependencies: - eslint-scope "5.1.1" - "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.yarnpkg.com/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz#7619c2eb21b25483f6d167548b4cfd5a7488c3d5" @@ -503,7 +288,7 @@ resolved "https://registry.yarnpkg.com/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz#5bd262af94e9d25bd1e71b05deed44876a222e8b" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== -"@nodelib/fs.walk@^1.2.3": +"@nodelib/fs.walk@^1.2.3", "@nodelib/fs.walk@^1.2.8": version "1.2.8" resolved "https://registry.yarnpkg.com/@nodelib/fs.walk/-/fs.walk-1.2.8.tgz#e95737e8bb6746ddedf69c556953494f196fe69a" integrity sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg== @@ -944,22 +729,6 @@ resolved "https://registry.yarnpkg.com/@types/estree/-/estree-1.0.0.tgz#5fb2e536c1ae9bf35366eed879e827fa59ca41c2" integrity sha512-WulqXMDUTYAXCjZnk6JtIHPigp55cVtDgDrO2gHRwhyJto21+1zbVCtOYB2L1F9w4qCQ0rOGWBnBe0FNTiEJIQ== -"@types/glob@^8.1.0": - version "8.1.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-8.1.0.tgz#b63e70155391b0584dce44e7ea25190bbc38f2fc" - integrity sha512-IO+MJPVhoqz+28h1qLAcBEH2+xHMK6MTyHJc7MTnnYb6wsoLR29POVGJ7LycmVXIqyy/4/2ShP5sUwTXuOwb/w== - dependencies: - "@types/minimatch" "^5.1.2" - "@types/node" "*" - -"@types/glob@~7.2.0": - version "7.2.0" - resolved "https://registry.yarnpkg.com/@types/glob/-/glob-7.2.0.tgz#bc1b5bf3aa92f25bd5dd39f35c57361bdce5b2eb" - integrity sha512-ZUxbzKl0IfJILTS6t7ip5fQQM/J3TJYubDm3nMbgubNNYS62eXeUpoLUC8/7fJNiFYHTrGPQn7hspDUzIHX3UA== - dependencies: - "@types/minimatch" "*" - "@types/node" "*" - "@types/indent-string@^4.0.1": version "4.0.1" resolved "https://registry.yarnpkg.com/@types/indent-string/-/indent-string-4.0.1.tgz#fb4e6b8cdd8e94f70c105e78fb5d357a767b7193" @@ -977,26 +746,21 @@ resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.11.tgz#d421b6c527a3037f7c84433fd2c4229e016863d3" integrity sha512-wOuvG1SN4Us4rez+tylwwwCV1psiNVOkJeM3AUWUNWg/jDQY2+HE/444y5gc+jBmRqASOm2Oeh5c1axHobwRKQ== -"@types/json-schema@^7.0.7": +"@types/json-schema@^7.0.12": version "7.0.13" resolved "https://registry.yarnpkg.com/@types/json-schema/-/json-schema-7.0.13.tgz#02c24f4363176d2d18fc8b70b9f3c54aba178a85" integrity sha512-RbSSoHliUbnXj3ny0CNFOoxrIDV6SUGyStHsvDqosw6CkdPV8TtWGlfecuK4ToyMEAql6pzNxgCFKanovUzlgQ== +"@types/json5@^0.0.29": + version "0.0.29" + resolved "https://registry.yarnpkg.com/@types/json5/-/json5-0.0.29.tgz#ee28707ae94e11d2b827bcbe5270bcea7f3e71ee" + integrity sha512-dRLjCWHYg4oaA77cxO64oO+7JwCwnIzkZPdrrC71jQmQtlhM556pwKo5bUzqvZndkVbeFLIIi+9TC40JNF5hNQ== + "@types/lodash@*": version "4.14.182" resolved "https://registry.yarnpkg.com/@types/lodash/-/lodash-4.14.182.tgz#05301a4d5e62963227eaafe0ce04dd77c54ea5c2" integrity sha512-/THyiqyQAP9AfARo4pF+aCGcyiQ94tX/Is2I7HofNRqoYLgN1PBoOWu2/zTA5zMxzP5EFutMtWtGAFRKUe961Q== -"@types/minimatch@*": - version "3.0.5" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-3.0.5.tgz#1001cc5e6a3704b83c236027e77f2f58ea010f40" - integrity sha512-Klz949h02Gz2uZCMGwDUSDS1YBlTdDDgbWHi+81l29tQALUtvz4rAYi5uoVhE5Lagoq6DeqAUlbrHvW/mXDgdQ== - -"@types/minimatch@^5.1.2": - version "5.1.2" - resolved "https://registry.yarnpkg.com/@types/minimatch/-/minimatch-5.1.2.tgz#07508b45797cb81ec3f273011b054cd0755eddca" - integrity sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA== - "@types/minimist@^1.2.0": version "1.2.2" resolved "https://registry.yarnpkg.com/@types/minimist/-/minimist-1.2.2.tgz#ee771e2ba4b3dc5b372935d549fd9617bf345b8c" @@ -1021,11 +785,16 @@ dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^16": +"@types/node@*": version "16.18.31" resolved "https://registry.yarnpkg.com/@types/node/-/node-16.18.31.tgz#7de39c2b9363f0d95b129cc969fcbf98e870251c" integrity sha512-KPXltf4z4g517OlVJO9XQ2357CYw7fvuJ3ZuBynjXC5Jos9i+K7LvFb7bUIwtJXSZj0vTp9Q6NJBSQpkwwO8Zw== +"@types/node@^18": + version "18.17.17" + resolved "https://registry.yarnpkg.com/@types/node/-/node-18.17.17.tgz#53cc07ce582c9d7c5850702a3c2cb0af0d7b0ca1" + integrity sha512-cOxcXsQ2sxiwkykdJqvyFS+MLQPLvIdwh5l6gNg8qF6s+C7XSkEWOZjK+XhUZd+mYvHV/180g2cnCcIl4l06Pw== + "@types/normalize-package-data@^2.4.0": version "2.4.1" resolved "https://registry.yarnpkg.com/@types/normalize-package-data/-/normalize-package-data-2.4.1.tgz#d3357479a0fdfdd5907fe67e17e0a85c906e1301" @@ -1036,13 +805,10 @@ resolved "https://registry.yarnpkg.com/@types/parse-json/-/parse-json-4.0.0.tgz#2f8bb441434d163b35fb8ffdccd7138927ffb8c0" integrity sha512-//oorEZjL6sbPcKUaCdIGlIUeH26mgzimjBB77G6XRgnDl/L5wOnpyBGRe/Mmf5CVW3PwEBE1NjiMZ/ssFh4wA== -"@types/shelljs@^0.8.12": - version "0.8.12" - resolved "https://registry.yarnpkg.com/@types/shelljs/-/shelljs-0.8.12.tgz#79dc9632af7d5ca1b5afb65a6bfc1422d79b5fa0" - integrity sha512-ZA8U81/gldY+rR5zl/7HSHrG2KDfEb3lzG6uCUDhW1DTQE9yC/VBQ45fXnXq8f3CgInfhZmjtdu/WOUlrXRQUg== - dependencies: - "@types/glob" "~7.2.0" - "@types/node" "*" +"@types/semver@^7.5.0": + version "7.5.2" + resolved "https://registry.yarnpkg.com/@types/semver/-/semver-7.5.2.tgz#31f6eec1ed7ec23f4f05608d3a2d381df041f564" + integrity sha512-7aqorHYgdNO4DM36stTiGO3DvKoex9TQRwsJU6vMaFGyqpBA1MNZkz+PG3gaNUPpTAOYhT1WR7M1JyA3fbS9Cw== "@types/sinon@*": version "10.0.2" @@ -1078,75 +844,90 @@ resolved "https://registry.yarnpkg.com/@types/wrap-ansi/-/wrap-ansi-3.0.0.tgz#18b97a972f94f60a679fd5c796d96421b9abb9fd" integrity sha512-ltIpx+kM7g/MLRZfkbL7EsCEjfzCcScLpkg37eXEtx5kmrAKBkTJwd1GIAjDSL8wTpM6Hzn5YO4pSb91BEwu1g== -"@typescript-eslint/eslint-plugin@^4.31.2": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-4.33.0.tgz#c24dc7c8069c7706bc40d99f6fa87edcb2005276" - integrity sha512-aINiAxGVdOl1eJyVjaWn/YcVAq4Gi/Yo35qHGCnqbWVz61g39D0h23veY/MA0rFFGfxK7TySg2uwDeNv+JgVpg== - dependencies: - "@typescript-eslint/experimental-utils" "4.33.0" - "@typescript-eslint/scope-manager" "4.33.0" - debug "^4.3.1" - functional-red-black-tree "^1.0.1" - ignore "^5.1.8" - regexpp "^3.1.0" - semver "^7.3.5" - tsutils "^3.21.0" - -"@typescript-eslint/experimental-utils@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/experimental-utils/-/experimental-utils-4.33.0.tgz#6f2a786a4209fa2222989e9380b5331b2810f7fd" - integrity sha512-zeQjOoES5JFjTnAhI5QY7ZviczMzDptls15GFsI6jyUOq0kOf9+WonkhtlIhh0RgHRnqj5gdNxW5j1EvAyYg6Q== - dependencies: - "@types/json-schema" "^7.0.7" - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - eslint-scope "^5.1.1" - eslint-utils "^3.0.0" +"@typescript-eslint/eslint-plugin@^6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.7.2.tgz#f18cc75c9cceac8080a9dc2e7d166008c5207b9f" + integrity sha512-ooaHxlmSgZTM6CHYAFRlifqh1OAr3PAQEwi7lhYhaegbnXrnh7CDcHmc3+ihhbQC7H0i4JF0psI5ehzkF6Yl6Q== + dependencies: + "@eslint-community/regexpp" "^4.5.1" + "@typescript-eslint/scope-manager" "6.7.2" + "@typescript-eslint/type-utils" "6.7.2" + "@typescript-eslint/utils" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" + debug "^4.3.4" + graphemer "^1.4.0" + ignore "^5.2.4" + natural-compare "^1.4.0" + semver "^7.5.4" + ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^4.31.2": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-4.33.0.tgz#dfe797570d9694e560528d18eecad86c8c744899" - integrity sha512-ZohdsbXadjGBSK0/r+d87X0SBmKzOq4/S5nzK6SBgJspFo9/CUDJ7hjayuze+JK7CZQLDMroqytp7pOcFKTxZA== - dependencies: - "@typescript-eslint/scope-manager" "4.33.0" - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/typescript-estree" "4.33.0" - debug "^4.3.1" - -"@typescript-eslint/scope-manager@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-4.33.0.tgz#d38e49280d983e8772e29121cf8c6e9221f280a3" - integrity sha512-5IfJHpgTsTZuONKbODctL4kKuQje/bzBRkwHE8UOZ4f89Zeddg+EGZs8PD8NcN4LdM3ygHWYB3ukPAYjvl/qbQ== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - -"@typescript-eslint/types@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-4.33.0.tgz#a1e59036a3b53ae8430ceebf2a919dc7f9af6d72" - integrity sha512-zKp7CjQzLQImXEpLt2BUw1tvOMPfNoTAfb8l51evhYbOEEzdWyQNmHWWGPR6hwKJDAi+1VXSBmnhL9kyVTTOuQ== - -"@typescript-eslint/typescript-estree@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-4.33.0.tgz#0dfb51c2908f68c5c08d82aefeaf166a17c24609" - integrity sha512-rkWRY1MPFzjwnEVHsxGemDzqqddw2QbTJlICPD9p9I9LfsO8fdmfQPOX3uKfUaGRDFJbfrtm/sXhVXN4E+bzCA== - dependencies: - "@typescript-eslint/types" "4.33.0" - "@typescript-eslint/visitor-keys" "4.33.0" - debug "^4.3.1" - globby "^11.0.3" - is-glob "^4.0.1" - semver "^7.3.5" - tsutils "^3.21.0" +"@typescript-eslint/parser@^6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/parser/-/parser-6.7.2.tgz#e0ae93771441b9518e67d0660c79e3a105497af4" + integrity sha512-KA3E4ox0ws+SPyxQf9iSI25R6b4Ne78ORhNHeVKrPQnoYsb9UhieoiRoJgrzgEeKGOXhcY1i8YtOeCHHTDa6Fw== + dependencies: + "@typescript-eslint/scope-manager" "6.7.2" + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/typescript-estree" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" + debug "^4.3.4" -"@typescript-eslint/visitor-keys@4.33.0": - version "4.33.0" - resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-4.33.0.tgz#2a22f77a41604289b7a186586e9ec48ca92ef1dd" - integrity sha512-uqi/2aSz9g2ftcHWf8uLPJA70rUv6yuMW5Bohw+bwcuzaxQIHaKFZCKGoGXIrc9vkTJ3+0txM73K0Hq3d5wgIg== +"@typescript-eslint/scope-manager@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/scope-manager/-/scope-manager-6.7.2.tgz#cf59a2095d2f894770c94be489648ad1c78dc689" + integrity sha512-bgi6plgyZjEqapr7u2mhxGR6E8WCzKNUFWNh6fkpVe9+yzRZeYtDTbsIBzKbcxI+r1qVWt6VIoMSNZ4r2A+6Yw== dependencies: - "@typescript-eslint/types" "4.33.0" - eslint-visitor-keys "^2.0.0" + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" + +"@typescript-eslint/type-utils@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/type-utils/-/type-utils-6.7.2.tgz#ed921c9db87d72fa2939fee242d700561454f367" + integrity sha512-36F4fOYIROYRl0qj95dYKx6kybddLtsbmPIYNK0OBeXv2j9L5nZ17j9jmfy+bIDHKQgn2EZX+cofsqi8NPATBQ== + dependencies: + "@typescript-eslint/typescript-estree" "6.7.2" + "@typescript-eslint/utils" "6.7.2" + debug "^4.3.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/types@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/types/-/types-6.7.2.tgz#75a615a6dbeca09cafd102fe7f465da1d8a3c066" + integrity sha512-flJYwMYgnUNDAN9/GAI3l8+wTmvTYdv64fcH8aoJK76Y+1FCZ08RtI5zDerM/FYT5DMkAc+19E4aLmd5KqdFyg== + +"@typescript-eslint/typescript-estree@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/typescript-estree/-/typescript-estree-6.7.2.tgz#ce5883c23b581a5caf878af641e49dd0349238c7" + integrity sha512-kiJKVMLkoSciGyFU0TOY0fRxnp9qq1AzVOHNeN1+B9erKFCJ4Z8WdjAkKQPP+b1pWStGFqezMLltxO+308dJTQ== + dependencies: + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/visitor-keys" "6.7.2" + debug "^4.3.4" + globby "^11.1.0" + is-glob "^4.0.3" + semver "^7.5.4" + ts-api-utils "^1.0.1" + +"@typescript-eslint/utils@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/utils/-/utils-6.7.2.tgz#b9ef0da6f04932167a9222cb4ac59cb187165ebf" + integrity sha512-ZCcBJug/TS6fXRTsoTkgnsvyWSiXwMNiPzBUani7hDidBdj1779qwM1FIAmpH4lvlOZNF3EScsxxuGifjpLSWQ== + dependencies: + "@eslint-community/eslint-utils" "^4.4.0" + "@types/json-schema" "^7.0.12" + "@types/semver" "^7.5.0" + "@typescript-eslint/scope-manager" "6.7.2" + "@typescript-eslint/types" "6.7.2" + "@typescript-eslint/typescript-estree" "6.7.2" + semver "^7.5.4" + +"@typescript-eslint/visitor-keys@6.7.2": + version "6.7.2" + resolved "https://registry.yarnpkg.com/@typescript-eslint/visitor-keys/-/visitor-keys-6.7.2.tgz#4cb2bd786f1f459731b0ad1584c9f73e1c7a4d5c" + integrity sha512-uVw9VIMFBUTz8rIeaUT3fFe8xIUx8r4ywAdlQv1ifH+6acn/XF8Y6rwJ7XNmkNMDrTW+7+vxFFPIF40nJCVsMQ== + dependencies: + "@typescript-eslint/types" "6.7.2" + eslint-visitor-keys "^3.4.1" JSONStream@^1.0.4: version "1.3.5" @@ -1173,7 +954,7 @@ abort-controller@^3.0.0: dependencies: event-target-shim "^5.0.0" -acorn-jsx@^5.3.1: +acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.yarnpkg.com/acorn-jsx/-/acorn-jsx-5.3.2.tgz#7ed5bb55908b3b2f1bc55c6af1653bada7f07937" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== @@ -1183,16 +964,16 @@ acorn-walk@^8.1.1: resolved "https://registry.yarnpkg.com/acorn-walk/-/acorn-walk-8.2.0.tgz#741210f2e2426454508853a2f44d0ab83b7f69c1" integrity sha512-k+iyHEuPgSw6SbuDpGQM+06HQUa04DZ3o+F6CSzXMvvI5KMvnaEqXe+YVe555R9nn6GPt404fos4wcgpw12SDA== -acorn@^7.4.0: - version "7.4.1" - resolved "https://registry.yarnpkg.com/acorn/-/acorn-7.4.1.tgz#feaed255973d2e77555b83dbc08851a6c63520fa" - integrity sha512-nQyp0o1/mNdbTO1PO6kHkwSrmgZ0MT/jCCpNiwbUjGoRN4dlBhqJtoQuCnEOKzgTVwg0ZWiCoQy6SxMebQVh8A== - acorn@^8.4.1: version "8.8.0" resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.8.0.tgz#88c0187620435c7f6015803f5539dae05a9dbea8" integrity sha512-QOxyigPVrpZ2GXT+PFyZTl6TtOFc5egxHIP9IlQ+RbupQuX4RkT/Bee4/kQuC02Xkzg84JcT7oLYtDIQxp+v7w== +acorn@^8.9.0: + version "8.10.0" + resolved "https://registry.yarnpkg.com/acorn/-/acorn-8.10.0.tgz#8be5b3907a67221a81ab23c7889c4c5526b62ec5" + integrity sha512-F0SAmZ8iUtS//m8DmCTA0jlh6TDKkHQyK6xc6V4KDTyZKA9dnvX9/3sRTVQrWm79glUAZbnmmNcdYwUIHWVybw== + agent-base@6, agent-base@^6.0.2: version "6.0.2" resolved "https://registry.yarnpkg.com/agent-base/-/agent-base-6.0.2.tgz#49fff58577cfee3f37176feab4c22e00f86d7f77" @@ -1215,7 +996,7 @@ aggregate-error@^3.0.0: clean-stack "^2.0.0" indent-string "^4.0.0" -ajv@^6.10.0, ajv@^6.12.4: +ajv@^6.12.4: version "6.12.6" resolved "https://registry.yarnpkg.com/ajv/-/ajv-6.12.6.tgz#baf5a62e802b07d977034586f8c3baf5adf26df4" integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== @@ -1225,26 +1006,11 @@ ajv@^6.10.0, ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" -ajv@^8.0.1: - version "8.12.0" - resolved "https://registry.yarnpkg.com/ajv/-/ajv-8.12.0.tgz#d1a0527323e22f53562c567c00991577dfbe19d1" - integrity sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA== - dependencies: - fast-deep-equal "^3.1.1" - json-schema-traverse "^1.0.0" - require-from-string "^2.0.2" - uri-js "^4.2.2" - ansi-colors@4.1.1: version "4.1.1" resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.1.tgz#cbb9ae256bf750af1eab344f229aa27fe94ba348" integrity sha512-JoX0apGbHaUJBNl6yF+p6JAFYZ666/hhCGKN5t9QFjbJQKUU/g8MNbFDbvfrgKXvI1QpZplPOnwIo99lX/AAmA== -ansi-colors@^4.1.1: - version "4.1.3" - resolved "https://registry.yarnpkg.com/ansi-colors/-/ansi-colors-4.1.3.tgz#37611340eb2243e70cc604cad35d63270d48781b" - integrity sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw== - ansi-escapes@^3.1.0: version "3.2.0" resolved "https://registry.yarnpkg.com/ansi-escapes/-/ansi-escapes-3.2.0.tgz#8780b98ff9dbf5638152d1f1fe5c1d7b4442976b" @@ -1352,16 +1118,79 @@ argparse@^2.0.1: resolved "https://registry.yarnpkg.com/argparse/-/argparse-2.0.1.tgz#246f50f3ca78a3240f6c997e8a9bd1eac49e4b38" integrity sha512-8+9WqebbFzpX9OR+Wa6O29asIogeRMzcGtAINdpMHHyAg10f05aSFVBbcEqGf/PXw1EjAZ+q2/bEBg3DvurK3Q== +array-buffer-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/array-buffer-byte-length/-/array-buffer-byte-length-1.0.0.tgz#fabe8bc193fea865f317fe7807085ee0dee5aead" + integrity sha512-LPuwb2P+NrQw3XhxGc36+XSvuBPopovXYTR9Ew++Du9Yb/bx5AzBfrIsBoj0EZUifjQU+sHL21sseZ3jerWO/A== + dependencies: + call-bind "^1.0.2" + is-array-buffer "^3.0.1" + array-ify@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/array-ify/-/array-ify-1.0.0.tgz#9e528762b4a9066ad163a6962a364418e9626ece" integrity sha1-nlKHYrSpBmrRY6aWKjZEGOlibs4= +array-includes@^3.1.6: + version "3.1.7" + resolved "https://registry.yarnpkg.com/array-includes/-/array-includes-3.1.7.tgz#8cd2e01b26f7a3086cbc87271593fe921c62abda" + integrity sha512-dlcsNBIiWhPkHdOEEKnehA+RNUWDc4UqFtnIXU4uuYDPtA4LDkr7qip2p0VvFAEXNDr0yWZ9PJyIRiGjRLQzwQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-string "^1.0.7" + array-union@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/array-union/-/array-union-2.1.0.tgz#b798420adbeb1de828d84acd8a2e23d3efe85e8d" integrity sha512-HGyxoOTYUyCM6stUe6EJgnd4EoewAI7zMdfqO+kGjnlZmBDz/cR5pf8r/cR4Wq60sL/p0IkcjUEEPwS3GFrIyw== +array.prototype.findlastindex@^1.2.2: + version "1.2.3" + resolved "https://registry.yarnpkg.com/array.prototype.findlastindex/-/array.prototype.findlastindex-1.2.3.tgz#b37598438f97b579166940814e2c0493a4f50207" + integrity sha512-LzLoiOMAxvy+Gd3BAq3B7VeIgPdo+Q8hthvKtXybMvRV0jrXfJM/t8mw7nNlpEcVlVUnCnM2KSX4XU5HmpodOA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + get-intrinsic "^1.2.1" + +array.prototype.flat@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flat/-/array.prototype.flat-1.3.2.tgz#1476217df8cff17d72ee8f3ba06738db5b387d18" + integrity sha512-djYB+Zx2vLewY8RWlNCUdHjDXs2XOgm602S9E7P/UpHgfeHL00cRiIF+IN/G/aUJ7kGPb6yO/ErDI5V2s8iycA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +array.prototype.flatmap@^1.3.1: + version "1.3.2" + resolved "https://registry.yarnpkg.com/array.prototype.flatmap/-/array.prototype.flatmap-1.3.2.tgz#c9a7c6831db8e719d6ce639190146c24bbd3e527" + integrity sha512-Ewyx0c9PmpcsByhSW4r+9zDU7sGjFc86qf/kKtuSCRdhfbk0SNLLkaT5qvcHnRGgc5NP/ly/y+qkXkqONX54CQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + es-shim-unscopables "^1.0.0" + +arraybuffer.prototype.slice@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/arraybuffer.prototype.slice/-/arraybuffer.prototype.slice-1.0.2.tgz#98bd561953e3e74bb34938e77647179dfe6e9f12" + integrity sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw== + dependencies: + array-buffer-byte-length "^1.0.0" + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + is-array-buffer "^3.0.2" + is-shared-array-buffer "^1.0.2" + arrify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/arrify/-/arrify-1.0.1.tgz#898508da2226f380df904728456849c1501a4b0d" @@ -1387,6 +1216,11 @@ at-least-node@^1.0.0: resolved "https://registry.yarnpkg.com/at-least-node/-/at-least-node-1.0.0.tgz#602cd4b46e844ad4effc92a8011a3c46e0238dc2" integrity sha512-+q/t7Ekv1EDY2l6Gda6LLiX14rU9TV20Wa3ofeQmwPFZbOMo9DXrLbOjFaaclkXKWidIaopwAObQDqwWtGUjqg== +available-typed-arrays@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/available-typed-arrays/-/available-typed-arrays-1.0.5.tgz#92f95616501069d07d10edb2fc37d3e1c65123b7" + integrity sha512-DMD0KiN46eipeziST1LPP/STfDU0sufISXmjSgvVsoU2tqxctQeASejWcfNtxYKqETM1UxQ8sp2OrSBWpHY6sw== + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.yarnpkg.com/balanced-match/-/balanced-match-1.0.2.tgz#e83e3a7e3f300b34cb9d87f615fa0cbf357690ee" @@ -1447,16 +1281,6 @@ browser-stdout@1.3.1: resolved "https://registry.yarnpkg.com/browser-stdout/-/browser-stdout-1.3.1.tgz#baa559ee14ced73452229bad7326467c61fabd60" integrity sha512-qhAVI1+Av2X7qelOfAIYwXONood6XlZE/fXaBSmW/T5SzLAmCgzi+eiWE7fUvbHaeNBQH13UftjpXxsfLkMpgw== -browserslist@^4.21.9: - version "4.21.10" - resolved "https://registry.yarnpkg.com/browserslist/-/browserslist-4.21.10.tgz#dbbac576628c13d3b2231332cb2ec5a46e015bb0" - integrity sha512-bipEBdZfVH5/pwrvqc+Ub0kUPVfGUhlKxbvfD+z1BDnPEO/X98ruXGA1WP5ASpAFKan7Qr6j736IacbZQuAlKQ== - dependencies: - caniuse-lite "^1.0.30001517" - electron-to-chromium "^1.4.477" - node-releases "^2.0.13" - update-browserslist-db "^1.0.11" - buffer@^6.0.3: version "6.0.3" resolved "https://registry.yarnpkg.com/buffer/-/buffer-6.0.3.tgz#2ace578459cc8fbe2a70aaa8f52ee63b6a74c6c6" @@ -1495,6 +1319,14 @@ cacache@^17.0.0, cacache@^17.0.4, cacache@^17.1.3: tar "^6.1.11" unique-filename "^3.0.0" +call-bind@^1.0.0, call-bind@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/call-bind/-/call-bind-1.0.2.tgz#b1d4e89e688119c3c9a903ad30abb2f6a919be3c" + integrity sha512-7O+FbCihrB5WGbFYesctwmTKae6rOiIzmz1icreWJ+0aA7LJfuqhEso2T9ncpcFtzMQtzXf2QGGueWJGTYsqrA== + dependencies: + function-bind "^1.1.1" + get-intrinsic "^1.0.2" + callsites@^3.0.0: version "3.1.0" resolved "https://registry.yarnpkg.com/callsites/-/callsites-3.1.0.tgz#b3630abd8943432f54b3f0519238e33cd7df2f73" @@ -1519,11 +1351,6 @@ camelcase@^6.0.0: resolved "https://registry.yarnpkg.com/camelcase/-/camelcase-6.2.0.tgz#924af881c9d525ac9d87f40d964e5cea982a1809" integrity sha512-c7wVvbw3f37nuobQNtgsgG9POC9qMbNuMQmTCqZv23b6MIz0fcYpBiOlv9gEN/hdLdnZTDQhg6e9Dq5M1vKvfg== -caniuse-lite@^1.0.30001517: - version "1.0.30001538" - resolved "https://registry.yarnpkg.com/caniuse-lite/-/caniuse-lite-1.0.30001538.tgz#9dbc6b9af1ff06b5eb12350c2012b3af56744f3f" - integrity sha512-HWJnhnID+0YMtGlzcp3T9drmBJUVDchPJ08tpUGFLs9CYlwWPH2uLgpHn8fND5pCgXVtnGS3H4QR9XLMHVNkHw== - cardinal@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/cardinal/-/cardinal-2.1.1.tgz#7cc1055d822d212954d07b085dea251cc7bc5505" @@ -1552,7 +1379,7 @@ chai@^4.3.7: pathval "^1.1.1" type-detect "^4.0.5" -chalk@^2.0.0, chalk@^2.4.2: +chalk@^2.0.0: version "2.4.2" resolved "https://registry.yarnpkg.com/chalk/-/chalk-2.4.2.tgz#cd42541677a54333cf541a49108c1432b44c9424" integrity sha512-Mti+f9lpJNcwF4tWV8/OrTTtF1gZi+f8FqlyAdouralcFWFQWF2+NgCHShjkCb+IFBLq9buZwE1xckQU4peSuQ== @@ -1599,7 +1426,7 @@ chownr@^2.0.0: resolved "https://registry.yarnpkg.com/chownr/-/chownr-2.0.0.tgz#15bfbe53d2eab4cf70f18a8cd68ebe5b3cb1dece" integrity sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ== -ci-info@^3.2.0, ci-info@^3.6.1, ci-info@^3.7.1, ci-info@^3.8.0: +ci-info@^3.6.1, ci-info@^3.7.1, ci-info@^3.8.0: version "3.8.0" resolved "https://registry.yarnpkg.com/ci-info/-/ci-info-3.8.0.tgz#81408265a5380c929f0bc665d62256628ce9ef91" integrity sha512-eXTggHWSooYhq49F2opQhuHWgzucfF2YgODK4e1566GQs5BIfP30B0oenwBJHfWxAs2fyPB1s7Mg949zLf61Yw== @@ -1743,10 +1570,10 @@ concat-map@0.0.1: resolved "https://registry.yarnpkg.com/concat-map/-/concat-map-0.0.1.tgz#d8a96bd77fd68df7793a73036a3ba0d5405d477b" integrity sha1-2Klr13/Wjfd5OnMDajug1UBdR3s= -confusing-browser-globals@1.0.10: - version "1.0.10" - resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.10.tgz#30d1e7f3d1b882b25ec4933d1d1adac353d20a59" - integrity sha512-gNld/3lySHwuhaVluJUKLePYirM3QNCKzVxqAdhJII9/WXKVX5PURzMVJspS1jTslSqjeuG4KMVTSouit5YPHA== +confusing-browser-globals@1.0.11: + version "1.0.11" + resolved "https://registry.yarnpkg.com/confusing-browser-globals/-/confusing-browser-globals-1.0.11.tgz#ae40e9b57cdd3915408a2805ebd3a5585608dc81" + integrity sha512-JsPKdmh8ZkmnHxDk55FZ1TqVLvEQTvoByJZRN9jzI0UjxK/QgAmsphz7PGtqgPieQZ/CQcHWXCR7ATDNhGe+YA== console-control-strings@^1.1.0: version "1.1.0" @@ -1788,11 +1615,6 @@ conventional-commits-parser@^3.0.0: through2 "^4.0.0" trim-off-newlines "^1.0.0" -convert-source-map@^1.7.0: - version "1.9.0" - resolved "https://registry.yarnpkg.com/convert-source-map/-/convert-source-map-1.9.0.tgz#7faae62353fb4213366d0ca98358d22e8368b05f" - integrity sha512-ASFBup0Mz1uyiIjANan1jzLQami9z1PoYSZCiiYW2FczPbenXc45FZdBZLzOT+r6+iciuEModtmCti+hjaAk0A== - cosmiconfig@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/cosmiconfig/-/cosmiconfig-7.0.0.tgz#ef9b44d773959cae63ddecd122de23853b60f8d3" @@ -1846,13 +1668,20 @@ dargs@^7.0.0: resolved "https://registry.yarnpkg.com/dargs/-/dargs-7.0.0.tgz#04015c41de0bcb69ec84050f3d9be0caf8d6d5cc" integrity sha512-2iy1EkLdlBzQGvbweYRFxmFath8+K7+AKB0TlhHWkNuH+TmovaMH/Wp7V7R4u7f4SnX3OgLsU9t1NI9ioDnUpg== -debug@4, debug@4.3.4, debug@^4.0.1, debug@^4.1.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.3, debug@^4.3.4: +debug@4, debug@4.3.4, debug@^4.1.0, debug@^4.1.1, debug@^4.3.2, debug@^4.3.3, debug@^4.3.4: version "4.3.4" resolved "https://registry.yarnpkg.com/debug/-/debug-4.3.4.tgz#1319f6579357f2338d3337d2cdd4914bb5dcc865" integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== dependencies: ms "2.1.2" +debug@^3.2.7: + version "3.2.7" + resolved "https://registry.yarnpkg.com/debug/-/debug-3.2.7.tgz#72580b7e9145fb39b6676f9c5e5fb100b934179a" + integrity sha512-CFjzYYAi4ThfiQvizrFQevTTXHtnCqWfe7x1AhgEscTz6ZbLbfoLRLPugTQyBth6f8ZERVUSyWHFD/7Wu4t1XQ== + dependencies: + ms "^2.1.1" + decamelize-keys@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/decamelize-keys/-/decamelize-keys-1.1.0.tgz#d171a87933252807eb3cb61dc1c1445d078df2d9" @@ -1890,6 +1719,24 @@ defaults@^1.0.3: dependencies: clone "^1.0.2" +define-data-property@^1.0.1: + version "1.1.0" + resolved "https://registry.yarnpkg.com/define-data-property/-/define-data-property-1.1.0.tgz#0db13540704e1d8d479a0656cf781267531b9451" + integrity sha512-UzGwzcjyv3OtAvolTj1GoyNYzfFR+iqbGjcnBEENZVCpM4/Ng1yhGNvS3lR/xDS74Tb2wGG9WzNSNIOS9UVb2g== + dependencies: + get-intrinsic "^1.2.1" + gopd "^1.0.1" + has-property-descriptors "^1.0.0" + +define-properties@^1.1.3, define-properties@^1.1.4, define-properties@^1.2.0: + version "1.2.1" + resolved "https://registry.yarnpkg.com/define-properties/-/define-properties-1.2.1.tgz#10781cc616eb951a80a034bafcaa7377f6af2b6c" + integrity sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg== + dependencies: + define-data-property "^1.0.1" + has-property-descriptors "^1.0.0" + object-keys "^1.1.1" + delegates@^1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/delegates/-/delegates-1.0.0.tgz#84c6e159b81904fdca59a0ef44cd870d31250f9a" @@ -1922,6 +1769,13 @@ dir-glob@^3.0.1: dependencies: path-type "^4.0.0" +doctrine@^2.1.0: + version "2.1.0" + resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-2.1.0.tgz#5cd01fc101621b42c4cd7f5d1a66243716d3f39d" + integrity sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw== + dependencies: + esutils "^2.0.2" + doctrine@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/doctrine/-/doctrine-3.0.0.tgz#addebead72a6574db783639dc87a121773973961" @@ -1948,11 +1802,6 @@ ejs@^3.1.8: dependencies: jake "^10.8.5" -electron-to-chromium@^1.4.477: - version "1.4.524" - resolved "https://registry.yarnpkg.com/electron-to-chromium/-/electron-to-chromium-1.4.524.tgz#ef9733e044ef99d00ae1c810846f73ef4374e0b8" - integrity sha512-iTmhuiGXYo29QoFXwwXbxhAKiDRZQzme6wYVaZNoitg9h1iRaMGu3vNvDyk+gqu5ETK1D6ug9PC5GVS7kSURuw== - emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.yarnpkg.com/emoji-regex/-/emoji-regex-8.0.0.tgz#e818fd69ce5ccfcb404594f842963bf53164cc37" @@ -1970,13 +1819,13 @@ encoding@^0.1.13: dependencies: iconv-lite "^0.6.2" -enquirer@^2.3.5: - version "2.4.1" - resolved "https://registry.yarnpkg.com/enquirer/-/enquirer-2.4.1.tgz#93334b3fbd74fc7097b224ab4a8fb7e40bf4ae56" - integrity sha512-rRqJg/6gd538VHvR3PSrdRBb/1Vy2YfzHqzvbhGIQpDRKIa4FgV/54b5Q1xYSxOOwKvjXweS26E0Q+nAMwp2pQ== +enhanced-resolve@^5.12.0: + version "5.15.0" + resolved "https://registry.yarnpkg.com/enhanced-resolve/-/enhanced-resolve-5.15.0.tgz#1af946c7d93603eb88e9896cee4904dc012e9c35" + integrity sha512-LXYT42KJ7lpIKECr2mAXIaMldcNCh/7E0KBKOu4KSfkHmP+mZmSs+8V5gBAqisWBy0OO4W5Oyys0GO1Y8KtdKg== dependencies: - ansi-colors "^4.1.1" - strip-ansi "^6.0.1" + graceful-fs "^4.2.4" + tapable "^2.2.0" env-paths@^2.2.0: version "2.2.1" @@ -1995,6 +1844,76 @@ error-ex@^1.3.1: dependencies: is-arrayish "^0.2.1" +es-abstract@^1.22.1: + version "1.22.2" + resolved "https://registry.yarnpkg.com/es-abstract/-/es-abstract-1.22.2.tgz#90f7282d91d0ad577f505e423e52d4c1d93c1b8a" + integrity sha512-YoxfFcDmhjOgWPWsV13+2RNjq1F6UQnfs+8TftwNqtzlmFzEXvlUwdrNrYeaizfjQzRMxkZ6ElWMOJIFKdVqwA== + dependencies: + array-buffer-byte-length "^1.0.0" + arraybuffer.prototype.slice "^1.0.2" + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + es-set-tostringtag "^2.0.1" + es-to-primitive "^1.2.1" + function.prototype.name "^1.1.6" + get-intrinsic "^1.2.1" + get-symbol-description "^1.0.0" + globalthis "^1.0.3" + gopd "^1.0.1" + has "^1.0.3" + has-property-descriptors "^1.0.0" + has-proto "^1.0.1" + has-symbols "^1.0.3" + internal-slot "^1.0.5" + is-array-buffer "^3.0.2" + is-callable "^1.2.7" + is-negative-zero "^2.0.2" + is-regex "^1.1.4" + is-shared-array-buffer "^1.0.2" + is-string "^1.0.7" + is-typed-array "^1.1.12" + is-weakref "^1.0.2" + object-inspect "^1.12.3" + object-keys "^1.1.1" + object.assign "^4.1.4" + regexp.prototype.flags "^1.5.1" + safe-array-concat "^1.0.1" + safe-regex-test "^1.0.0" + string.prototype.trim "^1.2.8" + string.prototype.trimend "^1.0.7" + string.prototype.trimstart "^1.0.7" + typed-array-buffer "^1.0.0" + typed-array-byte-length "^1.0.0" + typed-array-byte-offset "^1.0.0" + typed-array-length "^1.0.4" + unbox-primitive "^1.0.2" + which-typed-array "^1.1.11" + +es-set-tostringtag@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/es-set-tostringtag/-/es-set-tostringtag-2.0.1.tgz#338d502f6f674301d710b80c8592de8a15f09cd8" + integrity sha512-g3OMbtlwY3QewlqAiMLI47KywjWZoEytKr8pf6iTC8uJq5bIAH52Z9pnQ8pVL6whrCto53JZDuUIsifGeLorTg== + dependencies: + get-intrinsic "^1.1.3" + has "^1.0.3" + has-tostringtag "^1.0.0" + +es-shim-unscopables@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/es-shim-unscopables/-/es-shim-unscopables-1.0.0.tgz#702e632193201e3edf8713635d083d378e510241" + integrity sha512-Jm6GPcCdC30eMLbZ2x8z2WuRwAws3zTBBKuusffYVUrNj/GVSUAZ+xKMaUpfNDR5IbyNA5LJbaecoUVbmUcB1w== + dependencies: + has "^1.0.3" + +es-to-primitive@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/es-to-primitive/-/es-to-primitive-1.2.1.tgz#e55cd4c9cdc188bcefb03b366c736323fc5c898a" + integrity sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA== + dependencies: + is-callable "^1.1.4" + is-date-object "^1.0.1" + is-symbol "^1.0.2" + escalade@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/escalade/-/escalade-3.1.1.tgz#d8cfdc7000965c5a0174b4a82eaa5c0552742e40" @@ -2015,54 +1934,42 @@ escape-string-regexp@^1.0.5: resolved "https://registry.yarnpkg.com/escape-string-regexp/-/escape-string-regexp-1.0.5.tgz#1b61c0562190a8dff6ae3bb2cf0200ca130b86d4" integrity sha1-G2HAViGQqN/2rjuyzwIAyhMLhtQ= -eslint-config-oclif-typescript@^1.0.3: - version "1.0.3" - resolved "https://registry.yarnpkg.com/eslint-config-oclif-typescript/-/eslint-config-oclif-typescript-1.0.3.tgz#0061a810bf8f69571ad3c70368badcc018c3358e" - integrity sha512-TeJKXWBQ3uKMtzgz++UFNWpe1WCx8mfqRuzZy1LirREgRlVv656SkVG4gNZat5rRNIQgfDmTS+YebxK02kfylA== - dependencies: - "@typescript-eslint/eslint-plugin" "^4.31.2" - "@typescript-eslint/parser" "^4.31.2" - eslint-config-xo-space "^0.29.0" - eslint-plugin-mocha "^9.0.0" +eslint-config-oclif-typescript@^2.0.1: + version "2.0.1" + resolved "https://registry.yarnpkg.com/eslint-config-oclif-typescript/-/eslint-config-oclif-typescript-2.0.1.tgz#bdaca00f53ee27ff6930673082a00a03d6cf8dd1" + integrity sha512-Z0U0KVNXGcTzYdSoDsrHulkspS1ZW/NrNgv/IAvpd7F2ZdrLUEmRlJn7Kwnk8CdUufJb/GsW+qVKIG/fPhwKpg== + dependencies: + "@typescript-eslint/eslint-plugin" "^6.7.2" + "@typescript-eslint/parser" "^6.7.2" + eslint-config-xo-space "^0.34.0" + eslint-import-resolver-typescript "^3.6.0" + eslint-plugin-import "^2.28.1" + eslint-plugin-mocha "^10.1.0" eslint-plugin-node "^11.1.0" -eslint-config-oclif@^4.0.0: - version "4.0.0" - resolved "https://registry.yarnpkg.com/eslint-config-oclif/-/eslint-config-oclif-4.0.0.tgz#90a07587f7be7c92ae3ce750ae11cf1e864239eb" - integrity sha512-5tkUQeC33rHAhJxaGeBGYIflDLumeV2qD/4XLBdXhB/6F/+Jnwdce9wYHSvkx0JUqUQShpQv8JEVkBp/zzD7hg== +eslint-config-oclif@^5.0.0: + version "5.0.0" + resolved "https://registry.yarnpkg.com/eslint-config-oclif/-/eslint-config-oclif-5.0.0.tgz#69c5cc8a19025e71fc49a10f47475bb8dd18ba24" + integrity sha512-yPxtUzU6eFL+WoW8DbRf7uoHxgiu0B/uY7k7rgHwFHij66WoI3qhBNhKI5R5FS5JeTuBOXKrNqQVDsSH0D/JvA== dependencies: - eslint-config-xo-space "^0.27.0" - eslint-plugin-mocha "^9.0.0" + eslint-config-xo-space "^0.34.0" + eslint-plugin-mocha "^10.1.0" eslint-plugin-node "^11.1.0" - eslint-plugin-unicorn "^36.0.0" - -eslint-config-xo-space@^0.27.0: - version "0.27.0" - resolved "https://registry.yarnpkg.com/eslint-config-xo-space/-/eslint-config-xo-space-0.27.0.tgz#9663e41d7bedc0f345488377770565aa9b0085e0" - integrity sha512-b8UjW+nQyOkhiANVpIptqlKPyE7XRyQ40uQ1NoBhzVfu95gxfZGrpliq8ZHBpaOF2wCLZaexTSjg7Rvm99vj4A== - dependencies: - eslint-config-xo "^0.35.0" - -eslint-config-xo-space@^0.29.0: - version "0.29.0" - resolved "https://registry.yarnpkg.com/eslint-config-xo-space/-/eslint-config-xo-space-0.29.0.tgz#5bbd2d0ecb172c4e65022b8543ecb1f7d199b8e2" - integrity sha512-emUZVHjmzl3I1aO2M/2gEpqa/GHXTl7LF/vQeAX4W+mQIU+2kyqY97FkMnSc2J8Osoq+vCSXCY/HjFUmFIF/Ag== - dependencies: - eslint-config-xo "^0.38.0" + eslint-plugin-unicorn "^48.0.1" -eslint-config-xo@^0.35.0: - version "0.35.0" - resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.35.0.tgz#8b5afca244c44129c32386c28602f973ad5cb762" - integrity sha512-+WyZTLWUJlvExFrBU/Ldw8AB/S0d3x+26JQdBWbcqig2ZaWh0zinYcHok+ET4IoPaEcRRf3FE9kjItNVjBwnAg== +eslint-config-xo-space@^0.34.0: + version "0.34.0" + resolved "https://registry.yarnpkg.com/eslint-config-xo-space/-/eslint-config-xo-space-0.34.0.tgz#974db7f7091edc23e2f29cc98acaa1be78ac87e5" + integrity sha512-8ZI0Ta/loUIL1Wk/ouWvk2ZWN8X6Un49MqnBf2b6uMjC9c5Pcfr1OivEOrvd3niD6BKgMNH2Q9nG0CcCWC+iVA== dependencies: - confusing-browser-globals "1.0.10" + eslint-config-xo "^0.43.0" -eslint-config-xo@^0.38.0: - version "0.38.0" - resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.38.0.tgz#50cbe676a90d5582e1bbf1de750286e7cf09378e" - integrity sha512-G2jL+VyfkcZW8GoTmqLsExvrWssBedSoaQQ11vyhflDeT3csMdBVp0On+AVijrRuvgmkWeDwwUL5Rj0qDRHK6g== +eslint-config-xo@^0.43.0: + version "0.43.1" + resolved "https://registry.yarnpkg.com/eslint-config-xo/-/eslint-config-xo-0.43.1.tgz#c2ac8993f6e429048c813f599265d1636a0bc060" + integrity sha512-azv1L2PysRA0NkZOgbndUpN+581L7wPqkgJOgxxw3hxwXAbJgD6Hqb/SjHRiACifXt/AvxCzE/jIKFAlI7XjvQ== dependencies: - confusing-browser-globals "1.0.10" + confusing-browser-globals "1.0.11" eslint-formatter-pretty@^4.1.0: version "4.1.0" @@ -2078,6 +1985,35 @@ eslint-formatter-pretty@^4.1.0: string-width "^4.2.0" supports-hyperlinks "^2.0.0" +eslint-import-resolver-node@^0.3.7: + version "0.3.9" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-node/-/eslint-import-resolver-node-0.3.9.tgz#d4eaac52b8a2e7c3cd1903eb00f7e053356118ac" + integrity sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g== + dependencies: + debug "^3.2.7" + is-core-module "^2.13.0" + resolve "^1.22.4" + +eslint-import-resolver-typescript@^3.6.0: + version "3.6.0" + resolved "https://registry.yarnpkg.com/eslint-import-resolver-typescript/-/eslint-import-resolver-typescript-3.6.0.tgz#36f93e1eb65a635e688e16cae4bead54552e3bbd" + integrity sha512-QTHR9ddNnn35RTxlaEnx2gCxqFlF2SEN0SE2d17SqwyM7YOSI2GHWRYp5BiRkObTUNYPupC/3Fq2a0PpT+EKpg== + dependencies: + debug "^4.3.4" + enhanced-resolve "^5.12.0" + eslint-module-utils "^2.7.4" + fast-glob "^3.3.1" + get-tsconfig "^4.5.0" + is-core-module "^2.11.0" + is-glob "^4.0.3" + +eslint-module-utils@^2.7.4, eslint-module-utils@^2.8.0: + version "2.8.0" + resolved "https://registry.yarnpkg.com/eslint-module-utils/-/eslint-module-utils-2.8.0.tgz#e439fee65fc33f6bba630ff621efc38ec0375c49" + integrity sha512-aWajIYfsqCKRDgUfjEXNN/JlrzauMuSEy5sbd7WXbtW3EH6A6MpwEh42c7qD+MqQo9QMJ6fWLAeIJynx0g6OAw== + dependencies: + debug "^3.2.7" + eslint-plugin-es@^3.0.0: version "3.0.1" resolved "https://registry.yarnpkg.com/eslint-plugin-es/-/eslint-plugin-es-3.0.1.tgz#75a7cdfdccddc0589934aeeb384175f221c57893" @@ -2086,13 +2022,36 @@ eslint-plugin-es@^3.0.0: eslint-utils "^2.0.0" regexpp "^3.0.0" -eslint-plugin-mocha@^9.0.0: - version "9.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-9.0.0.tgz#b4457d066941eecb070dc06ed301c527d9c61b60" - integrity sha512-d7knAcQj1jPCzZf3caeBIn3BnW6ikcvfz0kSqQpwPYcVGLoJV5sz0l0OJB2LR8I7dvTDbqq1oV6ylhSgzA10zg== +eslint-plugin-import@^2.28.1: + version "2.28.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-import/-/eslint-plugin-import-2.28.1.tgz#63b8b5b3c409bfc75ebaf8fb206b07ab435482c4" + integrity sha512-9I9hFlITvOV55alzoKBI+K9q74kv0iKMeY6av5+umsNwayt59fz692daGyjR+oStBQgx6nwR9rXldDev3Clw+A== + dependencies: + array-includes "^3.1.6" + array.prototype.findlastindex "^1.2.2" + array.prototype.flat "^1.3.1" + array.prototype.flatmap "^1.3.1" + debug "^3.2.7" + doctrine "^2.1.0" + eslint-import-resolver-node "^0.3.7" + eslint-module-utils "^2.8.0" + has "^1.0.3" + is-core-module "^2.13.0" + is-glob "^4.0.3" + minimatch "^3.1.2" + object.fromentries "^2.0.6" + object.groupby "^1.0.0" + object.values "^1.1.6" + semver "^6.3.1" + tsconfig-paths "^3.14.2" + +eslint-plugin-mocha@^10.1.0: + version "10.1.0" + resolved "https://registry.yarnpkg.com/eslint-plugin-mocha/-/eslint-plugin-mocha-10.1.0.tgz#69325414f875be87fb2cb00b2ef33168d4eb7c8d" + integrity sha512-xLqqWUF17llsogVOC+8C6/jvQ+4IoOREbN7ZCHuOHuD6cT5cDD4h7f2LgsZuzMAiwswWE21tO7ExaknHVDrSkw== dependencies: eslint-utils "^3.0.0" - ramda "^0.27.1" + rambda "^7.1.0" eslint-plugin-node@^11.1.0: version "11.1.0" @@ -2106,49 +2065,41 @@ eslint-plugin-node@^11.1.0: resolve "^1.10.1" semver "^6.1.0" -eslint-plugin-unicorn@^36.0.0: - version "36.0.0" - resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-36.0.0.tgz#db50e1426839e401d33c5a279f49d4a5bbb640d8" - integrity sha512-xxN2vSctGWnDW6aLElm/LKIwcrmk6mdiEcW55Uv5krcrVcIFSWMmEgc/hwpemYfZacKZ5npFERGNz4aThsp1AA== +eslint-plugin-unicorn@^48.0.1: + version "48.0.1" + resolved "https://registry.yarnpkg.com/eslint-plugin-unicorn/-/eslint-plugin-unicorn-48.0.1.tgz#a6573bc1687ae8db7121fdd8f92394b6549a6959" + integrity sha512-FW+4r20myG/DqFcCSzoumaddKBicIPeFnTrifon2mWIzlfyvzwyqZjqVP7m4Cqr/ZYisS2aiLghkUWaPg6vtCw== dependencies: - "@babel/helper-validator-identifier" "^7.14.9" - ci-info "^3.2.0" + "@babel/helper-validator-identifier" "^7.22.5" + "@eslint-community/eslint-utils" "^4.4.0" + ci-info "^3.8.0" clean-regexp "^1.0.0" - eslint-template-visitor "^2.3.2" - eslint-utils "^3.0.0" - is-builtin-module "^3.1.0" + esquery "^1.5.0" + indent-string "^4.0.0" + is-builtin-module "^3.2.1" + jsesc "^3.0.2" lodash "^4.17.21" pluralize "^8.0.0" read-pkg-up "^7.0.1" - regexp-tree "^0.1.23" - safe-regex "^2.1.1" - semver "^7.3.5" + regexp-tree "^0.1.27" + regjsparser "^0.10.0" + semver "^7.5.4" + strip-indent "^3.0.0" eslint-rule-docs@^1.1.5: version "1.1.235" resolved "https://registry.yarnpkg.com/eslint-rule-docs/-/eslint-rule-docs-1.1.235.tgz#be6ef1fc3525f17b3c859ae2997fedadc89bfb9b" integrity sha512-+TQ+x4JdTnDoFEXXb3fDvfGOwnyNV7duH8fXWTPD1ieaBmB8omj7Gw/pMBBu4uI2uJCCU8APDaQJzWuXnTsH4A== -eslint-scope@5.1.1, eslint-scope@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-5.1.1.tgz#e786e59a66cb92b3f6c1fb0d508aab174848f48c" - integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== +eslint-scope@^7.2.2: + version "7.2.2" + resolved "https://registry.yarnpkg.com/eslint-scope/-/eslint-scope-7.2.2.tgz#deb4f92563390f32006894af62a22dba1c46423f" + integrity sha512-dOt21O7lTMhDM+X9mB4GX+DZrZtCUJPL/wlcTqxyrx5IvO0IYtILdtrQGQp+8n5S0gwSVmOf9NQrjMOgfQZlIg== dependencies: esrecurse "^4.3.0" - estraverse "^4.1.1" - -eslint-template-visitor@^2.3.2: - version "2.3.2" - resolved "https://registry.yarnpkg.com/eslint-template-visitor/-/eslint-template-visitor-2.3.2.tgz#b52f96ff311e773a345d79053ccc78275bbc463d" - integrity sha512-3ydhqFpuV7x1M9EK52BPNj6V0Kwu0KKkcIAfpUhwHbR8ocRln/oUHgfxQupY8O1h4Qv/POHDumb/BwwNfxbtnA== - dependencies: - "@babel/core" "^7.12.16" - "@babel/eslint-parser" "^7.12.16" - eslint-visitor-keys "^2.0.0" - esquery "^1.3.1" - multimap "^1.1.0" + estraverse "^5.2.0" -eslint-utils@^2.0.0, eslint-utils@^2.1.0: +eslint-utils@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-utils/-/eslint-utils-2.1.0.tgz#d2de5e03424e707dc10c74068ddedae708741b27" integrity sha512-w94dQYoauyvlDc43XnGB8lU3Zt713vNChgt4EWwhXAP2XkBvndfxF0AgIqKOOasjPIPzj9JqgwkwbCYD0/V3Zg== @@ -2162,77 +2113,79 @@ eslint-utils@^3.0.0: dependencies: eslint-visitor-keys "^2.0.0" -eslint-visitor-keys@^1.1.0, eslint-visitor-keys@^1.3.0: +eslint-visitor-keys@^1.1.0: version "1.3.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-1.3.0.tgz#30ebd1ef7c2fdff01c3a4f151044af25fab0523e" integrity sha512-6J72N8UNa462wa/KFODt/PJ3IU60SDpC3QXC1Hjc1BXXpfL2C9R5+AU7jhe0F6GREqVMh4Juu+NY7xn+6dipUQ== -eslint-visitor-keys@^2.0.0, eslint-visitor-keys@^2.1.0: +eslint-visitor-keys@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-2.1.0.tgz#f65328259305927392c938ed44eb0a5c9b2bd303" integrity sha512-0rSmRBzXgDzIsD6mGdJgevzgezI534Cer5L/vyMX0kHzT/jiB43jRhd9YUlMGYLQy2zprNmoT8qasCGtY+QaKw== -eslint@^7.32.0: - version "7.32.0" - resolved "https://registry.yarnpkg.com/eslint/-/eslint-7.32.0.tgz#c6d328a14be3fb08c8d1d21e12c02fdb7a2a812d" - integrity sha512-VHZ8gX+EDfz+97jGcgyGCyRia/dPOd6Xh9yPv8Bl1+SoaIwD+a/vlrOmGRUyOYu7MwUhc7CxqeaDZU13S4+EpA== - dependencies: - "@babel/code-frame" "7.12.11" - "@eslint/eslintrc" "^0.4.3" - "@humanwhocodes/config-array" "^0.5.0" - ajv "^6.10.0" +eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4.3: + version "3.4.3" + resolved "https://registry.yarnpkg.com/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz#0cd72fe8550e3c2eae156a96a4dddcd1c8ac5800" + integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== + +eslint@^8.49.0: + version "8.49.0" + resolved "https://registry.yarnpkg.com/eslint/-/eslint-8.49.0.tgz#09d80a89bdb4edee2efcf6964623af1054bf6d42" + integrity sha512-jw03ENfm6VJI0jA9U+8H5zfl5b+FvuU3YYvZRdZHOlU2ggJkxrlkJH4HcDrZpj6YwD8kuYqvQM8LyesoazrSOQ== + dependencies: + "@eslint-community/eslint-utils" "^4.2.0" + "@eslint-community/regexpp" "^4.6.1" + "@eslint/eslintrc" "^2.1.2" + "@eslint/js" "8.49.0" + "@humanwhocodes/config-array" "^0.11.11" + "@humanwhocodes/module-importer" "^1.0.1" + "@nodelib/fs.walk" "^1.2.8" + ajv "^6.12.4" chalk "^4.0.0" cross-spawn "^7.0.2" - debug "^4.0.1" + debug "^4.3.2" doctrine "^3.0.0" - enquirer "^2.3.5" escape-string-regexp "^4.0.0" - eslint-scope "^5.1.1" - eslint-utils "^2.1.0" - eslint-visitor-keys "^2.0.0" - espree "^7.3.1" - esquery "^1.4.0" + eslint-scope "^7.2.2" + eslint-visitor-keys "^3.4.3" + espree "^9.6.1" + esquery "^1.4.2" esutils "^2.0.2" fast-deep-equal "^3.1.3" file-entry-cache "^6.0.1" - functional-red-black-tree "^1.0.1" - glob-parent "^5.1.2" - globals "^13.6.0" - ignore "^4.0.6" - import-fresh "^3.0.0" + find-up "^5.0.0" + glob-parent "^6.0.2" + globals "^13.19.0" + graphemer "^1.4.0" + ignore "^5.2.0" imurmurhash "^0.1.4" is-glob "^4.0.0" - js-yaml "^3.13.1" + is-path-inside "^3.0.3" + js-yaml "^4.1.0" json-stable-stringify-without-jsonify "^1.0.1" levn "^0.4.1" lodash.merge "^4.6.2" - minimatch "^3.0.4" + minimatch "^3.1.2" natural-compare "^1.4.0" - optionator "^0.9.1" - progress "^2.0.0" - regexpp "^3.1.0" - semver "^7.2.1" - strip-ansi "^6.0.0" - strip-json-comments "^3.1.0" - table "^6.0.9" + optionator "^0.9.3" + strip-ansi "^6.0.1" text-table "^0.2.0" - v8-compile-cache "^2.0.3" -espree@^7.3.0, espree@^7.3.1: - version "7.3.1" - resolved "https://registry.yarnpkg.com/espree/-/espree-7.3.1.tgz#f2df330b752c6f55019f8bd89b7660039c1bbbb6" - integrity sha512-v3JCNCE64umkFpmkFGqzVKsOT0tN1Zr+ueqLZfpV1Ob8e+CEgPWa+OxCoGH3tnhimMKIaBm4m/vaRpJ/krRz2g== +espree@^9.6.0, espree@^9.6.1: + version "9.6.1" + resolved "https://registry.yarnpkg.com/espree/-/espree-9.6.1.tgz#a2a17b8e434690a5432f2f8018ce71d331a48c6f" + integrity sha512-oruZaFkjorTpF32kDSI5/75ViwGeZginGGy2NoOSg3Q9bnwlnmDm4HLnkl0RE3n+njDXR037aY1+x58Z/zFdwQ== dependencies: - acorn "^7.4.0" - acorn-jsx "^5.3.1" - eslint-visitor-keys "^1.3.0" + acorn "^8.9.0" + acorn-jsx "^5.3.2" + eslint-visitor-keys "^3.4.1" esprima@^4.0.0, esprima@~4.0.0: version "4.0.1" resolved "https://registry.yarnpkg.com/esprima/-/esprima-4.0.1.tgz#13b04cdb3e6c5d19df91ab6987a8695619b0aa71" integrity sha512-eGuFFw7Upda+g4p+QHvnW0RyTX/SVeJBDM/gCtMARO0cLuT2HcEKnTPvhjV6aGeqrCB/sbNop0Kszm0jsaWU4A== -esquery@^1.3.1, esquery@^1.4.0: +esquery@^1.4.2, esquery@^1.5.0: version "1.5.0" resolved "https://registry.yarnpkg.com/esquery/-/esquery-1.5.0.tgz#6ce17738de8577694edd7361c57182ac8cb0db0b" integrity sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg== @@ -2246,11 +2199,6 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" -estraverse@^4.1.1: - version "4.3.0" - resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-4.3.0.tgz#398ad3f3c5a24948be7725e83d11a7de28cdbd1d" - integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== - estraverse@^5.1.0, estraverse@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/estraverse/-/estraverse-5.2.0.tgz#307df42547e6cc7324d3cf03c155d5cdb8c53880" @@ -2320,6 +2268,17 @@ fast-glob@^3.2.9: merge2 "^1.3.0" micromatch "^4.0.4" +fast-glob@^3.3.1: + version "3.3.1" + resolved "https://registry.yarnpkg.com/fast-glob/-/fast-glob-3.3.1.tgz#784b4e897340f3dbbef17413b3f11acf03c874c4" + integrity sha512-kNFPyjhh5cKjrUltxs+wFx+ZkbRaxxmZ+X0ZU31SOsxCEtP9VPgtq2teZw1DebupL5GmDaNQ6yKMMVcM41iqDg== + dependencies: + "@nodelib/fs.stat" "^2.0.2" + "@nodelib/fs.walk" "^1.2.3" + glob-parent "^5.1.2" + merge2 "^1.3.0" + micromatch "^4.0.4" + fast-json-stable-stringify@^2.0.0: version "2.1.0" resolved "https://registry.yarnpkg.com/fast-json-stable-stringify/-/fast-json-stable-stringify-2.1.0.tgz#874bf69c6f404c2b5d99c481341399fd55892633" @@ -2397,6 +2356,13 @@ flatted@^3.1.0: resolved "https://registry.yarnpkg.com/flatted/-/flatted-3.2.2.tgz#64bfed5cb68fe3ca78b3eb214ad97b63bedce561" integrity sha512-JaTY/wtrcSyvXJl4IMFHPKyFur1sE9AUqc0QnhOaJ0CxHtAoIV8pYDzeEfAaNEtGkOfq4gr3LBFmdXW5mOQFnA== +for-each@^0.3.3: + version "0.3.3" + resolved "https://registry.yarnpkg.com/for-each/-/for-each-0.3.3.tgz#69b447e88a0a5d32c3e7084f3f1710034b21376e" + integrity sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw== + dependencies: + is-callable "^1.1.3" + foreground-child@^3.1.0: version "3.1.1" resolved "https://registry.yarnpkg.com/foreground-child/-/foreground-child-3.1.1.tgz#1d173e776d75d2772fed08efe4a0de1ea1b12d0d" @@ -2444,10 +2410,20 @@ function-bind@^1.1.1: resolved "https://registry.yarnpkg.com/function-bind/-/function-bind-1.1.1.tgz#a56899d3ea3c9bab874bb9773b7c5ede92f4895d" integrity sha512-yIovAzMX49sF8Yl58fSCWJ5svSLuaibPxXQJFLmBObTuCr0Mf1KiPopGM9NiFjiYBCbfaa2Fh6breQ6ANVTI0A== -functional-red-black-tree@^1.0.1: - version "1.0.1" - resolved "https://registry.yarnpkg.com/functional-red-black-tree/-/functional-red-black-tree-1.0.1.tgz#1b0ab3bd553b2a0d6399d29c0e3ea0b252078327" - integrity sha512-dsKNQNdj6xA3T+QlADDA7mOSlX0qiMINjn0cgr+eGHGsbSHzTabcIogz2+p/iqP1Xs6EP/sS2SbqH+brGTbq0g== +function.prototype.name@^1.1.6: + version "1.1.6" + resolved "https://registry.yarnpkg.com/function.prototype.name/-/function.prototype.name-1.1.6.tgz#cdf315b7d90ee77a4c6ee216c3c3362da07533fd" + integrity sha512-Z5kx79swU5P27WEayXM1tBi5Ze/lbIyiNgU3qyXUOf9b2rgXYyF9Dy9Cx+IQv/Lc8WCG6L82zwUPpSS9hGehIg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + functions-have-names "^1.2.3" + +functions-have-names@^1.2.3: + version "1.2.3" + resolved "https://registry.yarnpkg.com/functions-have-names/-/functions-have-names-1.2.3.tgz#0404fe4ee2ba2f607f0e0ec3c80bae994133b834" + integrity sha512-xckBUXyTIqT97tq2x2AMb+g163b5JFysYk0x4qxNFwbfQkmNZoiRHb6sPzI9/QV33WeuvVYBUIiD4NzNIyqaRQ== gauge@^4.0.3: version "4.0.4" @@ -2477,11 +2453,6 @@ gauge@^5.0.0: strip-ansi "^6.0.1" wide-align "^1.1.5" -gensync@^1.0.0-beta.2: - version "1.0.0-beta.2" - resolved "https://registry.yarnpkg.com/gensync/-/gensync-1.0.0-beta.2.tgz#32a6ee76c3d7f52d46b2b1ae5d93fea8580a25e0" - integrity sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg== - get-caller-file@^2.0.5: version "2.0.5" resolved "https://registry.yarnpkg.com/get-caller-file/-/get-caller-file-2.0.5.tgz#4f94412a82db32f36e3b0b9741f8a97feb031f7e" @@ -2492,11 +2463,36 @@ get-func-name@^2.0.0: resolved "https://registry.yarnpkg.com/get-func-name/-/get-func-name-2.0.0.tgz#ead774abee72e20409433a066366023dd6887a41" integrity sha1-6td0q+5y4gQJQzoGY2YCPdaIekE= +get-intrinsic@^1.0.2, get-intrinsic@^1.1.1, get-intrinsic@^1.1.3, get-intrinsic@^1.2.0, get-intrinsic@^1.2.1: + version "1.2.1" + resolved "https://registry.yarnpkg.com/get-intrinsic/-/get-intrinsic-1.2.1.tgz#d295644fed4505fc9cde952c37ee12b477a83d82" + integrity sha512-2DcsyfABl+gVHEfCOaTrWgyt+tb6MSEGmKq+kI5HwLbIYgjgmMcV8KQ41uaKz1xxUcn9tJtgFbQUEVcEbd0FYw== + dependencies: + function-bind "^1.1.1" + has "^1.0.3" + has-proto "^1.0.1" + has-symbols "^1.0.3" + get-package-type@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/get-package-type/-/get-package-type-0.1.0.tgz#8de2d803cff44df3bc6c456e6668b36c3926e11a" integrity sha512-pjzuKtY64GYfWizNAJ0fr9VqttZkNiK2iS430LtIHzjBEr6bX8Am2zm4sW4Ro5wjWW5cAlRL1qAMTcXbjNAO2Q== +get-symbol-description@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/get-symbol-description/-/get-symbol-description-1.0.0.tgz#7fdb81c900101fbd564dd5f1a30af5aadc1e58d6" + integrity sha512-2EmdH1YvIQiZpltCNgkuiUnyukzxM/R6NDJX31Ke3BG1Nq5b0S2PhX59UKi9vZpPDQVdqn+1IcaAwnzTT5vCjw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.1.1" + +get-tsconfig@^4.5.0: + version "4.7.0" + resolved "https://registry.yarnpkg.com/get-tsconfig/-/get-tsconfig-4.7.0.tgz#06ce112a1463e93196aa90320c35df5039147e34" + integrity sha512-pmjiZ7xtB8URYm74PlGJozDNyhvsVLUcpBa8DZBG3bWHwaHa9bPiRpiSfovw+fjhwONSCWKRyk+JQHEGZmMrzw== + dependencies: + resolve-pkg-maps "^1.0.0" + git-raw-commits@^2.0.0: version "2.0.10" resolved "https://registry.yarnpkg.com/git-raw-commits/-/git-raw-commits-2.0.10.tgz#e2255ed9563b1c9c3ea6bd05806410290297bbc1" @@ -2515,6 +2511,13 @@ glob-parent@^5.1.2, glob-parent@~5.1.2: dependencies: is-glob "^4.0.1" +glob-parent@^6.0.2: + version "6.0.2" + resolved "https://registry.yarnpkg.com/glob-parent/-/glob-parent-6.0.2.tgz#6d237d99083950c79290f24c7642a3de9a28f9e3" + integrity sha512-XxwI8EOhVQgWp6iDL+3b0r86f4d6AX6zSU55HfB4ydCEuXLXc5FcYeOu+nnGftS4TEju/11rt4KJPTMgbfmv4A== + dependencies: + is-glob "^4.0.3" + glob@7.2.0: version "7.2.0" resolved "https://registry.yarnpkg.com/glob/-/glob-7.2.0.tgz#d15535af7732e02e948f4c41628bd910293f6023" @@ -2569,19 +2572,21 @@ global-dirs@^0.1.1: dependencies: ini "^1.3.4" -globals@^11.1.0: - version "11.12.0" - resolved "https://registry.yarnpkg.com/globals/-/globals-11.12.0.tgz#ab8795338868a0babd8525758018c2a7eb95c42e" - integrity sha512-WOBp/EEGUiIsJSp7wcv/y6MO+lV9UoncWqxuFfm8eBwzWNgyfBd6Gz+IeKQ9jCmyhoH99g15M3T+QaVHFjizVA== - -globals@^13.6.0, globals@^13.9.0: +globals@^13.19.0: version "13.21.0" resolved "https://registry.yarnpkg.com/globals/-/globals-13.21.0.tgz#163aae12f34ef502f5153cfbdd3600f36c63c571" integrity sha512-ybyme3s4yy/t/3s35bewwXKOf7cvzfreG2lH0lZl0JB7I4GxRP2ghxOK/Nb9EkRXdbBXZLfq/p/0W2JUONB/Gg== dependencies: type-fest "^0.20.2" -globby@^11.0.1, globby@^11.0.3, globby@^11.1.0: +globalthis@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/globalthis/-/globalthis-1.0.3.tgz#5852882a52b80dc301b0660273e1ed082f0b6ccf" + integrity sha512-sFdI5LyBiNTHjRd7cGPWapiHWMOXKyuBNX/cWJ3NfzrZQVa8GI/8cofCl74AOVqq9W5kNmguTIzJ/1s2gyI9wA== + dependencies: + define-properties "^1.1.3" + +globby@^11.0.1, globby@^11.1.0: version "11.1.0" resolved "https://registry.yarnpkg.com/globby/-/globby-11.1.0.tgz#bd4be98bb042f83d796f7e3811991fbe82a0d34b" integrity sha512-jhIXaOzy1sb8IyocaruWSn1TjmnBVs8Ayhcy83rmxNJ8q2uWKCAj3CnJY+KpGSXCueAPc0i05kVvVKtP1t9S3g== @@ -2593,21 +2598,38 @@ globby@^11.0.1, globby@^11.0.3, globby@^11.1.0: merge2 "^1.4.1" slash "^3.0.0" +gopd@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/gopd/-/gopd-1.0.1.tgz#29ff76de69dac7489b7c0918a5788e56477c332c" + integrity sha512-d65bNlIadxvpb/A2abVdlqKqV563juRnZ1Wtk6s1sIR8uNsXR70xqIzVqxVf1eTqDunwT2MkczEeaezCKTZhwA== + dependencies: + get-intrinsic "^1.1.3" + graceful-fs@^4.1.15, graceful-fs@^4.1.6, graceful-fs@^4.2.0: version "4.2.6" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.6.tgz#ff040b2b0853b23c3d31027523706f1885d76bee" integrity sha512-nTnJ528pbqxYanhpDYsi4Rd8MAeaBA67+RZ10CM1m3bTAVFEDcd5AuA4a6W5YkGZ1iNXHzZz8T6TBKLeBuNriQ== -graceful-fs@^4.2.11, graceful-fs@^4.2.6: +graceful-fs@^4.2.11, graceful-fs@^4.2.4, graceful-fs@^4.2.6: version "4.2.11" resolved "https://registry.yarnpkg.com/graceful-fs/-/graceful-fs-4.2.11.tgz#4183e4e8bf08bb6e05bbb2f7d2e0c8f712ca40e3" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== +graphemer@^1.4.0: + version "1.4.0" + resolved "https://registry.yarnpkg.com/graphemer/-/graphemer-1.4.0.tgz#fb2f1d55e0e3a1849aeffc90c4fa0dd53a0e66c6" + integrity sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag== + hard-rejection@^2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/hard-rejection/-/hard-rejection-2.1.0.tgz#1c6eda5c1685c63942766d79bb40ae773cecd883" integrity sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA== +has-bigints@^1.0.1, has-bigints@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/has-bigints/-/has-bigints-1.0.2.tgz#0871bd3e3d51626f6ca0966668ba35d5602d6eaa" + integrity sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ== + has-flag@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-3.0.0.tgz#b5d454dc2199ae225699f3467e5a07f3b955bafd" @@ -2618,6 +2640,30 @@ has-flag@^4.0.0: resolved "https://registry.yarnpkg.com/has-flag/-/has-flag-4.0.0.tgz#944771fd9c81c81265c4d6941860da06bb59479b" integrity sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ== +has-property-descriptors@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-property-descriptors/-/has-property-descriptors-1.0.0.tgz#610708600606d36961ed04c196193b6a607fa861" + integrity sha512-62DVLZGoiEBDHQyqG4w9xCuZ7eJEwNmJRWw2VY84Oedb7WFcA27fiEVe8oUQx9hAUJ4ekurquucTGwsyO1XGdQ== + dependencies: + get-intrinsic "^1.1.1" + +has-proto@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/has-proto/-/has-proto-1.0.1.tgz#1885c1305538958aff469fef37937c22795408e0" + integrity sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg== + +has-symbols@^1.0.2, has-symbols@^1.0.3: + version "1.0.3" + resolved "https://registry.yarnpkg.com/has-symbols/-/has-symbols-1.0.3.tgz#bb7b2c4349251dce87b125f7bdf874aa7c8b39f8" + integrity sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A== + +has-tostringtag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/has-tostringtag/-/has-tostringtag-1.0.0.tgz#7e133818a7d394734f941e73c3d3f9291e658b25" + integrity sha512-kFjcSNhnlGV1kyoGk7OXKSawH5JOb/LzUc5w9B02hOTO0dfFRjbHQKvg1d6cf3HbeUmtU9VbbV3qzZ2Teh97WQ== + dependencies: + has-symbols "^1.0.2" + has-unicode@^2.0.1: version "2.0.1" resolved "https://registry.yarnpkg.com/has-unicode/-/has-unicode-2.0.1.tgz#e0e6fe6a28cf51138855e086d1691e771de2a8b9" @@ -2724,17 +2770,12 @@ ignore-walk@^6.0.0: dependencies: minimatch "^9.0.0" -ignore@^4.0.6: - version "4.0.6" - resolved "https://registry.yarnpkg.com/ignore/-/ignore-4.0.6.tgz#750e3db5862087b4737ebac8207ffd1ef27b25fc" - integrity sha512-cyFDKrqc/YdcWFniJhzI42+AzS+gNwmUzOSFcRCQYwySuBBBy/KjuxWLZ/FHEH6Moq1NizMOBWyTcv8O4OZIMg== - ignore@^5.1.1, ignore@^5.2.0: version "5.2.0" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.0.tgz#6d3bac8fa7fe0d45d9f9be7bac2fc279577e345a" integrity sha512-CmxgYGiEPCLhfLnpPp1MoRmifwEIOgjcHXxOBjv7mY96c+eWScsOP9c112ZyLdWHi0FxHjI+4uVhKYp/gcdRmQ== -ignore@^5.1.8: +ignore@^5.2.4: version "5.2.4" resolved "https://registry.yarnpkg.com/ignore/-/ignore-5.2.4.tgz#a291c0c6178ff1b960befe47fcdec301674a6324" integrity sha512-MAb38BcSbH0eHNBxn7ql2NH/kX33OkB3lZ1BNdh7ENeRChHTYsTvWrMubiIAMNS2llXEEgZ1MUOBtXChP3kaFQ== @@ -2798,6 +2839,15 @@ init-package-json@^5.0.0: validate-npm-package-license "^3.0.4" validate-npm-package-name "^5.0.0" +internal-slot@^1.0.5: + version "1.0.5" + resolved "https://registry.yarnpkg.com/internal-slot/-/internal-slot-1.0.5.tgz#f2a2ee21f668f8627a4667f309dc0f4fb6674986" + integrity sha512-Y+R5hJrzs52QCG2laLn4udYVnxsfny9CpOhNhUvk/SSSVyF6T27FzRbF0sroPidSu3X8oEAkOn2K804mjpt6UQ== + dependencies: + get-intrinsic "^1.2.0" + has "^1.0.3" + side-channel "^1.0.4" + interpret@^1.0.0: version "1.4.0" resolved "https://registry.yarnpkg.com/interpret/-/interpret-1.4.0.tgz#665ab8bc4da27a774a40584e812e3e0fa45b1a1e" @@ -2818,11 +2868,27 @@ irregular-plurals@^3.2.0: resolved "https://registry.yarnpkg.com/irregular-plurals/-/irregular-plurals-3.3.0.tgz#67d0715d4361a60d9fd9ee80af3881c631a31ee2" integrity sha512-MVBLKUTangM3EfRPFROhmWQQKRDsrgI83J8GS3jXy+OwYqiR2/aoWndYQ5416jLE3uaGgLH7ncme3X9y09gZ3g== +is-array-buffer@^3.0.1, is-array-buffer@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/is-array-buffer/-/is-array-buffer-3.0.2.tgz#f2653ced8412081638ecb0ebbd0c41c6e0aecbbe" + integrity sha512-y+FyyR/w8vfIRq4eQcM1EYgSTnmHXPqaF+IgzgraytCFq5Xh8lllDVmAZolPJiZttZLeFSINPYMaEJ7/vWUa1w== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.0" + is-typed-array "^1.1.10" + is-arrayish@^0.2.1: version "0.2.1" resolved "https://registry.yarnpkg.com/is-arrayish/-/is-arrayish-0.2.1.tgz#77c99840527aa8ecb1a8ba697b80645a7a926a9d" integrity sha1-d8mYQFJ6qOyxqLppe4BkWnqSap0= +is-bigint@^1.0.1: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-bigint/-/is-bigint-1.0.4.tgz#08147a1875bc2b32005d41ccd8291dffc6691df3" + integrity sha512-zB9CruMamjym81i2JZ3UMn54PKGsQzsJeo6xvN3HJJ4CAsQNB6iRutp2To77OfCNuoxspsIhzaPoO1zyCEhFOg== + dependencies: + has-bigints "^1.0.1" + is-binary-path@~2.1.0: version "2.1.0" resolved "https://registry.yarnpkg.com/is-binary-path/-/is-binary-path-2.1.0.tgz#ea1f7f3b80f064236e83470f86c09c254fb45b09" @@ -2830,13 +2896,26 @@ is-binary-path@~2.1.0: dependencies: binary-extensions "^2.0.0" -is-builtin-module@^3.1.0: +is-boolean-object@^1.1.0: + version "1.1.2" + resolved "https://registry.yarnpkg.com/is-boolean-object/-/is-boolean-object-1.1.2.tgz#5c6dc200246dd9321ae4b885a114bb1f75f63719" + integrity sha512-gDYaKHJmnj4aWxyj6YHyXVpdQawtVLHU5cb+eztPGczf6cjuTdwve5ZIEfgXqH4e57An1D1AKf8CZ3kYrQRqYA== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + +is-builtin-module@^3.2.1: version "3.2.1" resolved "https://registry.yarnpkg.com/is-builtin-module/-/is-builtin-module-3.2.1.tgz#f03271717d8654cfcaf07ab0463faa3571581169" integrity sha512-BSLE3HnV2syZ0FK0iMA/yUGplUeMmNz4AW5fnTunbCIqZi4vG3WjJT9FHMy5D69xmAYBHXQhJdALdpwVxV501A== dependencies: builtin-modules "^3.3.0" +is-callable@^1.1.3, is-callable@^1.1.4, is-callable@^1.2.7: + version "1.2.7" + resolved "https://registry.yarnpkg.com/is-callable/-/is-callable-1.2.7.tgz#3bc2a85ea742d9e36205dcacdd72ca1fdc51b055" + integrity sha512-1BC0BVFhS/p0qtw6enp8e+8OD0UrK0oFLztSjNzhcKA3WDuJxxAPXzPuPtKkjEY9UUoEWlX/8fgKeu2S8i9JTA== + is-cidr@^4.0.2: version "4.0.2" resolved "https://registry.yarnpkg.com/is-cidr/-/is-cidr-4.0.2.tgz#94c7585e4c6c77ceabf920f8cde51b8c0fda8814" @@ -2844,6 +2923,13 @@ is-cidr@^4.0.2: dependencies: cidr-regex "^3.1.1" +is-core-module@^2.11.0, is-core-module@^2.13.0, is-core-module@^2.8.1: + version "2.13.0" + resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" + integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== + dependencies: + has "^1.0.3" + is-core-module@^2.2.0: version "2.5.0" resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.5.0.tgz#f754843617c70bfd29b7bd87327400cda5c18491" @@ -2851,12 +2937,12 @@ is-core-module@^2.2.0: dependencies: has "^1.0.3" -is-core-module@^2.8.1: - version "2.13.0" - resolved "https://registry.yarnpkg.com/is-core-module/-/is-core-module-2.13.0.tgz#bb52aa6e2cbd49a30c2ba68c42bf3435ba6072db" - integrity sha512-Z7dk6Qo8pOCp3l4tsX2C5ZVas4V+UxwQodwZhLopL91TX8UyyHEXafPcyoeeWuLrwzHcr3igO78wNLwHJHsMCQ== +is-date-object@^1.0.1: + version "1.0.5" + resolved "https://registry.yarnpkg.com/is-date-object/-/is-date-object-1.0.5.tgz#0841d5536e724c25597bf6ea62e1bd38298df31f" + integrity sha512-9YQaSxsAiSwcvS33MBk3wTCVnWK+HhF8VZR2jRxehM16QcVOdHqPn4VPHmRK4lSr38n9JriurInLcP90xsYNfQ== dependencies: - has "^1.0.3" + has-tostringtag "^1.0.0" is-docker@^2.0.0: version "2.2.1" @@ -2880,11 +2966,30 @@ is-glob@^4.0.0, is-glob@^4.0.1, is-glob@~4.0.1: dependencies: is-extglob "^2.1.1" +is-glob@^4.0.3: + version "4.0.3" + resolved "https://registry.yarnpkg.com/is-glob/-/is-glob-4.0.3.tgz#64f61e42cbbb2eec2071a9dac0b28ba1e65d5084" + integrity sha512-xelSayHH36ZgE7ZWhli7pW34hNbNl8Ojv5KVmkJD4hBdD3th8Tfk9vYasLM+mXWOZhFkgZfxhLSnrwRr4elSSg== + dependencies: + is-extglob "^2.1.1" + is-lambda@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-lambda/-/is-lambda-1.0.1.tgz#3d9877899e6a53efc0160504cde15f82e6f061d5" integrity sha512-z7CMFGNrENq5iFB9Bqo64Xk6Y9sg+epq1myIcdHaGnbMTYOxvzsEtdYqQUylB7LxfkvgrrjP32T6Ywciio9UIQ== +is-negative-zero@^2.0.2: + version "2.0.2" + resolved "https://registry.yarnpkg.com/is-negative-zero/-/is-negative-zero-2.0.2.tgz#7bf6f03a28003b8b3965de3ac26f664d765f3150" + integrity sha512-dqJvarLawXsFbNDeJW7zAz8ItJ9cd28YufuuFzh0G8pNHjJMnY08Dv7sYX2uF5UpQOwieAeOExEYAWWfu7ZZUA== + +is-number-object@^1.0.4: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-number-object/-/is-number-object-1.0.7.tgz#59d50ada4c45251784e9904f5246c742f07a42fc" + integrity sha512-k1U0IRzLMo7ZlYIfzRu23Oh6MiIFasgpb9X76eqfFZAqwH44UI4KTBvBYIZ1dSL9ZzChTB9ShHfLkR4pdW5krQ== + dependencies: + has-tostringtag "^1.0.0" + is-number@^7.0.0: version "7.0.0" resolved "https://registry.yarnpkg.com/is-number/-/is-number-7.0.0.tgz#7535345b896734d5f80c4d06c50955527a14f12b" @@ -2895,6 +3000,11 @@ is-obj@^2.0.0: resolved "https://registry.yarnpkg.com/is-obj/-/is-obj-2.0.0.tgz#473fb05d973705e3fd9620545018ca8e22ef4982" integrity sha512-drqDG3cbczxxEJRoOXcOjtdp1J/lyp1mNn0xaznRs8+muBhgQcrnbspox5X5fOw0HnMnbfDzvnEMEtqDEJEo8w== +is-path-inside@^3.0.3: + version "3.0.3" + resolved "https://registry.yarnpkg.com/is-path-inside/-/is-path-inside-3.0.3.tgz#d231362e53a07ff2b0e0ea7fed049161ffd16283" + integrity sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ== + is-plain-obj@^1.1.0: version "1.1.0" resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-1.1.0.tgz#71a50c8429dfca773c92a390a4a03b39fcd51d3e" @@ -2905,16 +3015,45 @@ is-plain-obj@^2.1.0: resolved "https://registry.yarnpkg.com/is-plain-obj/-/is-plain-obj-2.1.0.tgz#45e42e37fccf1f40da8e5f76ee21515840c09287" integrity sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA== +is-regex@^1.1.4: + version "1.1.4" + resolved "https://registry.yarnpkg.com/is-regex/-/is-regex-1.1.4.tgz#eef5663cd59fa4c0ae339505323df6854bb15958" + integrity sha512-kvRdxDsxZjhzUX07ZnLydzS1TU/TJlTUHHY4YLL87e37oUA49DfkLqgy+VjFocowy29cKvcSiu+kIv728jTTVg== + dependencies: + call-bind "^1.0.2" + has-tostringtag "^1.0.0" + is-retry-allowed@^1.1.0: version "1.2.0" resolved "https://registry.yarnpkg.com/is-retry-allowed/-/is-retry-allowed-1.2.0.tgz#d778488bd0a4666a3be8a1482b9f2baafedea8b4" integrity sha512-RUbUeKwvm3XG2VYamhJL1xFktgjvPzL0Hq8C+6yrWIswDy3BIXGqCxhxkc30N9jqK311gVU137K8Ei55/zVJRg== +is-shared-array-buffer@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-shared-array-buffer/-/is-shared-array-buffer-1.0.2.tgz#8f259c573b60b6a32d4058a1a07430c0a7344c79" + integrity sha512-sqN2UDu1/0y6uvXyStCOzyhAjCSlHceFoMKJW8W9EU9cvic/QdsZ0kEU93HEy3IUEFZIiH/3w+AH/UQbPHNdhA== + dependencies: + call-bind "^1.0.2" + is-stream@^2.0.0: version "2.0.1" resolved "https://registry.yarnpkg.com/is-stream/-/is-stream-2.0.1.tgz#fac1e3d53b97ad5a9d0ae9cef2389f5810a5c077" integrity sha512-hFoiJiTl63nn+kstHGBtewWSKnQLpyb155KHheA1l39uvtO9nWIop1p3udqPcUd/xbF1VLMO4n7OI6p7RbngDg== +is-string@^1.0.5, is-string@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/is-string/-/is-string-1.0.7.tgz#0dd12bf2006f255bb58f695110eff7491eebc0fd" + integrity sha512-tE2UXzivje6ofPW7l23cjDOMa09gb7xlAqG6jG5ej6uPV32TlWP3NKPigtaGeHNu9fohccRYvIiZMfOOnOYUtg== + dependencies: + has-tostringtag "^1.0.0" + +is-symbol@^1.0.2, is-symbol@^1.0.3: + version "1.0.4" + resolved "https://registry.yarnpkg.com/is-symbol/-/is-symbol-1.0.4.tgz#a6dac93b635b063ca6872236de88910a57af139c" + integrity sha512-C/CPBqKWnvdcxqIARxyOh4v1UUEOCHpgDa0WYgpKDFMszcrPcffg5uhwSgPCLD2WWxmq6isisz87tzT01tuGhg== + dependencies: + has-symbols "^1.0.2" + is-text-path@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/is-text-path/-/is-text-path-1.0.1.tgz#4e1aa0fb51bfbcb3e92688001397202c1775b66e" @@ -2922,11 +3061,25 @@ is-text-path@^1.0.1: dependencies: text-extensions "^1.0.0" +is-typed-array@^1.1.10, is-typed-array@^1.1.12, is-typed-array@^1.1.9: + version "1.1.12" + resolved "https://registry.yarnpkg.com/is-typed-array/-/is-typed-array-1.1.12.tgz#d0bab5686ef4a76f7a73097b95470ab199c57d4a" + integrity sha512-Z14TF2JNG8Lss5/HMqt0//T9JeHXttXy5pH/DBU4vi98ozO2btxzq9MwYDZYnKwU8nRsz/+GVFVRDq3DkVuSPg== + dependencies: + which-typed-array "^1.1.11" + is-unicode-supported@^0.1.0: version "0.1.0" resolved "https://registry.yarnpkg.com/is-unicode-supported/-/is-unicode-supported-0.1.0.tgz#3f26c76a809593b52bfa2ecb5710ed2779b522a7" integrity sha512-knxG2q4UC3u8stRGyAVJCOdxFmv5DZiRcdlIaAQXAbSfJya+OhopNotLQrstBhququ4ZpuKbDc/8S6mgXgPFPw== +is-weakref@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/is-weakref/-/is-weakref-1.0.2.tgz#9529f383a9338205e89765e0392efc2f100f06f2" + integrity sha512-qctsuLZmIQ0+vSSMfoVvyFe2+GSEvnmZ2ezTup1SBse9+twCCeial6EEi3Nc2KFcf6+qz2FBPnjXsk8xhKSaPQ== + dependencies: + call-bind "^1.0.2" + is-wsl@^2.2.0: version "2.2.0" resolved "https://registry.yarnpkg.com/is-wsl/-/is-wsl-2.2.0.tgz#74a4c76e77ca9fd3f932f290c17ea326cd157271" @@ -2939,6 +3092,11 @@ isarray@0.0.1: resolved "https://registry.yarnpkg.com/isarray/-/isarray-0.0.1.tgz#8a18acfca9a8f4177e09abfc6038939b05d1eedf" integrity sha1-ihis/Kmo9Bd+Cav8YDiTmwXR7t8= +isarray@^2.0.5: + version "2.0.5" + resolved "https://registry.yarnpkg.com/isarray/-/isarray-2.0.5.tgz#8af1e4c1221244cc62459faf38940d4e644a5723" + integrity sha512-xHjhDr3cNBK0BzdUJSPXZntQUx/mwMS5Rw4A7lPJ90XGAO6ISP/ePDNuo0vhqOZU+UD5JoodwCAAoZQd3FeAKw== + isexe@^2.0.0: version "2.0.0" resolved "https://registry.yarnpkg.com/isexe/-/isexe-2.0.0.tgz#e8fbf374dc556ff8947a10dcb0572d633f2cfa10" @@ -2983,14 +3141,14 @@ js-tokens@^4.0.0: resolved "https://registry.yarnpkg.com/js-tokens/-/js-tokens-4.0.0.tgz#19203fb59991df98e3a287050d4647cdeaf32499" integrity sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ== -js-yaml@4.1.0: +js-yaml@4.1.0, js-yaml@^4.1.0: version "4.1.0" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-4.1.0.tgz#c1fb65f8f5017901cdd2c951864ba18458a10602" integrity sha512-wpxZs9NoxZaJESJGIZTyDEaYpl0FKSA+FB9aJiyemKhMwkxQg63h4T1KJgUGHpTqPDNRcmmYLugrRjJlBtWvRA== dependencies: argparse "^2.0.1" -js-yaml@^3.13.1, js-yaml@^3.14.1: +js-yaml@^3.14.1: version "3.14.1" resolved "https://registry.yarnpkg.com/js-yaml/-/js-yaml-3.14.1.tgz#dae812fdb3825fa306609a8717383c50c36a0537" integrity sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g== @@ -2998,10 +3156,15 @@ js-yaml@^3.13.1, js-yaml@^3.14.1: argparse "^1.0.7" esprima "^4.0.0" -jsesc@^2.5.1: - version "2.5.2" - resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-2.5.2.tgz#80564d2e483dacf6e8ef209650a67df3f0c283a4" - integrity sha512-OYu7XEzjkCQ3C5Ps3QIZsQfNpqoJyZZA99wd9aWd05NCtC5pWOkShK2mkL6HXQR6/Cy2lbNdPlZBpuQHXE63gA== +jsesc@^3.0.2: + version "3.0.2" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-3.0.2.tgz#bb8b09a6597ba426425f2e4a07245c3d00b9343e" + integrity sha512-xKqzzWXDttJuOcawBt4KnKHHIf5oQ/Cxax+0PWFG+DFDgHNAdi+TXECADI+RYiFUMmx8792xsMbbgXj4CwnP4g== + +jsesc@~0.5.0: + version "0.5.0" + resolved "https://registry.yarnpkg.com/jsesc/-/jsesc-0.5.0.tgz#e7dee66e35d6fc16f710fe91d5cf69f70f08911d" + integrity sha512-uZz5UnB7u4T9LvwmFqXii7pZSouaRPorGs5who1Ip7VO0wxanFvBL7GkM6dTHlgX+jhBApRetaWpnDabOeTcnA== json-parse-better-errors@^1.0.1: version "1.0.2" @@ -3023,11 +3186,6 @@ json-schema-traverse@^0.4.1: resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-0.4.1.tgz#69f6a87d9513ab8bb8fe63bdb0979c448e684660" integrity sha512-xbbCH5dCYU5T8LcEhhuh7HJ88HXuW3qsI3Y0zOZFKfZEHcpWiHU/Jxzk629Brsab/mMiHQti9wMP+845RPe3Vg== -json-schema-traverse@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/json-schema-traverse/-/json-schema-traverse-1.0.0.tgz#ae7bcb3656ab77a73ba5c49bf654f38e6b6860e2" - integrity sha512-NM8/P9n3XjXhIZn1lLhkFaACTOURQXjWhV4BA/RnOv8xvgqtqpAX9IO4mRQxSx1Rlo4tqzeqb0sOlruaOy3dug== - json-stable-stringify-without-jsonify@^1.0.1: version "1.0.1" resolved "https://registry.yarnpkg.com/json-stable-stringify-without-jsonify/-/json-stable-stringify-without-jsonify-1.0.1.tgz#9db7b59496ad3f3cfef30a75142d2d930ad72651" @@ -3043,10 +3201,12 @@ json-stringify-safe@^5.0.1: resolved "https://registry.yarnpkg.com/json-stringify-safe/-/json-stringify-safe-5.0.1.tgz#1296a2d58fd45f19a0f6ce01d65701e2c735b6eb" integrity sha1-Epai1Y/UXxmg9s4B1lcB4sc1tus= -json5@^2.2.3: - version "2.2.3" - resolved "https://registry.yarnpkg.com/json5/-/json5-2.2.3.tgz#78cd6f1a19bdc12b73db5ad0c61efd66c1e29283" - integrity sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg== +json5@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/json5/-/json5-1.0.2.tgz#63d98d60f21b313b77c4d6da18bfa69d80e1d593" + integrity sha512-g1MWMLBiz8FKi1e4w0UyVL3w+iJceWAFBAaBnnGKOpNa5f8TLktkbre1+s6oICydWAm+HRUGTmI+//xv2hvXYA== + dependencies: + minimist "^1.2.0" jsonfile@^6.0.1: version "6.1.0" @@ -3243,11 +3403,6 @@ lodash.merge@^4.6.2: resolved "https://registry.yarnpkg.com/lodash.merge/-/lodash.merge-4.6.2.tgz#558aa53b43b661e1925a0afdfa36a9a1085fe57a" integrity sha512-0KpjqXRVvrYyCsX1swR/XTK0va6VQkQM6MNo7PqW77ByjAhoARA8EfrP1N4+KlKj8YS0ZUCtRT/YUuhyYDujIQ== -lodash.truncate@^4.4.2: - version "4.4.2" - resolved "https://registry.yarnpkg.com/lodash.truncate/-/lodash.truncate-4.4.2.tgz#5a350da0b1113b837ecfffd5812cbe58d6eae193" - integrity sha512-jttmRe7bRse52OsWIMDLaXxWqRAmtIUccAQ3garviCqJjafXOfNMO0yMfNpdD6zbGaTU0P5Nz7e7gAT6cKmJRw== - lodash@^4.17.13, lodash@^4.17.15, lodash@^4.17.19, lodash@^4.17.21, lodash@^4.17.4: version "4.17.21" resolved "https://registry.yarnpkg.com/lodash/-/lodash-4.17.21.tgz#679591c564c3bffaae8454cf0b3df370c3d6911c" @@ -3268,13 +3423,6 @@ loupe@^2.3.1: dependencies: get-func-name "^2.0.0" -lru-cache@^5.1.1: - version "5.1.1" - resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-5.1.1.tgz#1da27e6710271947695daf6848e847f01d84b920" - integrity sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w== - dependencies: - yallist "^3.0.2" - lru-cache@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/lru-cache/-/lru-cache-6.0.0.tgz#6d6fe6570ebd96aaf90fcad1dafa3b2566db3a94" @@ -3395,7 +3543,7 @@ minimatch@^3.0.4: dependencies: brace-expansion "^1.1.7" -minimatch@^3.1.1: +minimatch@^3.0.5, minimatch@^3.1.1, minimatch@^3.1.2: version "3.1.2" resolved "https://registry.yarnpkg.com/minimatch/-/minimatch-3.1.2.tgz#19cd194bfd3e428f049a70817c038d89ab4be35b" integrity sha512-J7p63hRiAjw1NDEww1W7i37+ByIrOWO5XQQAzZ3VOcL0PNybwpfmV/N05zFAzwQ9USyEcX6t3UO+K5aqBQOIHw== @@ -3418,6 +3566,11 @@ minimist-options@4.1.0: is-plain-obj "^1.1.0" kind-of "^6.0.3" +minimist@^1.2.0, minimist@^1.2.6: + version "1.2.8" + resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.8.tgz#c1a464e7693302e082a075cee0c057741ac4772c" + integrity sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA== + minimist@^1.2.3: version "1.2.7" resolved "https://registry.yarnpkg.com/minimist/-/minimist-1.2.7.tgz#daa1c4d91f507390437c6a8bc01078e7000c4d18" @@ -3537,16 +3690,11 @@ ms@2.1.2: resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.2.tgz#d09d1f357b443f493382a8eb3ccd183872ae6009" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== -ms@2.1.3, ms@^2.0.0, ms@^2.1.2: +ms@2.1.3, ms@^2.0.0, ms@^2.1.1, ms@^2.1.2: version "2.1.3" resolved "https://registry.yarnpkg.com/ms/-/ms-2.1.3.tgz#574c8138ce1d2b5861f0b44579dbadd60c6615b2" integrity sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA== -multimap@^1.1.0: - version "1.1.0" - resolved "https://registry.yarnpkg.com/multimap/-/multimap-1.1.0.tgz#5263febc085a1791c33b59bb3afc6a76a2a10ca8" - integrity sha512-0ZIR9PasPxGXmRsEF8jsDzndzHDj7tIav+JUmvIFB/WHswliFnquxECT/De7GR4yg99ky/NlRKJT82G1y271bw== - mute-stream@~1.0.0: version "1.0.0" resolved "https://registry.yarnpkg.com/mute-stream/-/mute-stream-1.0.0.tgz#e31bd9fe62f0aed23520aa4324ea6671531e013e" @@ -3625,11 +3773,6 @@ node-gyp@^9.0.0, node-gyp@^9.4.0: tar "^6.1.2" which "^2.0.2" -node-releases@^2.0.13: - version "2.0.13" - resolved "https://registry.yarnpkg.com/node-releases/-/node-releases-2.0.13.tgz#d5ed1627c23e3461e819b02e57b75e4899b1c81d" - integrity sha512-uYr7J37ae/ORWdZeQ1xxMJe3NtdmqMC/JZK+geofDrkLUApKRHPd18/TxtBOJ4A0/+uUIliorNrfYV6s1b02eQ== - nopt@^6.0.0: version "6.0.0" resolved "https://registry.yarnpkg.com/nopt/-/nopt-6.0.0.tgz#245801d8ebf409c6df22ab9d95b65e1309cdb16d" @@ -3857,11 +4000,59 @@ npmlog@^7.0.1: gauge "^5.0.0" set-blocking "^2.0.0" +object-inspect@^1.12.3, object-inspect@^1.9.0: + version "1.12.3" + resolved "https://registry.yarnpkg.com/object-inspect/-/object-inspect-1.12.3.tgz#ba62dffd67ee256c8c086dfae69e016cd1f198b9" + integrity sha512-geUvdk7c+eizMNUDkRpW1wJwgfOiOeHbxBR/hLXK1aT6zmVSO0jsQcs7fj6MGw89jC/cjGfLcNOrtMYtGqm81g== + +object-keys@^1.1.1: + version "1.1.1" + resolved "https://registry.yarnpkg.com/object-keys/-/object-keys-1.1.1.tgz#1c47f272df277f3b1daf061677d9c82e2322c60e" + integrity sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA== + object-treeify@^1.1.33: version "1.1.33" resolved "https://registry.yarnpkg.com/object-treeify/-/object-treeify-1.1.33.tgz#f06fece986830a3cba78ddd32d4c11d1f76cdf40" integrity sha512-EFVjAYfzWqWsBMRHPMAXLCDIJnpMhdWAqR7xG6M6a2cs6PMFpl/+Z20w9zDW4vkxOFfddegBKq9Rehd0bxWE7A== +object.assign@^4.1.4: + version "4.1.4" + resolved "https://registry.yarnpkg.com/object.assign/-/object.assign-4.1.4.tgz#9673c7c7c351ab8c4d0b516f4343ebf4dfb7799f" + integrity sha512-1mxKf0e58bvyjSCtKYY4sRe9itRk3PJpquJOjeIkz885CczcI4IvJJDLPS72oowuSh+pBxUFROpX+TU++hxhZQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.1.4" + has-symbols "^1.0.3" + object-keys "^1.1.1" + +object.fromentries@^2.0.6: + version "2.0.7" + resolved "https://registry.yarnpkg.com/object.fromentries/-/object.fromentries-2.0.7.tgz#71e95f441e9a0ea6baf682ecaaf37fa2a8d7e616" + integrity sha512-UPbPHML6sL8PI/mOqPwsH4G6iyXcCGzLin8KvEPenOZN5lpCNBZZQ+V62vdjB1mQHrmqGQt5/OJzemUA+KJmEA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +object.groupby@^1.0.0: + version "1.0.1" + resolved "https://registry.yarnpkg.com/object.groupby/-/object.groupby-1.0.1.tgz#d41d9f3c8d6c778d9cbac86b4ee9f5af103152ee" + integrity sha512-HqaQtqLnp/8Bn4GL16cj+CUYbnpe1bh0TtEaWvybszDG4tgxCJuRpV8VGuvNaI1fAnI4lUJzDG55MXcOH4JZcQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + get-intrinsic "^1.2.1" + +object.values@^1.1.6: + version "1.1.7" + resolved "https://registry.yarnpkg.com/object.values/-/object.values-1.1.7.tgz#617ed13272e7e1071b43973aa1655d9291b8442a" + integrity sha512-aU6xnDFYT3x17e/f0IiiwlGPTy2jzMySGfUB4fq6z7CV8l85CWHDk5ErhyhpfDHhrOMwGFhSQkhMGHaIotA6Ng== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + once@^1.3.0: version "1.4.0" resolved "https://registry.yarnpkg.com/once/-/once-1.4.0.tgz#583b1aa775961d4b113ac17d9c50baef9dd76bd1" @@ -3869,7 +4060,7 @@ once@^1.3.0: dependencies: wrappy "1" -optionator@^0.9.1: +optionator@^0.9.3: version "0.9.3" resolved "https://registry.yarnpkg.com/optionator/-/optionator-0.9.3.tgz#007397d44ed1872fdc6ed31360190f81814e2c64" integrity sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg== @@ -4007,7 +4198,7 @@ path-key@^3.0.0, path-key@^3.1.0: resolved "https://registry.yarnpkg.com/path-key/-/path-key-3.1.1.tgz#581f6ade658cbba65a0d3380de7753295054f375" integrity sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q== -path-parse@^1.0.6: +path-parse@^1.0.6, path-parse@^1.0.7: version "1.0.7" resolved "https://registry.yarnpkg.com/path-parse/-/path-parse-1.0.7.tgz#fbc114b60ca42b30d9daf5858e4bd68bbedb6735" integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== @@ -4037,11 +4228,6 @@ pathval@^1.1.1: resolved "https://registry.yarnpkg.com/pathval/-/pathval-1.1.1.tgz#8534e77a77ce7ac5a2512ea21e0fdb8fcf6c3d8d" integrity sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ== -picocolors@^1.0.0: - version "1.0.0" - resolved "https://registry.yarnpkg.com/picocolors/-/picocolors-1.0.0.tgz#cb5bdc74ff3f51892236eaf79d68bc44564ab81c" - integrity sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ== - picomatch@^2.0.4, picomatch@^2.2.1, picomatch@^2.2.3: version "2.3.0" resolved "https://registry.yarnpkg.com/picomatch/-/picomatch-2.3.0.tgz#f1f061de8f6a4bf022892e2d128234fb98302972" @@ -4101,11 +4287,6 @@ process@^0.11.10: resolved "https://registry.yarnpkg.com/process/-/process-0.11.10.tgz#7332300e840161bda3e69a1d1d91a7d4bc16f182" integrity sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A== -progress@^2.0.0: - version "2.0.3" - resolved "https://registry.yarnpkg.com/progress/-/progress-2.0.3.tgz#7e8cf8d8f5b8f239c1bc68beb4eb78567d572ef8" - integrity sha512-7PiHtLll5LdnKIMw100I+8xJXR5gW2QwWYkT6iJva0bXitZKa/XMrSbdmg3r2Xnaidz9Qumd0VPaMrZlF9V9sA== - promise-all-reject-late@^1.0.0: version "1.0.1" resolved "https://registry.yarnpkg.com/promise-all-reject-late/-/promise-all-reject-late-1.0.1.tgz#f8ebf13483e5ca91ad809ccc2fcf25f26f8643c2" @@ -4166,10 +4347,10 @@ quick-lru@^4.0.1: resolved "https://registry.yarnpkg.com/quick-lru/-/quick-lru-4.0.1.tgz#5b8878f113a58217848c6482026c73e1ba57727f" integrity sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g== -ramda@^0.27.1: - version "0.27.2" - resolved "https://registry.yarnpkg.com/ramda/-/ramda-0.27.2.tgz#84463226f7f36dc33592f6f4ed6374c48306c3f1" - integrity sha512-SbiLPU40JuJniHexQSAgad32hfwd+DRUdwF2PlVuI5RZD0/vahUco7R8vD86J/tcEKKF9vZrUVwgtmGCqlCKyA== +rambda@^7.1.0: + version "7.5.0" + resolved "https://registry.yarnpkg.com/rambda/-/rambda-7.5.0.tgz#1865044c59bc0b16f63026c6e5a97e4b1bbe98fe" + integrity sha512-y/M9weqWAH4iopRd7EHDEQQvpFPHj1AA3oHozE9tfITHUtTR7Z9PSlIRRG2l1GuW7sefC1cXFfIcF+cgnShdBA== randombytes@^2.1.0: version "2.1.0" @@ -4290,26 +4471,37 @@ redeyed@~2.1.0: dependencies: esprima "~4.0.0" -regexp-tree@^0.1.23, regexp-tree@~0.1.1: +regexp-tree@^0.1.27: version "0.1.27" resolved "https://registry.yarnpkg.com/regexp-tree/-/regexp-tree-0.1.27.tgz#2198f0ef54518ffa743fe74d983b56ffd631b6cd" integrity sha512-iETxpjK6YoRWJG5o6hXLwvjYAoW+FEZn9os0PD/b6AP6xQwsa/Y7lCVgIixBbUPMfhu+i2LtdeAqVTgGlQarfA== -regexpp@^3.0.0, regexpp@^3.1.0: +regexp.prototype.flags@^1.5.1: + version "1.5.1" + resolved "https://registry.yarnpkg.com/regexp.prototype.flags/-/regexp.prototype.flags-1.5.1.tgz#90ce989138db209f81492edd734183ce99f9677e" + integrity sha512-sy6TXMN+hnP/wMy+ISxg3krXx7BAtWVO4UouuCN/ziM9UEne0euamVNafDfvC83bRNr95y0V5iijeDQFUNpvrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + set-function-name "^2.0.0" + +regexpp@^3.0.0: version "3.2.0" resolved "https://registry.yarnpkg.com/regexpp/-/regexpp-3.2.0.tgz#0425a2768d8f23bad70ca4b90461fa2f1213e1b2" integrity sha512-pq2bWo9mVD43nbts2wGv17XLiNLya+GklZ8kaDLV2Z08gDCsGpnKn9BFMepvWuHCbyVvY7J5o5+BVvoQbmlJLg== +regjsparser@^0.10.0: + version "0.10.0" + resolved "https://registry.yarnpkg.com/regjsparser/-/regjsparser-0.10.0.tgz#b1ed26051736b436f22fdec1c8f72635f9f44892" + integrity sha512-qx+xQGZVsy55CH0a1hiVwHmqjLryfh7wQyF5HO07XJ9f7dQMY/gPQHhlyDkIzJKC+x2fUCpCcUODUUUFrm7SHA== + dependencies: + jsesc "~0.5.0" + require-directory@^2.1.1: version "2.1.1" resolved "https://registry.yarnpkg.com/require-directory/-/require-directory-2.1.1.tgz#8c64ad5fd30dab1c976e2344ffe7f792a6a6df42" integrity sha1-jGStX9MNqxyXbiNE/+f3kqam30I= -require-from-string@^2.0.2: - version "2.0.2" - resolved "https://registry.yarnpkg.com/require-from-string/-/require-from-string-2.0.2.tgz#89a7fdd938261267318eafe14f9c32e598c36909" - integrity sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw== - resolve-from@5.0.0, resolve-from@^5.0.0: version "5.0.0" resolved "https://registry.yarnpkg.com/resolve-from/-/resolve-from-5.0.0.tgz#c35225843df8f776df21c57557bc087e9dfdfc69" @@ -4327,6 +4519,11 @@ resolve-global@1.0.0, resolve-global@^1.0.0: dependencies: global-dirs "^0.1.1" +resolve-pkg-maps@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/resolve-pkg-maps/-/resolve-pkg-maps-1.0.0.tgz#616b3dc2c57056b5588c31cdf4b3d64db133720f" + integrity sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw== + resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0: version "1.20.0" resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.20.0.tgz#629a013fb3f70755d6f0b7935cc1c2c5378b1975" @@ -4335,6 +4532,15 @@ resolve@^1.1.6, resolve@^1.10.0, resolve@^1.10.1, resolve@^1.20.0: is-core-module "^2.2.0" path-parse "^1.0.6" +resolve@^1.22.4: + version "1.22.6" + resolved "https://registry.yarnpkg.com/resolve/-/resolve-1.22.6.tgz#dd209739eca3aef739c626fea1b4f3c506195362" + integrity sha512-njhxM7mV12JfufShqGy3Rz8j11RPdLy4xi15UurGJeoHLfJpVXKdh3ueuOqbYUcDZnffr6X739JBo5LzyahEsw== + dependencies: + is-core-module "^2.13.0" + path-parse "^1.0.7" + supports-preserve-symlinks-flag "^1.0.0" + retry@^0.12.0: version "0.12.0" resolved "https://registry.yarnpkg.com/retry/-/retry-0.12.0.tgz#1b42a6266a21f07421d1b0b54b7dc167b01c013b" @@ -4359,17 +4565,29 @@ run-parallel@^1.1.9: dependencies: queue-microtask "^1.2.2" +safe-array-concat@^1.0.1: + version "1.0.1" + resolved "https://registry.yarnpkg.com/safe-array-concat/-/safe-array-concat-1.0.1.tgz#91686a63ce3adbea14d61b14c99572a8ff84754c" + integrity sha512-6XbUAseYE2KtOuGueyeobCySj9L4+66Tn6KQMOPQJrAJEowYKW/YR/MGJZl7FdydUdaFu4LYyDZjxf4/Nmo23Q== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + has-symbols "^1.0.3" + isarray "^2.0.5" + safe-buffer@^5.0.1, safe-buffer@^5.1.0, safe-buffer@~5.2.0: version "5.2.1" resolved "https://registry.yarnpkg.com/safe-buffer/-/safe-buffer-5.2.1.tgz#1eaf9fa9bdb1fdd4ec75f58f9cdb4e6b7827eec6" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== -safe-regex@^2.1.1: - version "2.1.1" - resolved "https://registry.yarnpkg.com/safe-regex/-/safe-regex-2.1.1.tgz#f7128f00d056e2fe5c11e81a1324dd974aadced2" - integrity sha512-rx+x8AMzKb5Q5lQ95Zoi6ZbJqwCLkqi3XuJXp5P3rT8OEc6sZCJG5AE5dU3lsgRr/F4Bs31jSlVN+j5KrsGu9A== +safe-regex-test@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/safe-regex-test/-/safe-regex-test-1.0.0.tgz#793b874d524eb3640d1873aad03596db2d4f2295" + integrity sha512-JBUUzyOgEwXQY1NuPtvcj/qcBDbDmEvWufhlnXZIm75DEHp+afM1r1ujJpJsV/gSM4t59tpDyPi1sd6ZaPFfsA== dependencies: - regexp-tree "~0.1.1" + call-bind "^1.0.2" + get-intrinsic "^1.1.3" + is-regex "^1.1.4" "safer-buffer@>= 2.1.2 < 3.0.0": version "2.1.2" @@ -4398,7 +4616,7 @@ semver@^6.3.1: resolved "https://registry.yarnpkg.com/semver/-/semver-6.3.1.tgz#556d2ef8689146e46dcea4bfdd095f3434dffcb4" integrity sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA== -semver@^7.0.0, semver@^7.1.1, semver@^7.2.1, semver@^7.5.4: +semver@^7.0.0, semver@^7.1.1, semver@^7.5.4: version "7.5.4" resolved "https://registry.yarnpkg.com/semver/-/semver-7.5.4.tgz#483986ec4ed38e1c6c48c34894a9182dbff68a6e" integrity sha512-1bCSESV6Pv+i21Hvpxp3Dx+pSD8lIPt8uVjRrxAUt/nbswYc+tK6Y2btiULjd4+fnq15PX+nqQDC7Oft7WkwcA== @@ -4424,6 +4642,15 @@ set-blocking@^2.0.0: resolved "https://registry.yarnpkg.com/set-blocking/-/set-blocking-2.0.0.tgz#045f9782d011ae9a6803ddd382b24392b3d890f7" integrity sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw== +set-function-name@^2.0.0: + version "2.0.1" + resolved "https://registry.yarnpkg.com/set-function-name/-/set-function-name-2.0.1.tgz#12ce38b7954310b9f61faa12701620a0c882793a" + integrity sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA== + dependencies: + define-data-property "^1.0.1" + functions-have-names "^1.2.3" + has-property-descriptors "^1.0.0" + shebang-command@^1.2.0: version "1.2.0" resolved "https://registry.yarnpkg.com/shebang-command/-/shebang-command-1.2.0.tgz#44aac65b695b03398968c39f363fee5deafdf1ea" @@ -4465,6 +4692,15 @@ shx@^0.3.4: minimist "^1.2.3" shelljs "^0.8.5" +side-channel@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/side-channel/-/side-channel-1.0.4.tgz#efce5c8fdc104ee751b25c58d4290011fa5ea2cf" + integrity sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw== + dependencies: + call-bind "^1.0.0" + get-intrinsic "^1.0.2" + object-inspect "^1.9.0" + signal-exit@^3.0.7: version "3.0.7" resolved "https://registry.yarnpkg.com/signal-exit/-/signal-exit-3.0.7.tgz#a9a1767f8af84155114eaabd73f99273c8f59ad9" @@ -4605,6 +4841,33 @@ string-width@^5.0.1, string-width@^5.1.2: emoji-regex "^9.2.2" strip-ansi "^7.0.1" +string.prototype.trim@^1.2.8: + version "1.2.8" + resolved "https://registry.yarnpkg.com/string.prototype.trim/-/string.prototype.trim-1.2.8.tgz#f9ac6f8af4bd55ddfa8895e6aea92a96395393bd" + integrity sha512-lfjY4HcixfQXOfaqCvcBuOIapyaroTXhbkfJN3gcB1OtyupngWK4sEET9Knd0cXd28kTUqu/kHoV4HKSJdnjiQ== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimend@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimend/-/string.prototype.trimend-1.0.7.tgz#1bb3afc5008661d73e2dc015cd4853732d6c471e" + integrity sha512-Ni79DqeB72ZFq1uH/L6zJ+DKZTkOtPIHovb3YZHQViE+HDouuU4mBrLOLDn5Dde3RF8qw5qVETEjhu9locMLvA== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + +string.prototype.trimstart@^1.0.7: + version "1.0.7" + resolved "https://registry.yarnpkg.com/string.prototype.trimstart/-/string.prototype.trimstart-1.0.7.tgz#d4cdb44b83a4737ffbac2d406e405d43d0184298" + integrity sha512-NGhtDFu3jCEm7B4Fy0DpLewdJQOZcQ0rGbwQ/+stjnrp2i+rlKeCvos9hOIeCmqwratM47OBxY7uFZzjxHXmrg== + dependencies: + call-bind "^1.0.2" + define-properties "^1.2.0" + es-abstract "^1.22.1" + string_decoder@^1.1.1, string_decoder@^1.3.0: version "1.3.0" resolved "https://registry.yarnpkg.com/string_decoder/-/string_decoder-1.3.0.tgz#42f114594a46cf1a8e30b0a84f56c78c3edac21e" @@ -4645,7 +4908,7 @@ strip-indent@^3.0.0: dependencies: min-indent "^1.0.0" -strip-json-comments@3.1.1, strip-json-comments@^3.1.0, strip-json-comments@^3.1.1: +strip-json-comments@3.1.1, strip-json-comments@^3.1.1: version "3.1.1" resolved "https://registry.yarnpkg.com/strip-json-comments/-/strip-json-comments-3.1.1.tgz#31f1281b3832630434831c310c01cccda8cbe006" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== @@ -4684,16 +4947,15 @@ supports-hyperlinks@^2.0.0, supports-hyperlinks@^2.2.0: has-flag "^4.0.0" supports-color "^7.0.0" -table@^6.0.9: - version "6.8.1" - resolved "https://registry.yarnpkg.com/table/-/table-6.8.1.tgz#ea2b71359fe03b017a5fbc296204471158080bdf" - integrity sha512-Y4X9zqrCftUhMeH2EptSSERdVKt/nEdijTOacGD/97EKjhQ/Qs8RTlEGABSJNNN8lac9kheH+af7yAkEWlgneA== - dependencies: - ajv "^8.0.1" - lodash.truncate "^4.4.2" - slice-ansi "^4.0.0" - string-width "^4.2.3" - strip-ansi "^6.0.1" +supports-preserve-symlinks-flag@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/supports-preserve-symlinks-flag/-/supports-preserve-symlinks-flag-1.0.0.tgz#6eda4bd344a3c94aea376d4cc31bc77311039e09" + integrity sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w== + +tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.yarnpkg.com/tapable/-/tapable-2.2.1.tgz#1967a73ef4060a82f12ab96af86d52fdb76eeca0" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== tar@^6.1.11, tar@^6.1.13, tar@^6.1.15, tar@^6.1.2: version "6.1.15" @@ -4734,11 +4996,6 @@ tiny-relative-date@^1.3.0: resolved "https://registry.yarnpkg.com/tiny-relative-date/-/tiny-relative-date-1.3.0.tgz#fa08aad501ed730f31cc043181d995c39a935e07" integrity sha512-MOQHpzllWxDCHHaDno30hhLfbouoYlOI8YlMNtvKe1zXbjEVhbcEovQxvZrPvtiYW630GQDoMMarCnjfyfHA+A== -to-fast-properties@^2.0.0: - version "2.0.0" - resolved "https://registry.yarnpkg.com/to-fast-properties/-/to-fast-properties-2.0.0.tgz#dc5e698cbd079265bc73e0377681a4e4e83f616e" - integrity sha512-/OaKK0xYrs3DmxRYqL/yDc+FxFUVYhDlXMhRmv3z915w2HF1tnN1omB354j8VUGO/hbRzyD6Y3sA7v7GS/ceog== - to-regex-range@^5.0.1: version "5.0.1" resolved "https://registry.yarnpkg.com/to-regex-range/-/to-regex-range-5.0.1.tgz#1648c44aae7c8d988a326018ed72f5b4dd0392e4" @@ -4761,6 +5018,11 @@ trim-off-newlines@^1.0.0: resolved "https://registry.yarnpkg.com/trim-off-newlines/-/trim-off-newlines-1.0.1.tgz#9f9ba9d9efa8764c387698bcbfeb2c848f11adb3" integrity sha1-n5up2e+odkw4dpi8v+sshI8RrbM= +ts-api-utils@^1.0.1: + version "1.0.3" + resolved "https://registry.yarnpkg.com/ts-api-utils/-/ts-api-utils-1.0.3.tgz#f12c1c781d04427313dbac808f453f050e54a331" + integrity sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg== + ts-node@^10.9.1: version "10.9.1" resolved "https://registry.yarnpkg.com/ts-node/-/ts-node-10.9.1.tgz#e73de9102958af9e1f0b168a6ff320e25adcff4b" @@ -4780,6 +5042,16 @@ ts-node@^10.9.1: v8-compile-cache-lib "^3.0.1" yn "3.1.1" +tsconfig-paths@^3.14.2: + version "3.14.2" + resolved "https://registry.yarnpkg.com/tsconfig-paths/-/tsconfig-paths-3.14.2.tgz#6e32f1f79412decd261f92d633a9dc1cfa99f088" + integrity sha512-o/9iXgCYc5L/JxCHPe3Hvh8Q/2xm5Z+p18PESBU6Ff33695QnCHBEjcytY2q19ua7Mbl/DavtBOLq+oG0RCL+g== + dependencies: + "@types/json5" "^0.0.29" + json5 "^1.0.2" + minimist "^1.2.6" + strip-bom "^3.0.0" + tsd@^0.29.0: version "0.29.0" resolved "https://registry.yarnpkg.com/tsd/-/tsd-0.29.0.tgz#eed29647bf67ae77e4d686e9fdde5dd27bd1529f" @@ -4793,11 +5065,6 @@ tsd@^0.29.0: path-exists "^4.0.0" read-pkg-up "^7.0.0" -tslib@^1.8.1: - version "1.14.1" - resolved "https://registry.yarnpkg.com/tslib/-/tslib-1.14.1.tgz#cf2d38bdc34a134bcaf1091c41f6619e2f672d00" - integrity sha512-Xni35NKzjgMrwevysHTCArtLDpPvye8zV/0E4EyYn43P7/7qvQwPh9BGkHewbMulVntbigmcT7rdX3BNo9wRJg== - tslib@^2.5.0: version "2.5.0" resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.5.0.tgz#42bfed86f5787aeb41d031866c8f402429e0fddf" @@ -4808,13 +5075,6 @@ tslib@^2.6.2: resolved "https://registry.yarnpkg.com/tslib/-/tslib-2.6.2.tgz#703ac29425e7b37cd6fd456e92404d46d1f3e4ae" integrity sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q== -tsutils@^3.21.0: - version "3.21.0" - resolved "https://registry.yarnpkg.com/tsutils/-/tsutils-3.21.0.tgz#b48717d394cea6c1e096983eed58e9d61715b623" - integrity sha512-mHKK3iUXL+3UF6xL5k0PEhKRUBKPBCv/+RkEOpjRWxxx27KKRBmmA60A9pgOUvMi8GKhRMPEmjBRPzs2W7O1OA== - dependencies: - tslib "^1.8.1" - tuf-js@^1.1.7: version "1.1.7" resolved "https://registry.yarnpkg.com/tuf-js/-/tuf-js-1.1.7.tgz#21b7ae92a9373015be77dfe0cb282a80ec3bbe43" @@ -4873,11 +5133,60 @@ type-fest@^0.8.1: resolved "https://registry.yarnpkg.com/type-fest/-/type-fest-0.8.1.tgz#09e249ebde851d3b1e48d27c105444667f17b83d" integrity sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA== +typed-array-buffer@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-buffer/-/typed-array-buffer-1.0.0.tgz#18de3e7ed7974b0a729d3feecb94338d1472cd60" + integrity sha512-Y8KTSIglk9OZEr8zywiIHG/kmQ7KWyjseXs1CbSo8vC42w7hg2HgYTxSWwP0+is7bWDc1H+Fo026CpHFwm8tkw== + dependencies: + call-bind "^1.0.2" + get-intrinsic "^1.2.1" + is-typed-array "^1.1.10" + +typed-array-byte-length@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-length/-/typed-array-byte-length-1.0.0.tgz#d787a24a995711611fb2b87a4052799517b230d0" + integrity sha512-Or/+kvLxNpeQ9DtSydonMxCx+9ZXOswtwJn17SNLvhptaXYDJvkFFP5zbfU/uLmvnBJlI4yrnXRxpdWH/M5tNA== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-byte-offset@^1.0.0: + version "1.0.0" + resolved "https://registry.yarnpkg.com/typed-array-byte-offset/-/typed-array-byte-offset-1.0.0.tgz#cbbe89b51fdef9cd6aaf07ad4707340abbc4ea0b" + integrity sha512-RD97prjEt9EL8YgAgpOkf3O4IF9lhJFr9g0htQkm0rchFp/Vx7LW5Q8fSXXub7BXAODyUQohRMyOc3faCPd0hg== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + has-proto "^1.0.1" + is-typed-array "^1.1.10" + +typed-array-length@^1.0.4: + version "1.0.4" + resolved "https://registry.yarnpkg.com/typed-array-length/-/typed-array-length-1.0.4.tgz#89d83785e5c4098bec72e08b319651f0eac9c1bb" + integrity sha512-KjZypGq+I/H7HI5HlOoGHkWUUGq+Q0TPhQurLbyrVrvnKTBgzLhIJ7j6J/XTQOi0d1RjyZ0wdas8bKs2p0x3Ng== + dependencies: + call-bind "^1.0.2" + for-each "^0.3.3" + is-typed-array "^1.1.9" + typescript@^4.9.5: version "4.9.5" resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +unbox-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/unbox-primitive/-/unbox-primitive-1.0.2.tgz#29032021057d5e6cdbd08c5129c226dff8ed6f9e" + integrity sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw== + dependencies: + call-bind "^1.0.2" + has-bigints "^1.0.2" + has-symbols "^1.0.3" + which-boxed-primitive "^1.0.2" + unique-filename@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/unique-filename/-/unique-filename-3.0.0.tgz#48ba7a5a16849f5080d26c760c86cf5cf05770ea" @@ -4897,14 +5206,6 @@ universalify@^2.0.0: resolved "https://registry.yarnpkg.com/universalify/-/universalify-2.0.0.tgz#75a4984efedc4b08975c5aeb73f530d02df25717" integrity sha512-hAZsKq7Yy11Zu1DE0OzWjw7nnLZmJZYTDZZyEFHZdUhV8FkH5MCfoU1XMaxXovpyW5nq5scPqq0ZDP9Zyl04oQ== -update-browserslist-db@^1.0.11: - version "1.0.11" - resolved "https://registry.yarnpkg.com/update-browserslist-db/-/update-browserslist-db-1.0.11.tgz#9a2a641ad2907ae7b3616506f4b977851db5b940" - integrity sha512-dCwEFf0/oT85M1fHBg4F0jtLwJrutGoHSQXCh7u4o2t1drG+c0a9Flnqww6XUKSfQMPpJBRjU8d4RXB09qtvaA== - dependencies: - escalade "^3.1.1" - picocolors "^1.0.0" - uri-js@^4.2.2: version "4.4.1" resolved "https://registry.yarnpkg.com/uri-js/-/uri-js-4.4.1.tgz#9b1a52595225859e55f669d928f88c6c57f2a77e" @@ -4922,11 +5223,6 @@ v8-compile-cache-lib@^3.0.1: resolved "https://registry.yarnpkg.com/v8-compile-cache-lib/-/v8-compile-cache-lib-3.0.1.tgz#6336e8d71965cb3d35a1bbb7868445a7c05264bf" integrity sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg== -v8-compile-cache@^2.0.3: - version "2.4.0" - resolved "https://registry.yarnpkg.com/v8-compile-cache/-/v8-compile-cache-2.4.0.tgz#cdada8bec61e15865f05d097c5f4fd30e94dc128" - integrity sha512-ocyWc3bAHBB/guyqJQVI5o4BZkPhznPYUG2ea80Gond/BgNWpap8TOmLSeeQG7bnh2KMISxskdADG59j7zruhw== - validate-npm-package-license@^3.0.1, validate-npm-package-license@^3.0.4: version "3.0.4" resolved "https://registry.yarnpkg.com/validate-npm-package-license/-/validate-npm-package-license-3.0.4.tgz#fc91f6b9c7ba15c857f4cb2c5defeec39d4f410a" @@ -4954,6 +5250,28 @@ wcwidth@^1.0.0: dependencies: defaults "^1.0.3" +which-boxed-primitive@^1.0.2: + version "1.0.2" + resolved "https://registry.yarnpkg.com/which-boxed-primitive/-/which-boxed-primitive-1.0.2.tgz#13757bc89b209b049fe5d86430e21cf40a89a8e6" + integrity sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg== + dependencies: + is-bigint "^1.0.1" + is-boolean-object "^1.1.0" + is-number-object "^1.0.4" + is-string "^1.0.5" + is-symbol "^1.0.3" + +which-typed-array@^1.1.11: + version "1.1.11" + resolved "https://registry.yarnpkg.com/which-typed-array/-/which-typed-array-1.1.11.tgz#99d691f23c72aab6768680805a271b69761ed61a" + integrity sha512-qe9UWWpkeG5yzZ0tNYxDmd7vo58HDBc39mZ0xWWpolAGADdFOzkfamWLDxkOWcvHQKVmdTyQdLD4NOfjLWTKew== + dependencies: + available-typed-arrays "^1.0.5" + call-bind "^1.0.2" + for-each "^0.3.3" + gopd "^1.0.1" + has-tostringtag "^1.0.0" + which@^1.2.9: version "1.3.1" resolved "https://registry.yarnpkg.com/which/-/which-1.3.1.tgz#a45043d54f5805316da8d62f9f50918d3da70b0a" @@ -5035,11 +5353,6 @@ y18n@^5.0.5: resolved "https://registry.yarnpkg.com/y18n/-/y18n-5.0.8.tgz#7f4934d0f7ca8c56f95314939ddcd2dd91ce1d55" integrity sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA== -yallist@^3.0.2: - version "3.1.1" - resolved "https://registry.yarnpkg.com/yallist/-/yallist-3.1.1.tgz#dbb7daf9bfd8bac9ab45ebf602b8cbad0d5d08fd" - integrity sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g== - yallist@^4.0.0: version "4.0.0" resolved "https://registry.yarnpkg.com/yallist/-/yallist-4.0.0.tgz#9bb92790d9c0effec63be73519e11a35019a3a72" From adb09d07934bbff62fcd48ef23dbb8c9cc17c7fc Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 20 Sep 2023 14:10:36 -0600 Subject: [PATCH 2/6] chore: clean up --- .github/workflows/create-github-release.yml | 1 + test/integration/esm-cjs.ts | 1 - yarn.lock | 8 ++++---- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/create-github-release.yml b/.github/workflows/create-github-release.yml index afe0cc289..4dfce7f21 100644 --- a/.github/workflows/create-github-release.yml +++ b/.github/workflows/create-github-release.yml @@ -24,6 +24,7 @@ jobs: # However, if this is a manual release (workflow_dispatch), then we want to disable skip-on-empty # This helps recover from forgetting to add semantic commits ('fix:', 'feat:', etc.) skip-on-empty: ${{ github.event_name == 'push' }} + generate-readme: false # docs: # # Most repos won't use this # # Depends on the 'release' job to avoid git collisions, not for any functionality reason diff --git a/test/integration/esm-cjs.ts b/test/integration/esm-cjs.ts index 082d04ed3..9fef4b7c4 100644 --- a/test/integration/esm-cjs.ts +++ b/test/integration/esm-cjs.ts @@ -1,4 +1,3 @@ -/* eslint-disable complexity */ /** * These integration tests do not use mocha because we encountered an issue with * spawning child processes for testing root ESM plugins with linked ESM plugins. diff --git a/yarn.lock b/yarn.lock index 12ad48a03..9cf3b9d54 100644 --- a/yarn.lock +++ b/yarn.lock @@ -2277,9 +2277,9 @@ exponential-backoff@^3.1.1: integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== fancy-test@^2.0.16: - version "2.0.18" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.18.tgz#36f938a7207c90b2bf2f85b9c7d0cb6de8444635" - integrity sha512-wA9xzWMJ4L51Jcr9k06koPwi58bbUkTZrqqNYd6z7DHky1jW+D5jc/q86zPmkVdnjOrCg91VOeEzyOjTLIlD8A== + version "2.0.42" + resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.42.tgz#464cf51037a4ff3111d1ca34305a3125df198bc5" + integrity sha512-TX8YTALYAmExny+f+G24MFxWry3Pk09+9uykwRjfwjibRxJ9ZjJzrnHYVBZK46XQdyli7d+rQc5U/KK7V6uLsw== dependencies: "@types/chai" "*" "@types/lodash" "*" @@ -2287,7 +2287,7 @@ fancy-test@^2.0.16: "@types/sinon" "*" lodash "^4.17.13" mock-stdin "^1.0.0" - nock "^13.3.0" + nock "^13.3.3" stdout-stderr "^0.1.9" fancy-test@^2.0.34: From 2b2d8010e80d473cbe62e6dd8465d1381bfed9a7 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 20 Sep 2023 16:15:04 -0600 Subject: [PATCH 3/6] chore: tests and linting --- .eslintrc.json | 9 +--- package.json | 4 +- src/cli-ux/action/spinner.ts | 6 +-- src/cli-ux/index.ts | 2 +- src/cli-ux/prompt.ts | 2 +- src/cli-ux/styled/json.ts | 2 +- src/cli-ux/styled/object.ts | 2 +- src/cli-ux/styled/table.ts | 9 ++-- src/command.ts | 2 +- src/config/config.ts | 8 +-- src/config/plugin-loader.ts | 6 +-- src/config/plugin.ts | 9 ++-- src/config/ts-node.ts | 6 +-- src/config/util.ts | 16 ------ src/errors/errors/cli.ts | 12 ++--- src/errors/errors/pretty-print.ts | 8 +-- src/errors/handle.ts | 21 ++++++-- src/help/command.ts | 4 +- src/help/formatter.ts | 14 +++-- src/interfaces/config.ts | 2 +- src/parser/errors.ts | 2 +- src/parser/help.ts | 4 +- src/util.ts | 50 +++++++++++++++++- test/command/main-esm.test.ts | 1 - test/command/main.test.ts | 7 ++- test/config/config.flexible.test.ts | 8 ++- test/config/config.test.ts | 16 +++--- test/config/ts-node.test.ts | 13 ++--- test/errors/handle.test.ts | 81 ++++++++--------------------- test/errors/warn.test.ts | 1 - test/integration/esm-cjs.ts | 16 +++--- test/integration/util.ts | 2 +- tsconfig.json | 2 +- yarn.lock | 78 ++++++++++++++++++++++----- 34 files changed, 233 insertions(+), 192 deletions(-) diff --git a/.eslintrc.json b/.eslintrc.json index c8d00b297..42c374cbe 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -6,14 +6,7 @@ "rules": { "sort-imports": "error", "unicorn/prefer-module": "off", - "unicorn/import-style": [ - "error", - { - "styles": { - "chalk": false - } - } - ], + "unicorn/import-style": "error", "unicorn/no-array-reduce": "off", "unicorn/prefer-array-some": "off", "no-useless-constructor": "off", diff --git a/package.json b/package.json index e300dadc3..c3867d28d 100644 --- a/package.json +++ b/package.json @@ -64,7 +64,7 @@ "eslint": "^8.49.0", "eslint-config-oclif": "^5.0.0", "eslint-config-oclif-typescript": "^2.0.1", - "fancy-test": "^2.0.16", + "fancy-test": "^3.0.0-beta.2", "globby": "^11.1.0", "husky": "6", "mocha": "^10.2.0", @@ -72,7 +72,7 @@ "shx": "^0.3.4", "sinon": "^11.1.2", "tsd": "^0.29.0", - "typescript": "^4.9.5" + "typescript": "^5" }, "engines": { "node": ">=18.0.0" diff --git a/src/cli-ux/action/spinner.ts b/src/cli-ux/action/spinner.ts index 4d48143b4..4965c54f2 100644 --- a/src/cli-ux/action/spinner.ts +++ b/src/cli-ux/action/spinner.ts @@ -1,10 +1,10 @@ -import * as chalk from 'chalk' import * as supportsColor from 'supports-color' -const stripAnsi = require('strip-ansi') -const ansiStyles = require('ansi-styles') import {ActionBase, ActionType} from './base' +import ansiStyles from 'ansi-styles' +import chalk from 'chalk' import {errtermwidth} from '../../screen' import spinners from './spinners' +import stripAnsi from 'strip-ansi' function color(s: string): string { if (!supportsColor) return s diff --git a/src/cli-ux/index.ts b/src/cli-ux/index.ts index 4f6c907c4..1b7811f7a 100644 --- a/src/cli-ux/index.ts +++ b/src/cli-ux/index.ts @@ -1,11 +1,11 @@ import * as Errors from '../errors' -import * as chalk from 'chalk' import * as styled from './styled' import * as uxPrompt from './prompt' import {Config, config} from './config' import {ActionBase} from './action/base' import {flush as _flush} from './flush' +import chalk from 'chalk' import {stdout} from './stream' import {format as utilFormat} from 'node:util' import uxWait from './wait' diff --git a/src/cli-ux/prompt.ts b/src/cli-ux/prompt.ts index 54d1149e9..9af137f84 100644 --- a/src/cli-ux/prompt.ts +++ b/src/cli-ux/prompt.ts @@ -1,5 +1,5 @@ import * as Errors from '../errors' -import * as chalk from 'chalk' +import chalk from 'chalk' import {config} from './config' import {stderr} from './stream' diff --git a/src/cli-ux/styled/json.ts b/src/cli-ux/styled/json.ts index 6da73b23c..c7db532d0 100644 --- a/src/cli-ux/styled/json.ts +++ b/src/cli-ux/styled/json.ts @@ -1,4 +1,4 @@ -import * as chalk from 'chalk' +import chalk from 'chalk' import {ux} from '../../index' diff --git a/src/cli-ux/styled/object.ts b/src/cli-ux/styled/object.ts index 5da422e7b..96345c016 100644 --- a/src/cli-ux/styled/object.ts +++ b/src/cli-ux/styled/object.ts @@ -1,4 +1,4 @@ -import * as chalk from 'chalk' +import chalk from 'chalk' import {inspect} from 'node:util' export default function styledObject(obj: any, keys?: string[]): string { diff --git a/src/cli-ux/styled/table.ts b/src/cli-ux/styled/table.ts index e4dee355a..a3beb6dce 100644 --- a/src/cli-ux/styled/table.ts +++ b/src/cli-ux/styled/table.ts @@ -1,15 +1,14 @@ import * as F from '../../flags' import * as Interfaces from '../../interfaces' -import * as chalk from 'chalk' import {capitalize, sumBy} from '../../util' +import chalk from 'chalk' import {inspect} from 'node:util' +import {orderBy} from 'natural-orderby' import {safeDump} from 'js-yaml' +import sliceAnsi from 'slice-ansi' import {stdout} from '../stream' import {stdtermwidth} from '../../screen' - -const sw = require('string-width') -const {orderBy} = require('natural-orderby') -const sliceAnsi = require('slice-ansi') +import sw from 'string-width' class Table> { options: table.Options & { printLine(s: any): any } diff --git a/src/command.ts b/src/command.ts index 5164a3bdd..7a54e2136 100644 --- a/src/command.ts +++ b/src/command.ts @@ -1,7 +1,6 @@ import * as Errors from './errors' import * as Parser from './parser' -import * as chalk from 'chalk' import { ArgInput, ArgOutput, @@ -27,6 +26,7 @@ import {PJSON} from './interfaces' import {Plugin} from './interfaces/plugin' import {PrettyPrintableError} from './errors' import {boolean} from './flags' +import chalk from 'chalk' import {fileURLToPath} from 'node:url' import {ux} from './cli-ux' diff --git a/src/config/config.ts b/src/config/config.ts index d62fd6d8a..1bb323da2 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -6,8 +6,8 @@ import {Debug, collectUsableIds, getCommandIdPermutations} from './util' import {Hook, Hooks, PJSON, Topic} from '../interfaces' import {Plugin as IPlugin, Options} from '../interfaces/plugin' import {URL, fileURLToPath} from 'node:url' -import {arch, homedir, userInfo as osUserInfo, platform, release, tmpdir, type} from 'node:os' -import {compact, ensureArgObject, isProd, requireJson} from '../util' +import {arch, userInfo as osUserInfo, release, tmpdir, type} from 'node:os' +import {compact, ensureArgObject, getHomeDir, getPlatform, isProd, requireJson} from '../util' import {join, sep} from 'node:path' import {Command} from '../command' @@ -171,7 +171,7 @@ export class Config implements IConfig { this.valid = Config._rootPlugin.valid this.arch = (arch() === 'ia32' ? 'x86' : arch() as any) - this.platform = WSL ? 'wsl' : platform() as any + this.platform = WSL ? 'wsl' : getPlatform() this.windows = this.platform === 'win32' this.bin = this.pjson.oclif.bin || this.name this.binAliases = this.pjson.oclif.binAliases @@ -185,7 +185,7 @@ export class Config implements IConfig { this.shell = this._shell() this.debug = this._debug() - this.home = process.env.HOME || (this.windows && this.windowsHome()) || homedir() || tmpdir() + this.home = process.env.HOME || (this.windows && this.windowsHome()) || getHomeDir() || tmpdir() this.cacheDir = this.scopedEnvVar('CACHE_DIR') || this.macosCacheDir() || this.dir('cache') this.configDir = this.scopedEnvVar('CONFIG_DIR') || this.dir('config') this.dataDir = this.scopedEnvVar('DATA_DIR') || this.dir('data') diff --git a/src/config/plugin-loader.ts b/src/config/plugin-loader.ts index 79183d3dd..ba9807da1 100644 --- a/src/config/plugin-loader.ts +++ b/src/config/plugin-loader.ts @@ -1,9 +1,9 @@ import * as Plugin from './plugin' -import {Debug, loadJSON} from './util' import {Plugin as IPlugin, Options} from '../interfaces/plugin' +import {isProd, readJson} from '../util' +import {Debug} from './util' import {PJSON} from '../interfaces' import Performance from '../performance' -import {isProd} from '../util' import {join} from 'node:path' // eslint-disable-next-line new-cap @@ -94,7 +94,7 @@ export default class PluginLoader { try { const userPJSONPath = join(opts.dataDir, 'package.json') debug('reading user plugins pjson %s', userPJSONPath) - const pjson = await loadJSON(userPJSONPath) + const pjson = await readJson(userPJSONPath) if (!pjson.oclif) pjson.oclif = {schema: 1} if (!pjson.oclif.plugins) pjson.oclif.plugins = [] await this.loadPlugins(userPJSONPath, 'user', pjson.oclif.plugins.filter((p: any) => p.type === 'user')) diff --git a/src/config/plugin.ts b/src/config/plugin.ts index 71d86eaab..91a333a27 100644 --- a/src/config/plugin.ts +++ b/src/config/plugin.ts @@ -3,12 +3,11 @@ import { Debug, flatMap, getCommandIdPermutations, - loadJSON, mapValues, resolvePackage, } from './util' import {Plugin as IPlugin, PluginOptions} from '../interfaces/plugin' -import {compact, exists, isProd, requireJson} from '../util' +import {compact, exists, isProd, readJson, requireJson} from '../util' import {dirname, join, parse, relative, sep} from 'node:path' import {loadWithData, loadWithDataFromManifest} from '../module-loader' import {Command} from '../command' @@ -74,7 +73,7 @@ async function findRootLegacy(name: string | undefined, root: string): Promise(join(next, 'package.json')) + const pkg = await readJson(join(next, 'package.json')) if (pkg.name === name) return next } catch {} } else { @@ -164,7 +163,7 @@ export class Plugin implements IPlugin { if (!root) throw new CLIError(`could not find package.json with ${inspect(this.options)}`) this.root = root this._debug('reading %s plugin %s', this.type, root) - this.pjson = await loadJSON(join(root, 'package.json')) + this.pjson = await readJson(join(root, 'package.json')) this.flexibleTaxonomy = this.options?.flexibleTaxonomy || this.pjson.oclif?.flexibleTaxonomy || false this.moduleType = this.pjson.type === 'module' ? 'module' : 'commonjs' this.name = this.pjson.name @@ -274,7 +273,7 @@ export class Plugin implements IPlugin { const readManifest = async (dotfile = false): Promise => { try { const p = join(this.root, `${dotfile ? '.' : ''}oclif.manifest.json`) - const manifest = await loadJSON(p) + const manifest = await readJson(p) if (!process.env.OCLIF_NEXT_VERSION && manifest.version.split('-')[0] !== this.version.split('-')[0]) { process.emitWarning(`Mismatched version in ${this.name} plugin manifest. Expected: ${this.version} Received: ${manifest.version}\nThis usually means you have an oclif.manifest.json file that should be deleted in development. This file should be automatically generated when publishing.`) } else { diff --git a/src/config/ts-node.ts b/src/config/ts-node.ts index fd27bc33f..67093f80e 100644 --- a/src/config/ts-node.ts +++ b/src/config/ts-node.ts @@ -1,10 +1,10 @@ import * as TSNode from 'ts-node' import {Plugin, TSConfig} from '../interfaces' -import {existsSync, readFileSync} from 'node:fs' +import {isProd, readJsonSync} from '../util' import {join, relative as pathRelative} from 'node:path' import {Config} from './config' import {Debug} from './util' -import {isProd} from '../util' +import {existsSync} from 'node:fs' import {memoizedWarn} from '../errors' import {settings} from '../settings' @@ -29,7 +29,7 @@ function loadTSConfig(root: string): TSConfig | undefined { if (existsSync(tsconfigPath) && typescript) { const tsconfig = typescript.parseConfigFileTextToJson( tsconfigPath, - readFileSync(tsconfigPath, 'utf8'), + readJsonSync(tsconfigPath, false), ).config if (!tsconfig || !tsconfig.compilerOptions) { throw new Error( diff --git a/src/config/util.ts b/src/config/util.ts index 4e5df77be..182b336a5 100644 --- a/src/config/util.ts +++ b/src/config/util.ts @@ -1,5 +1,3 @@ -import {readFile} from 'node:fs' - const debug = require('debug') export function flatMap(arr: T[], fn: (i: T) => U[]): U[] { @@ -18,20 +16,6 @@ export function resolvePackage(id: string, paths: { paths: string[] }): string { return require.resolve(id, paths) } -export function loadJSON(path: string): Promise { - debug('config')('loadJSON %s', path) - return new Promise((resolve, reject) => { - readFile(path, 'utf8', (err: any, d: any) => { - try { - if (err) reject(err) - else resolve(JSON.parse(d) as T) - } catch (error: any) { - reject(error) - } - }) - }) -} - function displayWarnings() { if (process.listenerCount('warning') > 1) return process.on('warning', (warning: any) => { diff --git a/src/errors/errors/cli.ts b/src/errors/errors/cli.ts index 8e82e72b8..b4aa7e869 100644 --- a/src/errors/errors/cli.ts +++ b/src/errors/errors/cli.ts @@ -1,10 +1,10 @@ -import * as chalk from 'chalk' -import * as cs from 'clean-stack' -import * as indent from 'indent-string' -import * as screen from '../../screen' -import * as wrap from 'wrap-ansi' import {OclifError, PrettyPrintableError} from '../../interfaces/errors' +import chalk from 'chalk' import {config} from '../config' +import cs from 'clean-stack' +import {errtermwidth} from '../../screen' +import indent from 'indent-string' +import wrap from 'wrap-ansi' /** * properties specific to internal oclif error handling @@ -46,7 +46,7 @@ export class CLIError extends Error implements OclifError { } let output = `${this.name}: ${this.message}` - output = wrap(output, screen.errtermwidth - 6, {trim: false, hard: true} as any) + output = wrap(output, errtermwidth - 6, {trim: false, hard: true} as any) output = indent(output, 3) output = indent(output, 1, {indent: this.bang, includeEmptyLines: true} as any) output = indent(output, 1) diff --git a/src/errors/errors/pretty-print.ts b/src/errors/errors/pretty-print.ts index 455a92749..3067501db 100644 --- a/src/errors/errors/pretty-print.ts +++ b/src/errors/errors/pretty-print.ts @@ -1,8 +1,8 @@ -import * as screen from '../../screen' -import * as wrap from 'wrap-ansi' -import indent = require('indent-string') import {PrettyPrintableError} from '../../interfaces/errors' import {config} from '../config' +import {errtermwidth} from '../../screen' +import indent from 'indent-string' +import wrap from 'wrap-ansi' // These exist for backwards compatibility with CLIError type CLIErrorDisplayOptions = { name?: string; bang?: string } @@ -47,7 +47,7 @@ export default function prettyPrint(error: Error & PrettyPrintableError & CLIErr .filter(Boolean) .join('\n') - let output = wrap(formatted, screen.errtermwidth - 6, {trim: false, hard: true} as any) + let output = wrap(formatted, errtermwidth - 6, {trim: false, hard: true} as any) output = indent(output, 3) output = indent(output, 1, {indent: bang || '', includeEmptyLines: true} as any) output = indent(output, 1) diff --git a/src/errors/handle.ts b/src/errors/handle.ts index 8147101ce..b24c3fa0e 100644 --- a/src/errors/handle.ts +++ b/src/errors/handle.ts @@ -3,14 +3,25 @@ import {OclifError, PrettyPrintableError} from '../interfaces' import {CLIError} from './errors/cli' import {ExitError} from '.' +import clean from 'clean-stack' import {config} from './config' import prettyPrint from './errors/pretty-print' -import clean = require('clean-stack') + +/** + * This is an odd abstraction for process.exit, but it allows us to stub it in tests. + * + * https://github.com/sinonjs/sinon/issues/562 + */ +export const Exit = { + exit(code = 0) { + process.exit(code) + }, +} export async function handle(err: Error & Partial & Partial & {skipOclifErrorHandling?: boolean}): Promise { try { if (!err) err = new CLIError('no error?') - if (err.message === 'SIGINT') process.exit(1) + if (err.message === 'SIGINT') Exit.exit(1) const shouldPrint = !(err instanceof ExitError) && !err.skipOclifErrorHandling const pretty = prettyPrint(err) @@ -28,12 +39,12 @@ export async function handle(err: Error & Partial & Partia } await config.errorLogger.flush() - .then(() => process.exit(exitCode)) + .then(() => Exit.exit(exitCode)) .catch(console.error) - } else process.exit(exitCode) + } else Exit.exit(exitCode) } catch (error: any) { console.error(err.stack) console.error(error.stack) - process.exit(1) + Exit.exit(1) } } diff --git a/src/help/command.ts b/src/help/command.ts index 7fd9524be..7faae8825 100644 --- a/src/help/command.ts +++ b/src/help/command.ts @@ -1,10 +1,10 @@ import * as Interfaces from '../interfaces' -import * as chalk from 'chalk' -import stripAnsi = require('strip-ansi') import {HelpFormatter, HelpSection, HelpSectionRenderer} from './formatter' import {castArray, compact, ensureArgObject, sortBy} from '../util' import {Command} from '../command' import {DocOpts} from './docopts' +import chalk from 'chalk' +import stripAnsi from 'strip-ansi' // Don't use os.EOL because we need to ensure that a string // written on any platform, that may use \r\n or \n, will be diff --git a/src/help/formatter.ts b/src/help/formatter.ts index 2b4b1e6a7..ad039f851 100644 --- a/src/help/formatter.ts +++ b/src/help/formatter.ts @@ -1,15 +1,13 @@ import * as Interfaces from '../interfaces' -import * as chalk from 'chalk' -import indent = require('indent-string') -import stripAnsi = require('strip-ansi') import {Command} from '../command' +import chalk from 'chalk' +import indent from 'indent-string' import {stdtermwidth} from '../screen' +import stripAnsi from 'strip-ansi' import {template} from './util' - -const width = require('string-width') -const widestLine = require('widest-line') - -const wrap = require('wrap-ansi') +import widestLine from 'widest-line' +import width from 'string-width' +import wrap from 'wrap-ansi' export type HelpSectionKeyValueTable = {name: string; description: string}[] export type HelpSection = {header: string; body: string | HelpSectionKeyValueTable | [string, string | undefined][] | undefined} | undefined; diff --git a/src/interfaces/config.ts b/src/interfaces/config.ts index 6c40b904e..df7eebb5e 100644 --- a/src/interfaces/config.ts +++ b/src/interfaces/config.ts @@ -5,7 +5,7 @@ import {PJSON} from './pjson' import {Topic} from './topic' export type LoadOptions = Options | string | Config | undefined -export type PlatformTypes = 'darwin' | 'linux' | 'win32' | 'aix' | 'freebsd' | 'openbsd' | 'sunos' | 'wsl' +export type PlatformTypes = NodeJS.Platform | 'wsl' export type ArchTypes = 'arm' | 'arm64' | 'mips' | 'mipsel' | 'ppc' | 'ppc64' | 's390' | 's390x' | 'x32' | 'x64' | 'x86' export type PluginVersionDetail = { diff --git a/src/parser/errors.ts b/src/parser/errors.ts index ce4deca06..499120dbf 100644 --- a/src/parser/errors.ts +++ b/src/parser/errors.ts @@ -1,7 +1,7 @@ -import * as chalk from 'chalk' import {Arg, ArgInput, CLIParseErrorOptions} from '../interfaces/parser' import {Flag, OptionFlag} from '../interfaces' import {CLIError} from '../errors' +import chalk from 'chalk' import {flagUsages} from './help' import {renderList} from '../cli-ux/list' import {uniq} from '../util' diff --git a/src/parser/help.ts b/src/parser/help.ts index f94dafa7d..7b6bfd396 100644 --- a/src/parser/help.ts +++ b/src/parser/help.ts @@ -1,5 +1,5 @@ import {Flag, FlagUsageOptions} from '../interfaces/parser' -import {dim} from 'chalk' +import chalk from 'chalk' import {sortBy} from '../util' export function flagUsage(flag: Flag, options: FlagUsageOptions = {}): [string, string | undefined] { @@ -16,7 +16,7 @@ export function flagUsage(flag: Flag, options: FlagUsageOptions = {}): [str let description: string | undefined = flag.summary || flag.description || '' if (options.displayRequired && flag.required) description = `(required) ${description}` - description = description ? dim(description) : undefined + description = description ? chalk.dim(description) : undefined return [` ${label.join(',').trim()}${usage}`, description] as [string, string | undefined] } diff --git a/src/util.ts b/src/util.ts index ccd8ad9f9..a5c0eab5b 100644 --- a/src/util.ts +++ b/src/util.ts @@ -1,8 +1,11 @@ import {access, stat} from 'node:fs/promises' +import {homedir, platform} from 'node:os' +import {readFile, readFileSync} from 'node:fs' import {ArgInput} from './interfaces/parser' import {Command} from './command' import {join} from 'node:path' -import {readFileSync} from 'node:fs' + +const debug = require('debug') export function pickBy>(obj: T, fn: (i: T[keyof T]) => boolean): Partial { return Object.entries(obj) @@ -141,3 +144,48 @@ export function ensureArgObject(args?: any[] | ArgInput | { [name: string]: Comm export function uniq(arr: T[]): T[] { return [...new Set(arr)].sort() } + +/** + * Call os.homedir() and return the result + * + * Wrapping this allows us to stub these in tests since os.homedir() is + * non-configurable and non-writable. + * + * @returns The user's home directory + */ +export function getHomeDir(): string { + return homedir() +} + +/** + * Call os.platform() and return the result + * + * Wrapping this allows us to stub these in tests since os.platform() is + * non-configurable and non-writable. + * + * @returns The process' platform + */ +export function getPlatform(): NodeJS.Platform { + return platform() +} + +export function readJson(path: string): Promise { + debug('config')('readJson %s', path) + return new Promise((resolve, reject) => { + readFile(path, 'utf8', (err: any, d: any) => { + try { + if (err) reject(err) + else resolve(JSON.parse(d) as T) + } catch (error: any) { + reject(error) + } + }) + }) +} + +export function readJsonSync(path: string, parse: false): string +export function readJsonSync(path: string, parse?: true): T +export function readJsonSync(path: string, parse = true): T | string { + const contents = readFileSync(path, 'utf8') + return parse ? JSON.parse(contents) as T : contents +} diff --git a/test/command/main-esm.test.ts b/test/command/main-esm.test.ts index 6975dc9a6..cfaef694f 100644 --- a/test/command/main-esm.test.ts +++ b/test/command/main-esm.test.ts @@ -16,7 +16,6 @@ root = convertToFileURL(root) describe('main-esm', () => { fancy .stdout() - .skip() // skip until oclif/test is on v3 .do(() => run(['plugins'], root)) .do((output: any) => expect(output.stdout).to.equal('No plugins installed.\n')) .it('runs plugins') diff --git a/test/command/main.test.ts b/test/command/main.test.ts index 35d953d6a..f584c4979 100644 --- a/test/command/main.test.ts +++ b/test/command/main.test.ts @@ -23,10 +23,9 @@ describe('main', () => { sandbox.restore() }) - // need to skip until the stdout change is merged and used in plugin-plugins - it.skip('should run plugins', async () => { - await run(['plugins'], resolve(__dirname, '../../package.json')) - expect(stdoutStub.firstCall.firstArg).to.equal('No plugins installed.\n') + it('should run plugins', async () => { + const result = await run(['plugins'], resolve(__dirname, '../../package.json')) + expect(result).to.deep.equal([]) }) it('should run version', async () => { diff --git a/test/config/config.flexible.test.ts b/test/config/config.flexible.test.ts index 161896812..7d58bb688 100644 --- a/test/config/config.flexible.test.ts +++ b/test/config/config.flexible.test.ts @@ -1,6 +1,3 @@ -import * as os from 'node:os' -import {join} from 'node:path' - import {Config} from '../../src/config/config' import {Plugin as IPlugin} from '../../src/interfaces' @@ -8,6 +5,7 @@ import {expect, fancy} from './test' import {Flags, Interfaces} from '../../src' import {Command} from '../../src/command' import {getCommandIdPermutations} from '../../src/config/util' +import * as util from '../../src/util' interface Options { pjson?: any; @@ -45,8 +43,8 @@ describe('Config with flexible taxonomy', () => { let test = fancy .resetConfig() .env(env, {clear: true}) - .stub(os, 'homedir', () => join(homedir)) - .stub(os, 'platform', () => platform) + .stub(util, 'getHomeDir', stub => stub.returns(homedir)) + .stub(util, 'getPlatform', stub => stub.returns(platform)) const load = async (): Promise => {} const findCommand = async (): Promise => MyCommandClass diff --git a/test/config/config.test.ts b/test/config/config.test.ts index 6b0e57b35..a690d77a4 100644 --- a/test/config/config.test.ts +++ b/test/config/config.test.ts @@ -1,8 +1,7 @@ -import * as os from 'node:os' import {join} from 'node:path' import {Plugin as IPlugin} from '../../src/interfaces' -import * as util from '../../src/config/util' +import * as util from '../../src/util' import {expect, fancy} from './test' import {Config, Interfaces} from '../../src' @@ -50,10 +49,9 @@ describe('Config', () => { let test = fancy .resetConfig() .env(env, {clear: true}) - .stub(os, 'homedir', () => join(homedir)) - .stub(os, 'platform', () => platform) - - if (pjson) test = test.stub(util, 'loadJSON', () => Promise.resolve(pjson)) + .stub(util, 'getHomeDir', stub => stub.returns(homedir)) + .stub(util, 'getPlatform', stub => stub.returns(platform)) + if (pjson) test = test.stub(util, 'readJson', stub => stub.resolves(pjson)) test = test.add('config', () => Config.load()) @@ -309,10 +307,10 @@ describe('Config', () => { let test = fancy .resetConfig() .env(env, {clear: true}) - .stub(os, 'homedir', () => join(homedir)) - .stub(os, 'platform', () => platform) + .stub(util, 'getHomeDir', stub => stub.returns(join(homedir))) + .stub(util, 'getPlatform', stub => stub.returns(platform)) - if (pjson) test = test.stub(util, 'loadJSON', () => Promise.resolve(pjson)) + if (pjson) test = test.stub(util, 'readJson', stub => stub.resolves(pjson)) test = test.add('config', async () => { const config = await Config.load() config.plugins = plugins diff --git a/test/config/ts-node.test.ts b/test/config/ts-node.test.ts index 5d512365a..6742238e4 100644 --- a/test/config/ts-node.test.ts +++ b/test/config/ts-node.test.ts @@ -5,6 +5,7 @@ import {SinonSandbox, createSandbox} from 'sinon' import {Interfaces, settings} from '../../src' import * as configTsNode from '../../src/config/ts-node' +import * as util from '../../src/util' import {expect} from 'chai' const root = resolve(__dirname, 'fixtures/typescript') @@ -43,31 +44,31 @@ describe('tsPath', () => { }) it('should resolve a .js file to ts src', () => { - sandbox.stub(fs, 'readFileSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) + sandbox.stub(util, 'readJsonSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) const result = configTsNode.tsPath(root, jsCompiled) expect(result).to.equal(join(root, tsModule)) }) it('should resolve a module file to ts src', () => { - sandbox.stub(fs, 'readFileSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) + sandbox.stub(util, 'readJsonSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) const result = configTsNode.tsPath(root, jsCompiledModule) expect(result).to.equal(join(root, tsModule)) }) it('should resolve a .ts file', () => { - sandbox.stub(fs, 'readFileSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) + sandbox.stub(util, 'readJsonSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) const result = configTsNode.tsPath(root, tsSource) expect(result).to.equal(join(root, tsSource)) }) it('should resolve .js with no rootDir or outDir', () => { - sandbox.stub(fs, 'readFileSync').returns(JSON.stringify({compilerOptions: {}})) + sandbox.stub(util, 'readJsonSync').returns({compilerOptions: {}}) const result = configTsNode.tsPath(root, jsCompiled) expect(result).to.equal(join(root, jsCompiled)) }) it('should resolve to .ts file if enabled and prod', () => { - sandbox.stub(fs, 'readFileSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) + sandbox.stub(util, 'readJsonSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) settings.tsnodeEnabled = true const originalNodeEnv = process.env.NODE_ENV delete process.env.NODE_ENV @@ -80,7 +81,7 @@ describe('tsPath', () => { }) it('should resolve to js if disabled', () => { - sandbox.stub(fs, 'readFileSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) + sandbox.stub(util, 'readJsonSync').returns(JSON.stringify(DEFAULT_TS_CONFIG)) settings.tsnodeEnabled = false const result = configTsNode.tsPath(root, jsCompiled) expect(result).to.equal(join(root, jsCompiled)) diff --git a/test/errors/handle.test.ts b/test/errors/handle.test.ts index 11a284520..5af66f30b 100644 --- a/test/errors/handle.test.ts +++ b/test/errors/handle.test.ts @@ -4,91 +4,53 @@ import {join} from 'node:path' import * as process from 'node:process' import {CLIError, ExitError, config, exit as exitErrorThrower} from '../../src/errors' -import {handle} from '../../src/errors/handle' +import {Exit, handle} from '../../src/errors/handle' +import {SinonSandbox, SinonStub, createSandbox} from 'sinon' const errlog = join(__dirname, '../tmp/mytest/error.log') const x = process.platform === 'win32' ? 'ยป' : 'โ€บ' -const originalExit = process.exit -const originalExitCode = process.exitCode - describe('handle', () => { + let sandbox: SinonSandbox + let exitStub: SinonStub + beforeEach(() => { - (process as any).exitCode = undefined; - (process as any).exit = (code: any) => { - (process as any).exitCode = code - } + sandbox = createSandbox() + exitStub = sandbox.stub(Exit, 'exit') }) + afterEach(() => { - (process as any).exit = originalExit; - (process as any).exitCode = originalExitCode + sandbox.restore() }) - // fancy - // .stderr() - // .finally(() => delete process.exitCode) - // .it('displays an error from root handle module', ctx => { - // handle(new Error('x')) - // expect(ctx.stderr).to.contain('Error: x') - // expect(process.exitCode).to.equal(1) - // }) - - // fancy - // .stderr() - // .finally(() => delete process.exitCode) - // .it('shows an unhandled error', ctx => { - // handle(new Error('x')) - // expect(ctx.stderr).to.contain('Error: x') - // expect(process.exitCode).to.equal(1) - // }) - - // fancy - // .stderr() - // .finally(() => delete process.exitCode) - // .it('handles a badly formed error object', () => { - // handle({status: 400} as any) - // expect(process.exitCode).to.equal(1) - // }) - - // fancy - // .stderr() - // .finally(() => delete process.exitCode) - // .it('shows a cli error', ctx => { - // handle(new CLIError('x')) - // expect(ctx.stderr).to.equal(` ${x} Error: x\n`) - // expect(process.exitCode).to.equal(2) - // }) - fancy .stdout() .stderr() - .it('hides an exit error', ctx => { - handle(new ExitError(0)) + .it('hides an exit error', async ctx => { + await handle(new ExitError(0)) expect(ctx.stdout).to.equal('') expect(ctx.stderr).to.equal('') - expect(process.exitCode).to.equal(0) + expect(exitStub.firstCall.firstArg).to.equal(0) }) fancy - .skip() .stdout() .stderr() - .it('prints error', ctx => { + .it('prints error', async ctx => { const error = new Error('foo bar baz') as Error & {skipOclifErrorHandling: boolean} error.skipOclifErrorHandling = false - handle(error) + await handle(error) expect(ctx.stdout).to.equal('') expect(ctx.stderr).to.include('foo bar baz') }) fancy .stdout() - .skip() .stderr() - .it('should not print error when skipOclifErrorHandling is true', ctx => { + .it('should not print error when skipOclifErrorHandling is true', async ctx => { const error = new Error('foo bar baz') as Error & {skipOclifErrorHandling: boolean} error.skipOclifErrorHandling = true - handle(error) + await handle(error) expect(ctx.stdout).to.equal('') expect(ctx.stderr).to.equal('') }) @@ -102,28 +64,27 @@ describe('handle', () => { config.errlog = undefined }) .it('logs when errlog is set', async ctx => { - handle(new CLIError('uh oh!')) + await handle(new CLIError('uh oh!')) expect(ctx.stderr).to.equal(` ${x} Error: uh oh!\n`) await config.errorLogger!.flush() expect(readFileSync(errlog, 'utf8')).to.contain('Error: uh oh!') - expect(process.exitCode).to.equal(2) + expect(exitStub.firstCall.firstArg).to.equal(2) }) describe('exit', () => { fancy .stderr() - .skip() .stdout() - .it('exits without displaying anything', ctx => { + .it('exits without displaying anything', async ctx => { try { exitErrorThrower(9000) } catch (error: any) { - handle(error) + await handle(error) } expect(ctx.stdout).to.equal('') expect(ctx.stderr).to.equal('') - expect(process.exitCode).to.be.equal(9000) + expect(exitStub.firstCall.firstArg).to.equal(9000) }) }) }) diff --git a/test/errors/warn.test.ts b/test/errors/warn.test.ts index 3f807a620..90fb1b7ea 100644 --- a/test/errors/warn.test.ts +++ b/test/errors/warn.test.ts @@ -18,7 +18,6 @@ describe('warn', () => { .it('warns', async ctx => { warn('foo!') expect(ctx.stderr).to.contain('Warning: foo!') - expect(process.exitCode).to.be.undefined await config.errorLogger!.flush() expect(await readFile(errlog, 'utf8')).to.contain('Warning: foo!') }) diff --git a/test/integration/esm-cjs.ts b/test/integration/esm-cjs.ts index 7e5ffb8a6..b8fe131e0 100644 --- a/test/integration/esm-cjs.ts +++ b/test/integration/esm-cjs.ts @@ -10,7 +10,7 @@ import * as fs from 'node:fs/promises' import * as path from 'node:path' import {Executor, setup} from './util' import {expect} from 'chai' -import {bold, green, red} from 'chalk' +import chalk from 'chalk' const FAILED: string[] = [] const PASSED: string[] = [] @@ -19,28 +19,28 @@ async function test(name: string, fn: () => Promise) { try { await fn() PASSED.push(name) - console.log(green('โœ“'), name) + console.log(chalk.green('โœ“'), name) } catch (error) { FAILED.push(name) - console.log(red('๐„‚'), name) + console.log(chalk.red('๐„‚'), name) console.log(error) } } function exit(): never { console.log() - console.log(bold('#### Summary ####')) + console.log(chalk.bold('#### Summary ####')) for (const name of PASSED) { - console.log(green('โœ“'), name) + console.log(chalk.green('โœ“'), name) } for (const name of FAILED) { - console.log(red('๐„‚'), name) + console.log(chalk.red('๐„‚'), name) } - console.log(`${green('Passed:')} ${PASSED.length}`) - console.log(`${red('Failed:')} ${FAILED.length}`) + console.log(`${chalk.green('Passed:')} ${PASSED.length}`) + console.log(`${chalk.red('Failed:')} ${FAILED.length}`) // eslint-disable-next-line no-process-exit, unicorn/no-process-exit process.exit(FAILED.length) diff --git a/test/integration/util.ts b/test/integration/util.ts index 2bf3e8cf5..929bd8aa6 100644 --- a/test/integration/util.ts +++ b/test/integration/util.ts @@ -1,7 +1,7 @@ import {mkdir, rm} from 'node:fs/promises' import {ExecException, ExecSyncOptionsWithBufferEncoding, execSync} from 'node:child_process' -import * as chalk from 'chalk' +import chalk from 'chalk' import {existsSync, readFileSync, writeFileSync} from 'node:fs' import {tmpdir} from 'node:os' import {basename, dirname, join, resolve} from 'node:path' diff --git a/tsconfig.json b/tsconfig.json index cd1e62b7d..fe0fa54e1 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,7 +3,7 @@ "declaration": true, "forceConsistentCasingInFileNames": true, "importHelpers": true, - "module": "commonjs", + "module": "Node16", "outDir": "./lib", "pretty": true, "rootDirs": [ diff --git a/yarn.lock b/yarn.lock index ff4b8799d..16a9fccd4 100644 --- a/yarn.lock +++ b/yarn.lock @@ -604,6 +604,27 @@ dependencies: type-detect "4.0.8" +"@sinonjs/commons@^2.0.0": + version "2.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-2.0.0.tgz#fd4ca5b063554307e8327b4564bd56d3b73924a3" + integrity sha512-uLa0j859mMrg2slwQYdO/AkrOfmH+X6LTVmNTS9CqexuE2IvVORIkSpJLqePAbEnKJ77aMmCwr1NUZ57120Xcg== + dependencies: + type-detect "4.0.8" + +"@sinonjs/commons@^3.0.0": + version "3.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/commons/-/commons-3.0.0.tgz#beb434fe875d965265e04722ccfc21df7f755d72" + integrity sha512-jXBtWAF4vmdNmZgD5FoKsVLv3rPgDnLgPbU84LIJ3otV44vJlDRokVng5v8NFJdCf/da9legHcKaRuZs4L7faA== + dependencies: + type-detect "4.0.8" + +"@sinonjs/fake-timers@^10.0.2", "@sinonjs/fake-timers@^10.3.0": + version "10.3.0" + resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-10.3.0.tgz#55fdff1ecab9f354019129daf4df0dd4d923ea66" + integrity sha512-V4BG07kuYSUkTCSBHG8G8TNhM+F19jXFWnQtzj+we8DrkpSBCee9Z3Ms8yiGer/dlmhe35/Xdgyo3/0rQKg7YA== + dependencies: + "@sinonjs/commons" "^3.0.0" + "@sinonjs/fake-timers@^7.0.4", "@sinonjs/fake-timers@^7.1.0", "@sinonjs/fake-timers@^7.1.2": version "7.1.2" resolved "https://registry.yarnpkg.com/@sinonjs/fake-timers/-/fake-timers-7.1.2.tgz#2524eae70c4910edccf99b2f4e6efc5894aff7b5" @@ -620,6 +641,15 @@ lodash.get "^4.4.2" type-detect "^4.0.8" +"@sinonjs/samsam@^8.0.0": + version "8.0.0" + resolved "https://registry.yarnpkg.com/@sinonjs/samsam/-/samsam-8.0.0.tgz#0d488c91efb3fa1442e26abea81759dfc8b5ac60" + integrity sha512-Bp8KUVlLp8ibJZrnvq2foVhP0IVX2CIprMJPK0vqGqgrDa0OHVKeZyBykqskkrdxV6yKBPmGasO8LVjAKR3Gew== + dependencies: + "@sinonjs/commons" "^2.0.0" + lodash.get "^4.4.2" + type-detect "^4.0.8" + "@sinonjs/text-encoding@^0.7.1": version "0.7.1" resolved "https://registry.yarnpkg.com/@sinonjs/text-encoding/-/text-encoding-0.7.1.tgz#8da5c6530915653f3a1f38fd5f101d8c3f8079c5" @@ -2224,10 +2254,10 @@ exponential-backoff@^3.1.1: resolved "https://registry.yarnpkg.com/exponential-backoff/-/exponential-backoff-3.1.1.tgz#64ac7526fe341ab18a39016cd22c787d01e00bf6" integrity sha512-dX7e/LHVJ6W3DE1MHWi9S1EYzDESENfLrYohG2G++ovZrYOkm4Knwa0mc1cn84xJOR4KEU0WSchhLbd0UklbHw== -fancy-test@^2.0.16: - version "2.0.42" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.42.tgz#464cf51037a4ff3111d1ca34305a3125df198bc5" - integrity sha512-TX8YTALYAmExny+f+G24MFxWry3Pk09+9uykwRjfwjibRxJ9ZjJzrnHYVBZK46XQdyli7d+rQc5U/KK7V6uLsw== +fancy-test@^2.0.34: + version "2.0.35" + resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.35.tgz#18c0ccd767a7332bea186369a7e7a79a3b4582bb" + integrity sha512-XE0L7yAFOKY2jDnkBDDQ3JBD7xbBFwAFl1Z/5WNKBeVNlaEP08wuRTPE3xj2k+fnUp2CMUfD+6aiIS+4pcrjwg== dependencies: "@types/chai" "*" "@types/lodash" "*" @@ -2238,10 +2268,10 @@ fancy-test@^2.0.16: nock "^13.3.3" stdout-stderr "^0.1.9" -fancy-test@^2.0.34: - version "2.0.35" - resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-2.0.35.tgz#18c0ccd767a7332bea186369a7e7a79a3b4582bb" - integrity sha512-XE0L7yAFOKY2jDnkBDDQ3JBD7xbBFwAFl1Z/5WNKBeVNlaEP08wuRTPE3xj2k+fnUp2CMUfD+6aiIS+4pcrjwg== +fancy-test@^3.0.0-beta.2: + version "3.0.0-beta.2" + resolved "https://registry.yarnpkg.com/fancy-test/-/fancy-test-3.0.0-beta.2.tgz#a6b6b4f3ae30200ce64ff8dd79c73fcefba0058f" + integrity sha512-bXffX78q50U/dm9E0RVesZUQ0IZPmRkMhKJdbipuVOm/WuzdoYXZnT/sr0uyzyGaxtjFcatKhZgPRDk49DlXTw== dependencies: "@types/chai" "*" "@types/lodash" "*" @@ -2250,6 +2280,7 @@ fancy-test@^2.0.34: lodash "^4.17.13" mock-stdin "^1.0.0" nock "^13.3.3" + sinon "^16.0.0" stdout-stderr "^0.1.9" fast-deep-equal@^3.1.1, fast-deep-equal@^3.1.3: @@ -3736,6 +3767,17 @@ nise@^5.1.0: just-extend "^4.0.2" path-to-regexp "^1.7.0" +nise@^5.1.4: + version "5.1.4" + resolved "https://registry.yarnpkg.com/nise/-/nise-5.1.4.tgz#491ce7e7307d4ec546f5a659b2efe94a18b4bbc0" + integrity sha512-8+Ib8rRJ4L0o3kfmyVCL7gzrohyDe0cMFTBa2d364yIrEGMEoetznKJx899YxjybU6bL9SQkYPSBBs1gyYs8Xg== + dependencies: + "@sinonjs/commons" "^2.0.0" + "@sinonjs/fake-timers" "^10.0.2" + "@sinonjs/text-encoding" "^0.7.1" + just-extend "^4.0.2" + path-to-regexp "^1.7.0" + nock@*, nock@^13.3.0: version "13.3.0" resolved "https://registry.yarnpkg.com/nock/-/nock-13.3.0.tgz#b13069c1a03f1ad63120f994b04bfd2556925768" @@ -4734,6 +4776,18 @@ sinon@^11.1.2: nise "^5.1.0" supports-color "^7.2.0" +sinon@^16.0.0: + version "16.0.0" + resolved "https://registry.yarnpkg.com/sinon/-/sinon-16.0.0.tgz#06da4e63624b946c9d7e67cce21c2f67f40f23a9" + integrity sha512-B8AaZZm9CT5pqe4l4uWJztfD/mOTa7dL8Qo0W4+s+t74xECOgSZDDQCBjNgIK3+n4kyxQrSTv2V5ul8K25qkiQ== + dependencies: + "@sinonjs/commons" "^3.0.0" + "@sinonjs/fake-timers" "^10.3.0" + "@sinonjs/samsam" "^8.0.0" + diff "^5.1.0" + nise "^5.1.4" + supports-color "^7.2.0" + slash@^3.0.0: version "3.0.0" resolved "https://registry.yarnpkg.com/slash/-/slash-3.0.0.tgz#6539be870c165adbd5240220dbe361f1bc4d4634" @@ -5172,10 +5226,10 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typescript@^4.9.5: - version "4.9.5" - resolved "https://registry.yarnpkg.com/typescript/-/typescript-4.9.5.tgz#095979f9bcc0d09da324d58d03ce8f8374cbe65a" - integrity sha512-1FXk9E2Hm+QzZQ7z+McJiHL4NW1F2EzMu9Nq9i3zAaGqibafqYwCVU6WyWAuyQRRzOlxou8xZSyXLEN8oKj24g== +typescript@^5: + version "5.2.2" + resolved "https://registry.yarnpkg.com/typescript/-/typescript-5.2.2.tgz#5ebb5e5a5b75f085f22bc3f8460fba308310fa78" + integrity sha512-mI4WrpHsbCIcwT9cF4FZvr80QUeKvsUsUvKDoR+X/7XHQH98xYD8YHZg7ANtz2GtZt/CBq2QJ0thkGJMHfqc1w== unbox-primitive@^1.0.2: version "1.0.2" From b1661f0d7080fb0f0ad00a2bd8609420e2103740 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 20 Sep 2023 16:44:58 -0600 Subject: [PATCH 4/6] test: windows paths --- test/config/config.flexible.test.ts | 3 ++- test/config/config.test.ts | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/test/config/config.flexible.test.ts b/test/config/config.flexible.test.ts index 7d58bb688..829b00463 100644 --- a/test/config/config.flexible.test.ts +++ b/test/config/config.flexible.test.ts @@ -6,6 +6,7 @@ import {Flags, Interfaces} from '../../src' import {Command} from '../../src/command' import {getCommandIdPermutations} from '../../src/config/util' import * as util from '../../src/util' +import {join} from 'node:path' interface Options { pjson?: any; @@ -43,7 +44,7 @@ describe('Config with flexible taxonomy', () => { let test = fancy .resetConfig() .env(env, {clear: true}) - .stub(util, 'getHomeDir', stub => stub.returns(homedir)) + .stub(util, 'getHomeDir', stub => stub.returns(join(homedir))) .stub(util, 'getPlatform', stub => stub.returns(platform)) const load = async (): Promise => {} diff --git a/test/config/config.test.ts b/test/config/config.test.ts index a690d77a4..a59a90d4a 100644 --- a/test/config/config.test.ts +++ b/test/config/config.test.ts @@ -49,7 +49,7 @@ describe('Config', () => { let test = fancy .resetConfig() .env(env, {clear: true}) - .stub(util, 'getHomeDir', stub => stub.returns(homedir)) + .stub(util, 'getHomeDir', stub => stub.returns(join(homedir))) .stub(util, 'getPlatform', stub => stub.returns(platform)) if (pjson) test = test.stub(util, 'readJson', stub => stub.resolves(pjson)) From 6a138640474ebeaaa6ab4893e1e4f2c93f90da17 Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Wed, 20 Sep 2023 16:49:18 -0600 Subject: [PATCH 5/6] fix: exports --- src/config/config.ts | 2 +- src/config/plugin-loader.ts | 2 +- src/config/plugin.ts | 2 +- src/execute.ts | 4 ++-- src/index.ts | 6 +++--- src/main.ts | 4 ++-- src/performance.ts | 2 +- 7 files changed, 11 insertions(+), 11 deletions(-) diff --git a/src/config/config.ts b/src/config/config.ts index 1bb323da2..9902161e3 100644 --- a/src/config/config.ts +++ b/src/config/config.ts @@ -11,7 +11,7 @@ import {compact, ensureArgObject, getHomeDir, getPlatform, isProd, requireJson} import {join, sep} from 'node:path' import {Command} from '../command' -import Performance from '../performance' +import {Performance} from '../performance' import PluginLoader from './plugin-loader' import {format} from 'node:util' import {getHelpFlagAdditions} from '../help' diff --git a/src/config/plugin-loader.ts b/src/config/plugin-loader.ts index ba9807da1..7965a08bb 100644 --- a/src/config/plugin-loader.ts +++ b/src/config/plugin-loader.ts @@ -3,7 +3,7 @@ import {Plugin as IPlugin, Options} from '../interfaces/plugin' import {isProd, readJson} from '../util' import {Debug} from './util' import {PJSON} from '../interfaces' -import Performance from '../performance' +import {Performance} from '../performance' import {join} from 'node:path' // eslint-disable-next-line new-cap diff --git a/src/config/plugin.ts b/src/config/plugin.ts index 91a333a27..8f623db75 100644 --- a/src/config/plugin.ts +++ b/src/config/plugin.ts @@ -13,7 +13,7 @@ import {loadWithData, loadWithDataFromManifest} from '../module-loader' import {Command} from '../command' import {Manifest} from '../interfaces/manifest' import {PJSON} from '../interfaces/pjson' -import Performance from '../performance' +import {Performance} from '../performance' import {Topic} from '../interfaces/topic' import {inspect} from 'node:util' import {sync} from 'globby' diff --git a/src/execute.ts b/src/execute.ts index 0d7edc117..d5e95aa25 100644 --- a/src/execute.ts +++ b/src/execute.ts @@ -1,7 +1,7 @@ import {LoadOptions} from './interfaces' import {flush} from './cli-ux/flush' import {handle} from './errors/handle' -import run from './main' +import {run} from './main' import {settings} from './settings' /** @@ -46,7 +46,7 @@ import {settings} from './settings' * })() * ``` */ -export default async function execute( +export async function execute( options: { dir: string; args?: string[]; diff --git a/src/index.ts b/src/index.ts index 9a9188363..4eea78bfa 100644 --- a/src/index.ts +++ b/src/index.ts @@ -26,8 +26,8 @@ export {stdout, stderr} from './cli-ux/stream' export {toConfiguredId, toStandardizedId} from './help/util' export {Command} from './command' export {Hook} from './interfaces/hooks' -export {default as Performance} from './performance' -export {default as execute} from './execute' +export {Performance} from './performance' +export {execute} from './execute' export {flush} from './cli-ux/flush' export {handle} from './errors/handle' -export {default as run} from './main' +export {run} from './main' diff --git a/src/main.ts b/src/main.ts index 9a814e458..435346c45 100644 --- a/src/main.ts +++ b/src/main.ts @@ -4,7 +4,7 @@ import {format, inspect} from 'node:util' import {getHelpFlagAdditions, loadHelpClass, normalizeArgv} from './help' import {Config} from './config' -import Performance from './performance' +import {Performance} from './performance' import {stdout} from './cli-ux/stream' const debug = require('debug')('oclif:main') @@ -32,7 +32,7 @@ export const versionAddition = (argv: string[], config?: Interfaces.Config): boo return false } -export default async function run(argv?: string[], options?: Interfaces.LoadOptions): Promise { +export async function run(argv?: string[], options?: Interfaces.LoadOptions): Promise { const marker = Performance.mark('main.run') const initMarker = Performance.mark('main.run#init') diff --git a/src/performance.ts b/src/performance.ts index 24cc11f03..284eb2af8 100644 --- a/src/performance.ts +++ b/src/performance.ts @@ -59,7 +59,7 @@ class Marker { } } -export default class Performance { +export class Performance { private static markers: Record = {} private static _results: PerfResult[] = [] private static _highlights: PerfHighlights From 9ff8202353577dd7b59e5d100a05c6d0e4c1439a Mon Sep 17 00:00:00 2001 From: Mike Donnalley Date: Thu, 21 Sep 2023 07:07:35 -0600 Subject: [PATCH 6/6] test: update run import --- test/command/main-esm.test.ts | 2 +- test/command/main.test.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/test/command/main-esm.test.ts b/test/command/main-esm.test.ts index cfaef694f..d971a48aa 100644 --- a/test/command/main-esm.test.ts +++ b/test/command/main-esm.test.ts @@ -2,7 +2,7 @@ import {expect, fancy} from 'fancy-test' import {resolve} from 'node:path' import {pathToFileURL} from 'node:url' -import run from '../../src/main' +import {run} from '../../src/main' // This tests file URL / import.meta.url simulation. const convertToFileURL = (filepath: string) => pathToFileURL(filepath).toString() diff --git a/test/command/main.test.ts b/test/command/main.test.ts index f584c4979..1b9b45583 100644 --- a/test/command/main.test.ts +++ b/test/command/main.test.ts @@ -4,7 +4,7 @@ import {resolve} from 'node:path' import {SinonSandbox, SinonStub, createSandbox} from 'sinon' import stripAnsi = require('strip-ansi') import {requireJson} from '../../src/util' -import run from '../../src/main' +import {run} from '../../src/main' import {Interfaces, stdout} from '../../src/index' const pjson = requireJson(__dirname, '..', '..', 'package.json')