From 2253284b233cceabd8db677b81c5bf1755eef230 Mon Sep 17 00:00:00 2001 From: "Benjamin E. Coe" Date: Wed, 9 Sep 2020 11:07:35 -0700 Subject: [PATCH] fix(typescript): yargs-parser was breaking @types/yargs (#1745) --- lib/typings/common-types.ts | 2 +- lib/usage.ts | 2 +- lib/validation.ts | 2 +- package.json | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/lib/typings/common-types.ts b/lib/typings/common-types.ts index d6ac7c0e1..782d5acd3 100644 --- a/lib/typings/common-types.ts +++ b/lib/typings/common-types.ts @@ -1,4 +1,4 @@ -import { Parser } from 'yargs-parser/build/lib/yargs-parser-types.d.js' +import { Parser } from './yargs-parser-types.js' /** * An object whose all properties have the same type. diff --git a/lib/usage.ts b/lib/usage.ts index 2d75c8e71..2b6e84e00 100644 --- a/lib/usage.ts +++ b/lib/usage.ts @@ -4,7 +4,7 @@ import { Dictionary, assertNotStrictEqual, PlatformShim, Y18N } from './typings/ import { objFilter } from './utils/obj-filter.js' import { YargsInstance } from './yargs-factory.js' import { YError } from './yerror.js' -import { DetailedArguments } from 'yargs-parser/build/lib/yargs-parser-types.js' +import { DetailedArguments } from './typings/yargs-parser-types.js' import setBlocking from './utils/set-blocking.js' export function usage (yargs: YargsInstance, y18n: Y18N, shim: PlatformShim) { diff --git a/lib/validation.ts b/lib/validation.ts index aefb623b4..fbd9c18cc 100644 --- a/lib/validation.ts +++ b/lib/validation.ts @@ -4,7 +4,7 @@ import { levenshtein as distance } from './utils/levenshtein.js' import { objFilter } from './utils/obj-filter.js' import { UsageInstance } from './usage.js' import { YargsInstance, Arguments } from './yargs-factory.js' -import { DetailedArguments } from 'yargs-parser/build/lib/yargs-parser-types.js' +import { DetailedArguments } from './typings/yargs-parser-types.js' const specialKeys = ['$0', '--', '_'] diff --git a/package.json b/package.json index 75a313c2b..28813fc5a 100644 --- a/package.json +++ b/package.json @@ -42,7 +42,7 @@ "require-directory": "^2.1.1", "string-width": "^4.2.0", "y18n": "^5.0.1", - "yargs-parser": "^19.0.4" + "yargs-parser": "^20.0.0" }, "devDependencies": { "@types/chai": "^4.2.11",