synckit

Perform async work synchronously in Node.js using `worker_threads` with first-class TypeScript and Yarn P'n'P support.

MIT License

Downloads
41.3M
Stars
153
Committers
10

Bot releases are visible (Hide)

synckit - v0.9.0 Latest Release

Published by JounQin 10 months ago

Minor Changes

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

Patch Changes

synckit - v0.8.8

Published by JounQin 10 months ago

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: https://github.com/un-ts/synckit/compare/v0.8.7...v0.8.8

synckit - v0.8.7

Published by JounQin 10 months ago

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: https://github.com/un-ts/synckit/compare/v0.8.6...v0.8.7

synckit - v0.8.6

Published by JounQin 11 months ago

Patch Changes

synckit - v0.8.5

Published by JounQin over 1 year ago

Patch Changes

synckit - v0.8.4

Published by github-actions[bot] about 2 years ago

Patch Changes

synckit - v0.8.3

Published by github-actions[bot] about 2 years ago

Patch Changes

synckit - v0.8.2

Published by github-actions[bot] about 2 years ago

Patch Changes

synckit - v0.8.1

Published by github-actions[bot] over 2 years ago

Patch Changes

synckit - v0.8.0

Published by JounQin over 2 years ago

0.8.0

Minor Changes

0.7.3

Patch Changes

synckit - v0.7.2

Published by JounQin over 2 years ago

0.7.2

Patch Changes

  • 1101ede Thanks @JounQin! - chore: add donate and funding fields, update node engine field
synckit - v0.7.1

Published by JounQin over 2 years ago

0.7.1

Patch Changes

  • f098d29 Thanks @JounQin! - fix: known Windows issues

  • c53d9dc Thanks @JounQin! - feat: use workerPath as URL for Windows

    related mdx-js/eslint-mdx#389

synckit - v0.7.0

Published by JounQin over 2 years ago

0.7.0

Minor Changes

synckit - v0.6.1

Published by JounQin over 2 years ago

0.6.1

Patch Changes

synckit - v0.6.0

Published by github-actions[bot] about 3 years ago

Minor Changes

synckit - v0.5.0

Published by github-actions[bot] about 3 years ago

Minor Changes

synckit - v0.4.0

Published by github-actions[bot] about 3 years ago

Minor Changes

synckit - v0.3.3

Published by JounQin over 3 years ago

Patch Changes

synckit - v0.3.2

Published by JounQin over 3 years ago

Patch Changes

synckit - v0.3.1

Published by JounQin over 3 years ago

Patch Changes