Socket
Socket
Sign inDemoInstall

workerpool

Package Overview
Dependencies
0
Maintainers
2
Versions
60
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 9.0.0 to 9.0.1

2

dist/worker.js

@@ -7,3 +7,3 @@ /**

*
* @version 9.0.0
* @version 9.0.1
* @date 2023-12-18

@@ -10,0 +10,0 @@ *

@@ -7,3 +7,3 @@ /**

*
* @version 9.0.0
* @version 9.0.1
* @date 2023-12-18

@@ -1634,6 +1634,10 @@ *

/** @typedef {import("./Pool")} Pool */
/** @typedef {import("./types.js").WorkerPoolOptions} WorkerPoolOptions */
/** @typedef {import("./types.js").WorkerRegisterOptions} WorkerRegisterOptions */
/**
* @overload
* Create a new worker pool
* @param {import("./types.js").WorkerPoolOptions} [script]
* @param {WorkerPoolOptions} [script]
* @returns {Pool} pool

@@ -1645,3 +1649,3 @@ */

* @param {string} [script]
* @param {import("./types.js").WorkerPoolOptions} [options]
* @param {WorkerPoolOptions} [options]
* @returns {Pool} pool

@@ -1658,3 +1662,3 @@ */

* @param {{ [k: string]: (...args: any[]) => any }} [methods]
* @param {import("./types.js").WorkerRegisterOptions} [options]
* @param {WorkerRegisterOptions} [options]
*/

@@ -1661,0 +1665,0 @@ function worker(methods, options) {

@@ -5,2 +5,8 @@ # workerpool history

## 2023-12-18, version 9.0.1
- Export the types `Pool`, `WorkerPoolOptions`, and `WorkerRegisterOptions`,
see #416. Thanks @joshkel.
## 2023-12-18, version 9.0.0

@@ -11,3 +17,3 @@

definitions and the implementation from `@types/workerpool` that was needed
before.
before. For example, `type WorkerPool` is called `type Pool` now.

@@ -14,0 +20,0 @@ - Generate TypeScript types from JSDoc comments. Thanks @tamuratak.

{
"name": "workerpool",
"license": "Apache-2.0",
"version": "9.0.0",
"version": "9.0.1",
"description": "Offload tasks to a pool of workers on node.js and in the browser",

@@ -6,0 +6,0 @@ "homepage": "https://github.com/josdejong/workerpool",

const {platform, isMainThread, cpus} = require('./environment');
/** @typedef {import("./Pool")} Pool */
/** @typedef {import("./types.js").WorkerPoolOptions} WorkerPoolOptions */
/** @typedef {import("./types.js").WorkerRegisterOptions} WorkerRegisterOptions */
/**
* @overload
* Create a new worker pool
* @param {import("./types.js").WorkerPoolOptions} [script]
* @param {WorkerPoolOptions} [script]
* @returns {Pool} pool

@@ -13,3 +17,3 @@ */

* @param {string} [script]
* @param {import("./types.js").WorkerPoolOptions} [options]
* @param {WorkerPoolOptions} [options]
* @returns {Pool} pool

@@ -27,3 +31,3 @@ */

* @param {{ [k: string]: (...args: any[]) => any }} [methods]
* @param {import("./types.js").WorkerRegisterOptions} [options]
* @param {WorkerRegisterOptions} [options]
*/

@@ -30,0 +34,0 @@ function worker(methods, options) {

export const Transfer: typeof import("./transfer");
export type Pool = import("./Pool");
export type WorkerPoolOptions = import("./types.js").WorkerPoolOptions;
export type WorkerRegisterOptions = import("./types.js").WorkerRegisterOptions;
/**
* @overload
* Create a new worker pool
* @param {import("./types.js").WorkerPoolOptions} [script]
* @param {WorkerPoolOptions} [script]
* @returns {Pool} pool

@@ -13,3 +16,3 @@ */

* @param {string} [script]
* @param {import("./types.js").WorkerPoolOptions} [options]
* @param {WorkerPoolOptions} [options]
* @returns {Pool} pool

@@ -21,3 +24,3 @@ */

* @param {{ [k: string]: (...args: any[]) => any }} [methods]
* @param {import("./types.js").WorkerRegisterOptions} [options]
* @param {WorkerRegisterOptions} [options]
*/

@@ -24,0 +27,0 @@ export function worker(methods?: {

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc