Skip to content

Releases: un-ts/synckit

v0.9.0

04 Jan 05:43
68ae060
Compare
Choose a tag to compare

Minor Changes

  • #154 2541a1e Thanks @onigoetz! - feat!: use a single SharedArrayBuffer, remove useless bufferSize option

Patch Changes

v0.8.8

26 Dec 15:40
51e4136
Compare
Choose a tag to compare

Patch Changes

  • #148 7b6a0eb Thanks @JounQin! - feat: migrate @pkgr/utils to lite @pkgr/core - This will make the whole package much more smaller

Full Changelog: v0.8.7...v0.8.8

v0.8.7

26 Dec 03:13
c5eaca3
Compare
Choose a tag to compare

Patch Changes

  • #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: v0.8.6...v0.8.7

v0.8.6

01 Dec 21:00
5a132ea
Compare
Choose a tag to compare

Patch Changes

v0.8.5

28 Jan 08:03
b7be102
Compare
Choose a tag to compare

Patch Changes

New Contributors

Full Changelog: v0.8.4...v0.8.5

v0.8.4

29 Aug 14:45
3932e04
Compare
Choose a tag to compare

Patch Changes

v0.8.3

10 Aug 17:57
dba496d
Compare
Choose a tag to compare

Patch Changes

Full Changelog: v0.8.2...v0.8.3

v0.8.2

10 Aug 00:57
0f5cbfb
Compare
Choose a tag to compare

Patch Changes

Full Changelog: v0.8.1...v0.8.2

v0.8.1

16 Jul 09:49
3584218
Compare
Choose a tag to compare

Patch Changes

v0.8.0

16 Jul 08:32
784f249
Compare
Choose a tag to compare

0.8.0

Minor Changes

0.7.3

Patch Changes