Socket
Socket
Sign inDemoInstall

synckit

Package Overview
Dependencies
2
Maintainers
2
Versions
33
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install
234Next

0.9.0

Diff

Changelog

Source

0.9.0

Minor Changes

Patch Changes

jounqin
published 0.8.8 •

Changelog

Source

0.8.8

Patch Changes

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

Changelog

Source

0.8.7

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
      ],
    })
    
jounqin
published 0.8.6 •

Changelog

Source

0.8.6

Patch Changes

jounqin
published 0.8.5 •

Changelog

Source

0.8.5

Patch Changes

jounqin
published 0.8.4 •

Changelog

Source

0.8.4

Patch Changes

jounqin
published 0.8.3 •

Changelog

Source

0.8.3

Patch Changes

jounqin
published 0.8.2 •

Changelog

Source

0.8.2

Patch Changes

jounqin
published 0.8.1 •

Changelog

Source

0.8.1

Patch Changes

jounqin
published 0.8.0 •

Changelog

Source

0.8.0

Minor Changes

  • #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

    • https://github.com/TypeStrong/ts-node
    • https://github.com/egoist/esbuild-register
    • https://github.com/folke/esbuild-runner
    • https://github.com/esbuild-kit/tsx

    Feel free to PR to add more runner support like swc if you want

234Next
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc