Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@supercharge/promise-pool

Package Overview
Dependencies
Maintainers
3
Versions
24
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@supercharge/promise-pool - npm Package Versions

23

3.2.0

Diff

Changelog

Source

3.2.0 - 2024-03-25

Added

  • add "sideEffects": false to package.json #83

Updated

  • updated types for the handler function in the promise pool processor

Updated

  • bump dependencies
marcuspoehls
published 3.1.1 •

Changelog

Source

3.1.1 - 2024-01-31

Updated

  • bump dependencies

Fixed

  • removed duplicated build files from dist (fixing https://github.com/supercharge/promise-pool/issues/82)
marcuspoehls
published 3.1.0 •

Changelog

Source

3.1.0 - 2023-09-25

Added

  • clear timers from task timeouts to remove them from the event loop: this is helpful to clear up resources for long-running timeouts and fastly resolving tasks. If not cleared, the timeouts stay in the event loop until they’re due
  • add keep error handler when calling pool.handleError after pool.for: previously the error handler was lost

Updated

  • bump dependencies
marcuspoehls
published 3.0.0 •

Changelog

Source

3.0.0 - 2023-07-09

Added

  • Accept iterables and async iterables and not just arrays
  • add performance testing script in performance directory: this is helpful to detect whether the promise pool is significantly slower than Promise.all

Updated

Breaking Changes

  • require Node.js v16
  • require ecmaScript 2021
  • the pool.items() method changed from the narrower type T[] to the wider type T[] | Iterable<T> | AsyncIterable<T> which might be a breaking change for your code base
marcuspoehls
published 2.4.0 •

Changelog

Source

2.4.0 - 2023-02-10

Added

Updated

  • bump dependencies
  • refined types when a promise or non-promise resuult will be handled
marcuspoehls
published 2.3.2 •

Changelog

Source

2.3.2 - 2022-08-05

Fixed

  • remove active task after handling the result or error #51
    • we previously removed the active tasks before handling the result or error, which caused the pool to pick up the next task too early
marcuspoehls
published 2.3.1 •

Changelog

Source

2.3.1 - 2022-08-05

Updated

  • bump dependencies

Fixed

  • stop processing items after throwing an error from inside the pool.handleError() method #51
marcuspoehls
published 2.3.0 •

Changelog

Source

2.3.0 - 2022-06-08

Added

  • pool.useConcurrency(<num>): adjust the concurrency of a running pool

Updated

  • bump dependencies
marcuspoehls
published 2.2.0 •

Changelog

Source

2.2.0 - 2022-05-20

Added

  • pool.onTaskStarted((item, pool) => { … }): configure a callback that runs when an item is about to be processed
  • pool.onTaskFinished((item, pool) => { … }): configure a callback that runs when an item finished processing

Updated

  • bump dependencies
marcuspoehls
published 2.1.0 •

Changelog

Source

2.1.0 - 2021-12-14

Added

  • keep the original error in error.raw
    • this is useful if your errors store some kind of context
    • the PromisePoolError instance would otherwise loose the original error context
class CustomError extends Error { … }

const { errors } = await PromisePool
  .withConcurrency(2)
  .for([1, 2, 3])
  .process(() => {
    throw new CustomError('Oh no')
  })

errors[0].raw instanceof CustomError
// true

Updated

  • bump dependencies
  • run tests for Node.js v17
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc