Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

threads

Package Overview
Dependencies
Maintainers
1
Versions
73
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

threads - npm Package Compare versions

Comparing version 1.6.5 to 1.7.0

6

dist-esm/master/implementation.node.js

@@ -7,2 +7,3 @@ /// <reference lib="dom" />

import * as path from "path";
import { fileURLToPath } from "url";
let tsNodeAvailable;

@@ -49,3 +50,6 @@ export const defaultPoolSize = cpus().length;

const rawCallerPath = parentCallSite ? parentCallSite.getFileName() : null;
const callerPath = rawCallerPath ? rawCallerPath.replace(/^file:\//, "") : null;
let callerPath = rawCallerPath ? rawCallerPath : null;
if (callerPath && callerPath.startsWith('file:')) {
callerPath = fileURLToPath(callerPath);
}
const rebasedScriptPath = callerPath ? path.join(path.dirname(callerPath), scriptPath) : scriptPath;

@@ -52,0 +56,0 @@ return rebasedScriptPath;

@@ -32,2 +32,3 @@ "use strict";

const path = __importStar(require("path"));
const url_1 = require("url");
let tsNodeAvailable;

@@ -74,3 +75,6 @@ exports.defaultPoolSize = os_1.cpus().length;

const rawCallerPath = parentCallSite ? parentCallSite.getFileName() : null;
const callerPath = rawCallerPath ? rawCallerPath.replace(/^file:\//, "") : null;
let callerPath = rawCallerPath ? rawCallerPath : null;
if (callerPath && callerPath.startsWith('file:')) {
callerPath = url_1.fileURLToPath(callerPath);
}
const rebasedScriptPath = callerPath ? path.join(path.dirname(callerPath), scriptPath) : scriptPath;

@@ -77,0 +81,0 @@ return rebasedScriptPath;

5

dist/types/master.d.ts

@@ -46,3 +46,4 @@ /// <reference lib="dom" />

postMessage(value: any, transferList?: TransferList): void;
terminate(callback?: (error?: Error, exitCode?: number) => void): void;
/** In nodejs 10+ return type is Promise while with tiny-worker and in browser return type is void */
terminate(callback?: (error?: Error, exitCode?: number) => void): void | Promise<number>;
}

@@ -70,3 +71,3 @@ export interface ThreadsWorkerOptions extends WorkerOptions {

postMessage(value: any, transferList?: TransferList): void;
terminate(): void;
terminate(): void | Promise<number>;
}

@@ -73,0 +74,0 @@ /** Class to spawn workers from a blob or source string. */

{
"name": "threads",
"version": "1.6.5",
"version": "1.7.0",
"description": "Web workers & worker threads as simple as a function call",

@@ -5,0 +5,0 @@ "license": "MIT",

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

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

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc