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

@wixc3/isomorphic-worker

Package Overview
Dependencies
Maintainers
70
Versions
18
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wixc3/isomorphic-worker - npm Package Compare versions

Comparing version 1.2.4 to 1.2.5

2

dist/node-worker-scope.d.ts
/// <reference types="node" />
import { type MessagePort } from 'worker_threads';
import { type MessagePort } from 'node:worker_threads';
import type { MessageType, UniversalMessage, UniversalWorkerUserMethods } from './types';

@@ -4,0 +4,0 @@ declare class UniversalWorkerUser implements UniversalWorkerUserMethods {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.worker = void 0;
const worker_threads_1 = require("worker_threads");
const node_worker_threads_1 = require("node:worker_threads");
const port = (function getPort() {
if (!worker_threads_1.parentPort) {
if (!node_worker_threads_1.parentPort) {
throw new Error('parentPort required for worker processors');
}
return worker_threads_1.parentPort;
return node_worker_threads_1.parentPort;
})();

@@ -15,3 +15,3 @@ class UniversalWorkerUser {

this.messageHandlersMap = new Map();
this.workerData = worker_threads_1.workerData;
this.workerData = node_worker_threads_1.workerData;
}

@@ -18,0 +18,0 @@ postMessage(message) {

"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.Worker = void 0;
const worker_threads_1 = require("worker_threads");
const node_worker_threads_1 = require("node:worker_threads");
class NodeWorker {
constructor(url, options) {
this.messageHandlersMap = new Map();
this.worker = new worker_threads_1.Worker(url, options);
this.worker = new node_worker_threads_1.Worker(url, options);
}

@@ -10,0 +10,0 @@ postMessage(message) {

{
"name": "@wixc3/isomorphic-worker",
"version": "1.2.4",
"version": "1.2.5",
"description": "simplified cross worker API for web workers and worker threads",

@@ -13,11 +13,11 @@ "homepage": "https://github.com/wixplosives/isomorphic-worker",

"browser": "./dist/browser-worker-scope.js",
"require": "./dist/node-worker-scope.js",
"node": "./dist/node-worker-scope.js",
"types": "./dist/node-worker-scope.d.ts",
"default": "./dist/browser-worker-scope.js"
"default": "./dist/node-worker-scope.js"
},
"./worker": {
"browser": "./dist/browser-worker.js",
"require": "./dist/node-worker.js",
"node": "./dist/node-worker.js",
"types": "./dist/node-worker.d.ts",
"default": "./dist/browser-worker.js"
"default": "./dist/node-worker.js"
},

@@ -24,0 +24,0 @@ "./types": {

@@ -1,2 +0,2 @@

import { parentPort, workerData, type MessagePort } from 'worker_threads';
import { parentPort, workerData, type MessagePort } from 'node:worker_threads';
import type {

@@ -3,0 +3,0 @@ MessageType,

@@ -1,2 +0,2 @@

import { Worker } from 'worker_threads';
import { Worker } from 'node:worker_threads';
import type {

@@ -3,0 +3,0 @@ MessageType,

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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