NewYour coding agent can read the release notes before it upgrades.Set up the MCP server →
npm, #861 most downloaded on npm
Perform async work synchronously in Node.js using `worker_threads` with first-class TypeScript support.
Latest stable
0.12.3
Last release 1 months ago
11 Oct 2026
Release timing varies
gaps range from 2 weeks to 6 months
Nearly every release is documented
notes for 56 of 58 stable releases
Nothing withdrawn
no release was ever pulled
6 years old
58 releases · first in 2021
Drag across the ruler to compare, or tap a release to open it.
### Patch Changes - #282 `d9febd8` Thanks @JounQin! - Restore the npm provenance attestation on releases. changesets 3 publishes Yarn projects with ya
d9febd8 Thanks @JounQin! - Restore the npm provenance attestation on releases. changesets 3 publishes Yarn projects with yarn npm publish, which only writes a provenance statement when npmPublishProvenance (or publishConfig.provenance) asks for it, so 0.12.0 onwards shipped without npm's "Built and signed with provenance" badge.### Patch Changes - #280 `7d87fd3` Thanks @JounQin! - Fix workers never starting under Yarn PnP since v0.12: the failure guard (register.cjs) was prel
Your coding agent can read these notes before it upgrades. Set up the MCP server →
7d87fd3 Thanks @JounQin! - Fix workers never starting under Yarn PnP since v0.12: the failure guard (register.cjs) was preloaded ahead of the PnP API require inherited from Yarn, but the guard lives inside the project's package archive and cannot be read until .pnp.cjs has patched module resolution. The worker then died at startup with nothing left to report it, so every createSyncFn call waited in Atomics.wait() until its timeout. Under PnP the worker's NODE_OPTIONS now opens with the PnP API require and the guard follows it; every other inherited preload still loads after the guard, and the "already inherited" check scans the whole value so a nested worker does not add a second guard.### Patch Changes - #276 `5d741f2` Thanks @git-credential-broker! - Use node-fetch-native for the default global fetch shim instead of node-fetch: it
5d741f2 Thanks @git-credential-broker! - Use node-fetch-native for the default global fetch shim instead of node-fetch: it is a dual ESM/CommonJS package that prefers the native fetch and only falls back to its own implementation, so the shim is no longer tied to the CommonJS-only node-fetch v2. The shim imports the named fetch export, because require('node-fetch-native') is the module namespace rather than the function. If you enable SYNCKIT_GLOBAL_SHIMS, install node-fetch-native instead of node-fetch.A worker that never answers no longer leaves its caller blocked: a module graph that fails to load (a missing top-level import, a syntax error, a fail
#265 523e75c Thanks @JounQin! - feat: surface worker failures and exits instead of hanging forever in Atomics.wait()
A worker that never answers no longer leaves its caller blocked: a module graph that fails to load (a missing top-level import, a syntax error, a failing global shim), a throw after a top-level await, a runtime failure while a call is in flight, and a worker that exits — through a handler that calls process.exit(), or on its own — are all reported to the caller instead.
The guard now reaches a worker through its own NODE_OPTIONS rather than its execArgv, so it is in place before a preload the worker inherits from NODE_OPTIONS, which run first: a failure there reaches the caller like any other instead of being left to the call's deadline, or to no deadline at all. The worker's environment is passed explicitly to do that, and its NODE_OPTIONS keeps whatever it inherited, after the preload. A runtime that refuses that environment — Node 18 with --openssl-legacy-provider, Node 24 with --title, the set varies by version — makes the worker fall back to the inherited environment with the guard in its execArgv instead, so the guard loads after preloads inherited through NODE_OPTIONS and a failure in one of those is reported by nothing. synckit warns once per worker that takes that path, under the SYNCKIT_GUARD_ORDERING code, so the caller can bound the wait themselves with SYNCKIT_TIMEOUT or a timeout passed per call.
This changes the failure semantics, which is why it is a minor. A call that used to hang now throws; a worker that swallows the failure in its own handler no longer lets the call in flight return normally; and a worker that fails fatally no longer takes the process down with it — the caller gets the failure instead, and later calls keep throwing it.
A worker which reached runAsWorker and still has a handler for the event keeps serving later calls: the guard reports the failure and re-arms rather than deciding for that handler, so the worker stays usable — it does not mean the handler ran. For a rejection, the guard's own unhandledRejection listener is what keeps the runtime from promoting it under the default throw mode, so a handler listening only on uncaughtException never sees it; under strict the runtime promotes it anyway, and that handler does see it. Otherwise the failure is fatal for that synchronous function, and later calls keep throwing it rather than waiting on a worker which never registered, or which has nothing left to keep it alive.
A recoverable failure only tells the caller that the worker can still serve; it does not stop the request that was in flight. A worker whose own handler absorbs the failure may still be running that request, so a retry can overlap it — a worker module holding state across calls has to expect that.
The timeout is now a single deadline for the whole call, and each wait receives only the time left of it. Previously every wait measured its own slice, so the time spent between waits was not counted and outdated responses could push the total wait past the timeout.
The module specifiers encodeImportModule generates are escaped with JSON.stringify now — double quotes and full escaping — where a single-quoted literal escaped only backslashes and quotes, so a path carrying a newline or another control character is emitted correctly instead of breaking the generated source.
Breaking: the INT32_BYTES export is gone. It was reachable from the public entry point — src/index.ts re-exports the whole constants module — so an import of it that compiles on main no longer compiles here. Nothing in the package used it, and the release stays a minor under the 0.x convention rather than a major.
The hasFlag utility now reads the flags the runtime applies — execArgv and NODE_OPTIONS, in either the --flag=value or --flag value form — and no longer counts a flag that is only a script argument, which Node does not apply. NODE_OPTIONS is now read the way the runtime reads it: split on spaces, with double quotes grouping and removed and a backslash escaping inside them, so a quoted value keeps its spaces and an unset variable is [] where a naive split gave [''].
DataMessage<T> is now a discriminated union whose failure arm requires error, so a reason that is present but undefined is still a failure rather than a result, and properties on that arm is typed object instead of unknown.
A reported failure carries the worker's reason exactly as it was thrown, even a falsy one; when its properties cannot cross the thread boundary the error is sent bare, and only a reason that cannot be cloned at all is replaced by a synthetic error that still names it.
0086192 Thanks @JounQin! - Resolve global shims from the worker for both CommonJS and ESM: the CommonJS eval entry rebinds require to createRequire(workerPath), and the ESM entry resolves each shim against the worker's path and export conditions — @dual-bundle/import-meta-resolve under node_modules, pnpapi under Yarn PnP — and imports it as an absolute URL, instead of loading a generated file under the package's own node_modules. Availability is judged with that same resolver, and the conditions follow the worker's execArgv (node-addons, module-sync, --conditions) as well as this thread's.### Patch Changes - #258 `e752c6a` Thanks @JounQin! - fix(deps): update dependency @pkgr/core
@clemyan made their first contribution in https://github.com/un-ts/synckit/pull/255
Revert "fix(deps): update dependency @pkgr/core to ^0.3.0 (https://github.com/un-ts/synckit/pull/249)"
Revert "fix(deps): update dependency @pkgr/core to ^0.3.0 (https://github.com/un-ts/synckit/pull/249)"
Full Changelog: https://github.com/un-ts/synckit/compare/v0.11.10...v0.11.11
### Patch Changes - #249 `173ef5e` Thanks @renovate! - fix(deps): update dependency @pkgr/core to ^0.3.0 Full Changelog: https://github.com/un-ts/sync
### Patch Changes - #246 `a5cf309` Thanks @JounQin! - fix: republish as npm latest tag version Full Changelog: https://github.com/un-ts/synckit/compar
### Patch Changes - #217 `2a3f936` Thanks @fisker and @JounQin! - fix: unexpected null pointer exception due to race condition Full Changelog: https:/
### Patch Changes - #240 `e0caff5` Thanks @JounQin! - refactor: target ES2020 to drop tslib dependency Full Changelog: https://github.com/un-ts/syncki
### Patch Changes - #235 `abdb67a` Thanks @JounQin! - fix: use tsdown to bundle cjs outputs Full Changelog: https://github.com/un-ts/synckit/compare/v
### Patch Changes - #232 `18e6cd4` Thanks @JounQin! - fix: remove buggy module-sync entry Full Changelog: https://github.com/un-ts/synckit/compare/v0.
### Patch Changes - #228 `cc7c724` Thanks @JounQin! - fix: legacy top level types entry should prefer .d.cts Full Changelog: https://github.com/un-ts/
### Patch Changes - #226 `133408d` Thanks @JounQin! - fix: .cts should never be treated as esm Full Changelog: https://github.com/un-ts/synckit/compar
### Patch Changes - #224 `0966d2a` Thanks @JounQin! - fix: add missing MessageChannel from node:worker_threads for Node 14 compatibility Full Changelo
### Minor Changes - #222 `59f7432` Thanks @JounQin! - feat: add oxc ts runner support, correct swc ts runner with --import flag support ### Patch Chan
59f7432 Thanks @JounQin! - feat: add oxc ts runner support, correct swc ts runner with --import flag support#222 59f7432 Thanks @JounQin! - fix: .cjs should never be treated as ESM
#219 79fa3a2 Thanks @JounQin! - refactor: split into chunk files, add module-sync entry
#222 59f7432 Thanks @JounQin! - fix: only consider process.features.typescript when --no-experimental-strip-types flag enabled
Full Changelog: https://github.com/un-ts/synckit/compare/v0.10.3...v0.11.0
### Patch Changes - #245 `bc77666` Thanks @JounQin! - fix: unexpected null pointer exception due to race condition Full Changelog: https://github.com/
### Patch Changes - #214 `386bfb9` Thanks @fisker! - chore: improve performance on first run Full Changelog: https://github.com/un-ts/synckit/compare/
### Minor Changes - #206 `011e9c0` Thanks @JounQin! - refactor: simplify types, any function should be accepted - #210 `888302c` Thanks @JounQin! - fe
#206 011e9c0 Thanks @JounQin! - refactor: simplify types, any function should be accepted
#211 19f9a78 Thanks @JounQin! - feat: support node runner by default for Node 22.6+
#213 0d168d7 Thanks @JounQin! - feat: support stdio overriding in worker, what means stdio will be streamed in correct order now
#208 d3da4c3 Thanks @JounQin! - feat: support file url worker path
Full Changelog: https://github.com/un-ts/synckit/compare/v0.10.1...v0.10.2
### Patch Changes - #204 `e13a68a` Thanks @nwidynski! - fix: add support for type transformations to node runner, clarify correct Node versions suppor
Introducing the node runner, which will replace ts-node as the new default:
#199 7a5f1bd Thanks @nwidynski! - feat: add support for --experimental-strip-types
Introducing the node runner, which will replace ts-node as the new default:
--experimental-strip-types
flag enabled via NODE_OPTIONS env or cli args--no-experimental-strip-types
flag enabled via NODE_OPTIONS env or cli argsAn error will be thrown when attempting to run with node on unsupported versions (<22).
On these versions, the default runner remains ts-node when available.
Full Changelog: https://github.com/un-ts/synckit/compare/v0.9.2...v0.10.0
### Patch Changes - #243 `5147bd2` Thanks @JounQin! - fix: unexpected null pointer exception due to race condition
@jedlikowski made their first contribution in https://github.com/un-ts/synckit/pull/184
@fmal made their first contribution in https://github.com/un-ts/synckit/pull/175
@onigoetz made their first contribution in https://github.com/un-ts/synckit/pull/154
2541a1e Thanks @onigoetz! - feat!: use a single SharedArrayBuffer, remove useless bufferSize optionFull Changelog: https://github.com/un-ts/synckit/compare/v0.8.8...v0.9.0
### Patch Changes - #148 `7b6a0eb` Thanks @JounQin! - feat: migrate @pkgr/utils to lite @pkgr/core - This will make the whole package much more smalle
You can also pass a custom globalShims option as GlobalShim Array to custom your own shims:
#145 b2affa0 Thanks @JounQin! - feat: add new globalShims option, what means you can env SYNCKIT_GLOBAL_SHIMS=1 to enable auto polyfilling for some modules, for example: fetch from node-fetch, performance from node:perf_hooks.
You can also pass a custom globalShims option as GlobalShim Array to custom your own shims:
export interface GlobalShim {
moduleName: string
/**
* `undefined` means side effect only
*/
globalName?: string
/**
* 1. `undefined` or empty string means `default`, for example:
* ```js
* import globalName from 'module-name'
* ```
*
* 2. `null` means namespaced, for example:
* ```js
* import * as globalName from 'module-name'
* ```
*
*/
named?: string | null
/**
* If not `false`, the shim will only be applied when the original `globalName` unavailable,
* for example you may only want polyfill `globalThis.fetch` when it's unavailable natively:
* ```js
* import fetch from 'node-fetch'
*
* if (!globalThis.fetch) {
* globalThis.fetch = fetch
* }
* ```
*/
conditional?: boolean
}
You can aslo reuse the exported DEFAULT_GLOBAL_SHIMS_PRESET for extanding:
import { DEFAULT_GLOBAL_SHIMS_PRESET, createSyncFn } from 'synckit'
const syncFn = createSyncFn(require.resolve('./worker'), {
globalShims: [
...DEFAULT_GLOBAL_SHIMS_PRESET,
// your own shim here
],
})
Full Changelog: https://github.com/un-ts/synckit/compare/v0.8.6...v0.8.7
### Patch Changes - #141 `608c9d9` Thanks @JounQin! - fix: only fallback to ts-node when it's available - close #128 - #142 `097e5cd` Thanks @JounQin!
@krossekrabbe made their first contribution in https://github.com/un-ts/synckit/pull/126
### Patch Changes - #109 `b61087f` Thanks @JounQin! - fix: incorrect extractProperties typings for known object
### Patch Changes - #106 `9f27ff9` Thanks @JounQin! - feat: add swc (@swc-node/register) support out of box - #103 `b1308ac` Thanks @noahnu! - fix: pa
### Patch Changes - #98 `4fe6aef` Thanks @noahnu! - feat: support yarn PnP out of box, propagate PnP runtime - #97 `d1bed37` Thanks @noahnu! - fix: ty
#98 4fe6aef Thanks @noahnu! - feat: support yarn PnP out of box, propagate PnP runtime
#97 d1bed37 Thanks @noahnu! - fix: typo of SYNCKIT_EXEC_ARGV environment variable
#101 34e44ae Thanks @JounQin! - feat: propagate sync errors from worker
Full Changelog: https://github.com/un-ts/synckit/compare/v0.8.1...v0.8.2
### Patch Changes - #92 `396e964` Thanks @JounQin! - fix: better compatibility on Node 14
https://github.com/TypeStrong/ts-node
#90 ffcf174 Thanks @JounQin! - build!: drop Node 12 support, remove testing on Node 14
#90 ffcf174 Thanks @JounQin! - feat: support more ts runners for TypeScript files
Feel free to PR to add more runner support like swc if you want
### Patch Changes - #88 `f9d0c3e` Thanks @JounQin! - feat: support map cjs to cts, mjs to mts automatically
`1101ede` Thanks @JounQin! - chore: add donate and funding fields, update node engine field
`f098d29` Thanks @JounQin! - fix: known Windows issues
## 0.7.0 ### Minor Changes - #78 `fd85ccd` Thanks @JounQin! - feat: support js as ts, ts as esm, etc
### Patch Changes - #76 `e7393f1` Thanks @JounQin! - chore: export extractProperties
`da19076` Thanks @JounQin! - fix: extract and apply error properties
`18106a5` Thanks @JounQin! - feat: add custom execArgv support
### Minor Changes - #47 `a362982` Thanks @JounQin! - feat: drop child_process
Nothing published for this version
### Minor Changes - #45 `f38de5f` Thanks @JounQin! - feat: use native esm
### Patch Changes - #39 `0698572` Thanks @JounQin! - fix: test whether receiveMessageOnPort available for --experimental-worker
### Patch Changes - #37 `4ae675a` Thanks @JounQin! - fix: worker_threads API changes a lot
### Patch Changes - #35 `578db5b` Thanks @JounQin! - fix: improve compatibility with node >=8.10 <12.11
### Patch Changes - #34 `255736c` Thanks @JounQin! - fix: worker_threads is only available on Node 12 - #32 `d84e48e` Thanks @JounQin! - fix(types): s
### Minor Changes - #27 `2809da0` Thanks @JounQin! - feat: add more env variables support
### Minor Changes - #23 `6577e86` Thanks @JounQin! - feat: use worker_threads by default for performance
`b3e9760` Thanks @JounQin! - feat: support custom TSCONFIG_PATH env
fix: use npm run release for clean-publish
fix: use npm run release for clean-publish
### Patch Changes - #9 `cad2e05` Thanks @JounQin! - fix: try to fix clean-publish + changeset publish again
Nothing published for this version
### Patch Changes - #7 `0336c22` Thanks @JounQin! - fix: try to fix clean-publish + changeset publish
### Patch Changes - #5 `e451004` Thanks @JounQin! - fix: improve type definitions, mark tslib as dep
`e7446f9` Thanks @JounQin! - feat: first blood, should just work
One column per quarter.