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

fix: concurrent option is not working correctly #950

Merged
merged 1 commit into from
Feb 5, 2021
Merged

fix: concurrent option is not working correctly #950

merged 1 commit into from
Feb 5, 2021

Conversation

jay-es
Copy link
Contributor

@jay-es jay-es commented Feb 5, 2021

Hello.

The value of --concurrent CLI option is passed as string like 'true' and '2'.
And tasks run serially when this option is set (even --concurrent true).

This is because the code to assign concurrency looks like this.

// node_modules/listr2/dist/listr.js:34-40 
this.concurrency = 1;
if (this.options.concurrent === true) {
    this.concurrency = Infinity;
}
else if (typeof this.options.concurrent === 'number') {
    this.concurrency = this.options.concurrent;
}

I have fixed this behavior.
Please review this PR, thanks.

before → after.
image

@iiroj
Copy link
Member

iiroj commented Feb 5, 2021

@jay-es very nice catch! Thanks.

@codecov
Copy link

codecov bot commented Feb 5, 2021

Codecov Report

Merging #950 (89739d9) into master (29a0b68) will not change coverage.
The diff coverage is n/a.

Impacted file tree graph

@@            Coverage Diff            @@
##            master      #950   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files           18        18           
  Lines          611       611           
  Branches       144       144           
=========================================
  Hits           611       611           

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 29a0b68...89739d9. Read the comment docs.

@iiroj iiroj merged commit 4383815 into lint-staged:master Feb 5, 2021
@iiroj
Copy link
Member

iiroj commented Feb 5, 2021

@jay-es thanks again, merged!

@jay-es
Copy link
Contributor Author

jay-es commented Feb 5, 2021

@iiroj Thank you!

@github-actions
Copy link
Contributor

github-actions bot commented Feb 5, 2021

🎉 This PR is included in version 10.5.4 🎉

The release is available on:

Your semantic-release bot 📦🚀

This was referenced Mar 11, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Development

Successfully merging this pull request may close these issues.

2 participants