-
Notifications
You must be signed in to change notification settings - Fork 2k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore(package): Update yargs to version 13.2.2 #3681
Conversation
Thanks for your PR! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
tsc
is the TypeScript compiler.
List of errors reported by tsc
:
.usage('$0 [[--] files...]', false, (yargs) => { | ||
yargs.positional('files...', { | ||
.usage('$0 [[--] files...]', false, yargs => { | ||
return yargs.positional('files...', { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yargs >= 12 requires that the usage(…)
function callback returns a Yargs object.
@@ -26,9 +26,6 @@ let hasErrors = false; | |||
* @param {string[]} files | |||
*/ | |||
function load(...files) { | |||
if (files.length === 1 && Array.isArray(files[0])) { | |||
files = files[0]; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error TS2322: Type 'string' is not assignable to type 'string[]'.
@@ -94,7 +91,7 @@ function load(...files) { | |||
} | |||
|
|||
if (argv.files) { | |||
load(argv.files); | |||
load.apply(undefined, argv.files); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
For:
load(...argv.files);
error TS2488: Type 'unknown' must have a 'Symbol.iterator' method that returns an iterator.
@@ -54,7 +51,7 @@ function load(...files) { | |||
|
|||
const console_error = console.error; | |||
console.error = (...args) => { | |||
spinner.stream = process.stderr; | |||
spinner['stream'] = process.stderr; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
error TS2339: Property 'stream' does not exist on type 'Ora'.
This is because Ora.stream
is an internal property that is not actually part of the public API.
See also: PrismJS/prism#1796 (review)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The changes here look good to me.
I don't think we need to comply to tsc
, but it looks like the changes won't hurt.
Thanks for your PR! 👍
This updates the yargs dependency to version 13.2.2 and also fixes a few issues reported by
tsc
.