Skip to content
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

Merged
merged 1 commit into from
Mar 26, 2019

Conversation

ExE-Boss
Copy link
Contributor

This updates the yargs dependency to version 13.2.2 and also fixes a few issues reported by tsc.

@Elchi3 Elchi3 added the infra Infrastructure issues (npm, GitHub Actions, releases) of this project label Mar 20, 2019
@ddbeck ddbeck requested a review from Elchi3 March 25, 2019 12:43
@Elchi3
Copy link
Member

Elchi3 commented Mar 25, 2019

Thanks for your PR!
What is tsc? Can you point to what it said?

Copy link
Contributor Author

@ExE-Boss ExE-Boss left a 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...', {
Copy link
Contributor Author

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];
Copy link
Contributor Author

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);
Copy link
Contributor Author

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;
Copy link
Contributor Author

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)

Copy link
Member

@Elchi3 Elchi3 left a 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! 👍

@Elchi3 Elchi3 merged commit e7cd325 into mdn:master Mar 26, 2019
@ExE-Boss ExE-Boss deleted the package/dependencies/yargs-13.2.2 branch March 26, 2019 14:36
@queengooborg queengooborg added the dependencies Pull requests that update a dependency package or file. label Aug 22, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
dependencies Pull requests that update a dependency package or file. infra Infrastructure issues (npm, GitHub Actions, releases) of this project
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants