NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm · #2399 most downloaded on npm
Offload tasks to a pool of workers on node.js and in the browser
Last release 3 months ago
01 Jul 2026
Release timing varies
gaps range from 3 weeks to 8 months
Nearly every release is documented
notes for 60 of the last 60 stable releases
Nothing withdrawn
no release was ever pulled
12 years old
72 releases · first in 2014
Fix: #548 treat worker as busy while cleaning up canceled task (#549). Thanks @joshkel.
chore: publish v10.0.2
chore: publish v10.0.2
One column per quarter.
chore: publish v10.0.1
chore: publish v10.0.1
WorkerHandler resilient against errors without message
property.chore: publish v10.0.0
chore: publish v10.0.0
BREAKING CHANGES:
queueStrategy option (FIFO / LIFO / custom) (#518, #517).
This is a new feature without changes in the public API, but the internal
property pool.tasks is changed into pool.taskQueue. So, changes are
required if you rely on this internal property. Thanks @amaneru55TerminateError class to differentiate between a
crash and a regular error (see #519, #520). The TerminateError class
extends from the class Error so no breaking changes in that regard.
But some of the error messages are changed so if you have code that depends
on the exact error messages you may need to change your code accordingly.
Thanks @Julusian.Fix: #516 improve error handling for errors containing nested classes by using their .toJSON method when available.
.toJSON method when available.Fix: #479 terminate worker even if abortListener resolved (#507). Thanks @joshLong145.
Fix: #505 npm package missing /src/generated/ files.
/src/generated/ files.Fix: #505 npm package missing /src/generated/ files.
/src/generated/ files.Feat: support for events and std streams to parents from an abort handler (#478). Thanks @joshLong145.
chore: publish v9.2.0
chore: publish v9.2.0
Promise.finally() on the custom promise class (#388).
Thanks @joshLong145 and @wmertens.vite example not working (#461). Thanks @datashaman.Fix transferring from the worker (#455). Thanks @LeonidPolukhin.
Fix: #446 ensure the library can be used with older browsers.
Fix: events not emitted when using (#439). Thanks @t0oF-azpn.
Support capturing the stdout/stderr streams from the workers (#425, #423). Thanks @cpendery.
Improve the logic to detect the Node.js platform (#421). Thanks @tamuratak.
Improve types: unwrap Promise types (#419). Thanks @joshkel.
Export the Proxy type (see #417). Thanks @tamuratak.
Proxy type (see #417). Thanks @tamuratak.Promise type definition (see #417). Thanks @tamuratak.Export the types Pool, WorkerPoolOptions, and WorkerRegisterOptions, see #416. Thanks @joshkel.
Pool, WorkerPoolOptions, and WorkerRegisterOptions,
see #416. Thanks @joshkel.BREAKING CHANGE: the library now comes with TypeScript type definitions included. There may be minor differences between the new, embedded type defini…
BREAKING CHANGE: the library now comes with TypeScript type definitions
included. There may be minor differences between the new, embedded type
definitions and the implementation from @types/workerpool that was needed
before. For example, type WorkerPool is called type Pool now.
BREAKING CHANGE: the library now throws an Error when passing unknown or inherited properties for workerOpts, workerThreadOpts and forkOpts.
BREAKING CHANGE: the library now throws an Error when passing unknown or
inherited properties for workerOpts, workerThreadOpts and forkOpts.
workerOpts, workerThreadOpts and forkOpts to protect against
security issues related to prototype pollution
(see ea5368c5e53d97120b952ffad151a318c1ff073c).BREAKING CHANGE: The setup to bundle workerpool has been replaced. This should be a drop-in replacement, but it may have impact depending on your setu…
BREAKING CHANGE: The setup to bundle workerpool has been replaced. This should
be a drop-in replacement, but it may have impact depending on your setup.
Fix: workerThreadOpts not working when workerType: auto, see #357.
workerThreadOpts not working when workerType: auto, see #357.Implement support for passing options to web workers constructors (#400,
Fix: a bug in the timeout of termination (#395, #387). Thanks @Michsior14.
Fix: worker termination before it's ready (#394, #387). Thanks @Michsior14.
Support transferable objects (#3, #374). Thanks @Michsior14.
onTerminate at the worker side, which can be used
to clean up resources, and an option workerTerminateTimeout which forcefully
terminates a worker if it doesn't finish in time (#353, #377).
Thanks @Michsior14.workerThreadOpts to the onTerminateWorker callback (#376).
Thanks @Michsior14.Fix #318: debug ports not being released when terminating a pool.
Implement option workerThreadOpts to pass options to a worker of type thread, a worker_thread (#357, fixes #356). Thanks @galElmalah.
workerThreadOpts to pass options to a worker of type
thread, a worker_thread (#357, fixes #356). Thanks @galElmalah.Fix #343: .terminate() sometimes throwing an exception.
.terminate() sometimes throwing an exception.Implement callbacks onCreateWorker and onTerminateWorker. Thanks @forty.
onCreateWorker and onTerminateWorker. Thanks @forty.Fix v6.1.4 not being marked as latest anymore on npm due to bug fix release v2.3.4.
Fix terminating a pool throwing an error when used in the browser. Regression introduced in v6.1.3.
v6.1.3.Fix #147: disregard messages from terminated workers. Thanks @hhprogram and @Madgvox.
Fix #253, add ./src again in the published npm package, reverting the change in v6.1.1 (see also #243).
./src again in the published npm package, reverting the change
in v6.1.1 (see also #243).Remove redundant ./src folder from the published npm package, see #243. Thanks @Nytelife26.
./src folder from the published npm package, see #243.
Thanks @Nytelife26.Implemented support for sending events from the worker to the main thread, see #51, #227. Thanks @Akryum.
workerpool not working on IE 10.Make evaluation of offloaded functions a bit more secure by using new Function instead of eval. Thanks @tjenkinson.
new Function instead of eval. Thanks @tjenkinson.Fixes and more robustness in terminating workers. Thanks @boneskull.
Fix #32, #175: the promise returned by Pool.terminate() now waits until subprocesses are dead before resolving. Thanks @boneskull.
Pool.terminate() now waits until
subprocesses are dead before resolving. Thanks @boneskull.Removed examples from the npm package. Thanks @madbence.
BREAKING CHANGE: the library entry points are changed and new source maps are added. This may have impact on your project depending on your setup.
BREAKING CHANGE: the library entry points are changed and new source maps are added. This may have impact on your project depending on your setup.
options.nodeWorker (renamed to
options.workerType) and pool.clear() (renamed to pool.terminate()).Fixed #121: isMainThread not working when using worker_threads.
isMainThread not working when using worker_threads.Fixed library not working in the browser. See #106.
Fixed environment detection in browser. See #106. Thanks @acgrid.
Fixed #96: WorkerPool not cancelling any pending tasks on termination.
Deprecated option nodeWorker and created a new, more extensive option workerType giving full control over the selected type of worker. Added new optio…
nodeWorker and created a new, more extensive option
workerType giving full control over the selected type of worker.
Added new option 'web' to enforce use a Web Worker. See #85, #74.workerType is changed from
'process' to 'thread'. See #85, #50.browser or node), fixing wrong
detection in a Jest test environment. See #85.Bundled library changed due to the upgrade to Webpack 4. This could possibly lead to breaking changes.
--max-old-space-size to child processes. Thanks @patte.child_process and worker_threads.
See #43.maxQueueSize. Thanks @colomboe.minWorkers: 'max' not using the configured maxWorkers.nodeWorker to workers initialized when creating a pool.
Thanks @spacelan.lib to src.Improved error message when a node.js worker unexpectedly exits (see #58). Thanks @stefanpenner.
Improved error message when a node.js worker unexpectedly exits (see #58). Thanks @stefanpenner.
Allocate debug ports safely, this fixes an issue cause workers to exit
unexpectedly if more then one worker pool is active, and the process is
started with a debugger (node debug or node --inspect).
Thanks @stefanpenner.
Fix option nodeWorker: 'auto' not using worker threads when available. Thanks @stefanpenner.
nodeWorker: 'auto' not using worker threads when available.
Thanks @stefanpenner.Implemented support for using worker_threads in Node.js, via the new option nodeWorker: 'thread'. Thanks @stefanpenner.
worker_threads in Node.js, via the new option
nodeWorker: 'thread'. Thanks @stefanpenner.Enable usage in ES6 Webpack projects.
Backport fix for Node.js 16, see #309. Thanks @mansona.
Fixed space in license field in package.json. Thanks @sagotsky.
package.json. Thanks @sagotsky.Add licence field to package.json. Thanks @greyd.
package.json. Thanks @greyd.Fixed bug where tasks that are cancelled in a Pool's queue causes following tasks to not run. Thanks @greemo.
New method Pool.terminate(force, timeout) which will replace Pool.clear(force). Thanks @jimsugg.
Pool.terminate(force, timeout) which will replace
Pool.clear(force). Thanks @jimsugg.Fixed a debug issue: look for --inspect within argument strings, instead of exact match. Thanks @jimsugg.
--inspect within argument strings,
instead of exact match. Thanks @jimsugg.Updated all examples to neatly include .catch(...) callbacks.
.catch(...) callbacks.Fixed #25: timer of a timeout starting when the task is created instead of when the task is started. Thanks @eclipsesk for input.
Fixed #2 and #19: support for debugging child processes. Thanks @tptee.
Your coding agent can read these notes before it upgrades. Set up the MCP server →