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

Comparing version 0.3.3 to 0.3.4

7

lib/es2015.js

@@ -50,5 +50,10 @@ import { execSync } from 'child_process';

workerThreads = require("worker_threads");
if (typeof workerThreads.receiveMessageOnPort !== "function") {
workerThreads = void 0;
}
} catch (e) {
console.warn("`worker_threads` is not available in current environment, `Node >= 12` is required");
}
if (!workerThreads) {
console.warn("[synckit]: `worker_threads` or `receiveMessageOnPort` is not available in current environment, `Node >= 12` is required");
}
const { SYNCKIT_WORKER_THREADS, SYNCKIT_BUFFER_SIZE, SYNCKIT_TIMEOUT } = process.env;

@@ -55,0 +60,0 @@ const useWorkerThreads = !!workerThreads && (!SYNCKIT_WORKER_THREADS || !["0", "false"].includes(SYNCKIT_WORKER_THREADS));

11

lib/index.js

@@ -19,6 +19,11 @@ "use strict";

workerThreads = require('worker_threads');
/* istanbul ignore if */
if (typeof workerThreads.receiveMessageOnPort !== 'function') {
workerThreads = undefined;
}
}
catch (_a) {
/* istanbul ignore next */
console.warn('`worker_threads` is not available in current environment, `Node >= 12` is required');
catch (_a) { }
/* istanbul ignore if */
if (!workerThreads) {
console.warn('[synckit]: `worker_threads` or `receiveMessageOnPort` is not available in current environment, `Node >= 12` is required');
}

@@ -25,0 +30,0 @@ const { SYNCKIT_WORKER_THREADS, SYNCKIT_BUFFER_SIZE, SYNCKIT_TIMEOUT } = process.env;

{
"name": "synckit",
"version": "0.3.3",
"version": "0.3.4",
"description": "Perform async work synchronously in Node.js using `worker_threads`, or `child_process` as fallback, with first-class TypeScript support.",

@@ -5,0 +5,0 @@ "repository": "git+https://github.com/rx-ts/synckit.git",

Sorry, the diff of this file is not supported yet

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