Skip to content

Commit

Permalink
fix(deps): update dependency yargs to v17 (#239)
Browse files Browse the repository at this point in the history
* fix(deps): update dependency yargs to v17

* chore: fix for yarn v17

Co-authored-by: Renovate Bot <[email protected]>
Co-authored-by: Joram van den Boezem <[email protected]>
  • Loading branch information
3 people authored May 12, 2021
1 parent 748102d commit 7ba1c64
Show file tree
Hide file tree
Showing 3 changed files with 10 additions and 11 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@
"enquirer": "^2.3.6",
"string-argv": "^0.3.1",
"typed-emitter": "^1.2.0",
"yargs": "^16.2.0"
"yargs": "^17.0.0"
},
"engines": {
"node": ">=12"
Expand Down
11 changes: 5 additions & 6 deletions src/program.ts
Original file line number Diff line number Diff line change
Expand Up @@ -173,10 +173,9 @@ export class Program extends (EventEmitter as new () => TypedEventEmitter<Events
// Return promise resolving to the return value of the command
// handler.
return new Promise((resolve, reject) => {
this.createYargsInstance().parse(
cmd,
{},
(err, argv: Arguments, output) => {
// @ts-ignore
this.createYargsInstance()
.parse(cmd, {}, (err, argv: Arguments, output) => {
/**
* From the yargs docs:
* > any text that would have been output by yargs to the terminal,
Expand Down Expand Up @@ -209,8 +208,8 @@ export class Program extends (EventEmitter as new () => TypedEventEmitter<Events
// from command handlers in a .then() function.
resolve(undefined)
}
}
)
})
.catch(() => {})
})
}

Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4439,10 +4439,10 @@ yargs@^15.4.1:
y18n "^4.0.0"
yargs-parser "^18.1.2"

yargs@^16.2.0:
version "16.2.0"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-16.2.0.tgz#1c82bf0f6b6a66eafce7ef30e376f49a12477f66"
integrity sha512-D1mvvtDG0L5ft/jGWkLpG1+m0eQxOfaBvTNELraWj22wSVUMWxZUvYgJYcKh6jGGIkJFhH4IZPQhR4TKpc8mBw==
yargs@^17.0.0:
version "17.0.1"
resolved "https://registry.yarnpkg.com/yargs/-/yargs-17.0.1.tgz#6a1ced4ed5ee0b388010ba9fd67af83b9362e0bb"
integrity sha512-xBBulfCc8Y6gLFcrPvtqKz9hz8SO0l1Ni8GgDekvBX2ro0HRQImDGnikfc33cgzcYUSncapnNcZDjVFIH3f6KQ==
dependencies:
cliui "^7.0.2"
escalade "^3.1.1"
Expand Down

0 comments on commit 7ba1c64

Please sign in to comment.