@supercharge/promise-pool
Advanced tools
Changelog
3.1.0 - 2023-09-25
pool.handleError
after pool.for
: previously the error handler was lostChangelog
3.0.0 - 2023-07-09
performance
directory: this is helpful to detect whether the promise pool is significantly slower than Promise.all
Error.captureStackTrace
only when availableecmaScript
2021pool.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 baseChangelog
2.1.0 - 2021-12-14
error.raw
PromisePoolError
instance would otherwise loose the original error contextclass 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