synckit
0.12.3 · 11 Oct 2026MIT64.6M / weekRepositorynpmAtom feed
Your version
0.12.3 is the newest release of 0.8.x.
In short
1 new
Release note
Patch Changes
Add new
globalShimsoption, what means you can envSYNCKIT_GLOBAL_SHIMS=1to enable auto polyfilling for some modules, for example:fetchfromnode-fetch,performancefromnode:perf_hooks.You can also pass a custom
globalShimsoption asGlobalShimArrayto 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_PRESETfor extanding:import { DEFAULT_GLOBAL_SHIMS_PRESET, createSyncFn } from 'synckit' const syncFn = createSyncFn(require.resolve('./worker'), { globalShims: [ ...DEFAULT_GLOBAL_SHIMS_PRESET, // your own shim here ], })
A whole project to check? Paste its package.json in the dependency check: every deprecated, outdated or vulnerable dependency, with what to upgrade to. Free, no account.