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(deps): update dependency tiny-async-pool to v2 #295

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

renovate[bot]
Copy link
Contributor

@renovate renovate bot commented Sep 8, 2022

This PR contains the following updates:

Package Change Age Adoption Passing Confidence
tiny-async-pool ^1.1.0 -> ^2.0.0 age adoption passing confidence

Release Notes

rxaviers/async-pool (tiny-async-pool)

v2.1.0

Compare Source

⭐️ Enhancement

  • Improve the promise consumption logic #​44

🐛 Fixes

  • Consume all promises, even if they are fullfilled within the same tick #​42

v2.0.1

Compare Source

🐛 Fixes

⚙️ Chore

v2.0.0

Compare Source

🌟 New API (breaking change)

Support for await...of usage by returning an async iterator.

const timeout = ms => new Promise(resolve => setTimeout(() => resolve(ms), ms));

for await (const ms of asyncPool(2, [1000, 5000, 3000, 2000], timeout)) {
  console.log(ms);
}
// Call iterator timeout(1000)
// Call iterator timeout(5000)
// Concurrency limit of 2 reached, wait for the quicker one to complete...
// 1000 finishes
// for await...of outputs "1000"
// Call iterator timeout(3000)
// Concurrency limit of 2 reached, wait for the quicker one to complete...
// 3000 finishes
// for await...of outputs "3000"
// Call iterator timeout(2000)
// Itaration is complete, wait until running ones complete...
// 5000 finishes
// for await...of outputs "5000"
// 2000 finishes
// for await...of outputs "2000"

The main difference: 1.x API waits until all of the promises completes, then all results are returned. The new API (thanks to async iteration) let each result be returned as soon as it completes.

The environment baseline of the new 2.x is ES9 (Node v10). The environment baseline of 1.x is ES6.


Configuration

📅 Schedule: Branch creation - At any time (no schedule defined), Automerge - At any time (no schedule defined).

🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.

Rebasing: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox.

🔕 Ignore: Close this PR and you won't be reminded about this update again.


  • If you want to rebase/retry this PR, check this box

This PR was generated by Mend Renovate. View the repository job log.

@codecov
Copy link

codecov bot commented Sep 8, 2022

Codecov Report

Merging #295 (7ee47b6) into master (3907770) will not change coverage.
The diff coverage is n/a.

❗ Current head 7ee47b6 differs from pull request most recent head 73be99f. Consider uploading reports for the commit 73be99f to get more accurate results

Additional details and impacted files

Impacted file tree graph

@@          Coverage Diff          @@
##           master   #295   +/-   ##
=====================================
  Coverage      34%    34%           
=====================================
  Files          92     92           
  Lines        3877   3877           
  Branches      820    820           
=====================================
  Hits         1339   1339           
  Misses       2538   2538           

@renovate renovate bot changed the title fix(deps): update dependency tiny-async-pool to v2 Update dependency tiny-async-pool to v2 Dec 17, 2022
@renovate renovate bot changed the title Update dependency tiny-async-pool to v2 fix(deps): update dependency tiny-async-pool to v2 Dec 17, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

0 participants