@matrixai/workers
Advanced tools
Comparing version 1.3.1 to 1.3.2
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -6,0 +10,0 @@ if (k2 === undefined) k2 = k; |
@@ -10,3 +10,3 @@ "use strict"; | ||
const workerModule_1 = __importDefault(require("../src/workerModule")); | ||
worker_1.expose(workerModule_1.default); | ||
(0, worker_1.expose)(workerModule_1.default); | ||
//# sourceMappingURL=worker.js.map |
@@ -6,3 +6,3 @@ import type { ModuleThread } from 'threads'; | ||
import Logger from '@matrixai/logger'; | ||
import WorkerManagerInterface from './WorkerManagerInterface'; | ||
import type WorkerManagerInterface from './WorkerManagerInterface'; | ||
declare class WorkerManager<W extends ModuleMethods> implements WorkerManagerInterface<W> { | ||
@@ -9,0 +9,0 @@ /** |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
var desc = Object.getOwnPropertyDescriptor(m, k); | ||
if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) { | ||
desc = { enumerable: true, get: function() { return m[k]; } }; | ||
} | ||
Object.defineProperty(o, k2, desc); | ||
}) : (function(o, m, k, k2) { | ||
@@ -39,3 +43,3 @@ if (k2 === undefined) k2 = k; | ||
this.logger = logger; | ||
this.pool = threads_1.Pool(workerFactory, cores); | ||
this.pool = (0, threads_1.Pool)(workerFactory, cores); | ||
} | ||
@@ -83,17 +87,17 @@ /** | ||
__decorate([ | ||
CreateDestroy_1.ready(new errors.ErrorWorkerManagerDestroyed()) | ||
(0, CreateDestroy_1.ready)(new errors.ErrorWorkerManagerDestroyed()) | ||
], WorkerManager.prototype, "call", null); | ||
__decorate([ | ||
CreateDestroy_1.ready(new errors.ErrorWorkerManagerDestroyed()) | ||
(0, CreateDestroy_1.ready)(new errors.ErrorWorkerManagerDestroyed()) | ||
], WorkerManager.prototype, "queue", null); | ||
__decorate([ | ||
CreateDestroy_1.ready(new errors.ErrorWorkerManagerDestroyed()) | ||
(0, CreateDestroy_1.ready)(new errors.ErrorWorkerManagerDestroyed()) | ||
], WorkerManager.prototype, "completed", null); | ||
__decorate([ | ||
CreateDestroy_1.ready(new errors.ErrorWorkerManagerDestroyed()) | ||
(0, CreateDestroy_1.ready)(new errors.ErrorWorkerManagerDestroyed()) | ||
], WorkerManager.prototype, "settled", null); | ||
WorkerManager = WorkerManager_1 = __decorate([ | ||
CreateDestroy_1.CreateDestroy() | ||
(0, CreateDestroy_1.CreateDestroy)() | ||
], WorkerManager); | ||
exports.default = WorkerManager; | ||
//# sourceMappingURL=WorkerManager.js.map |
@@ -1,2 +0,2 @@ | ||
import { TransferDescriptor } from 'threads'; | ||
import type { TransferDescriptor } from 'threads'; | ||
/** | ||
@@ -3,0 +3,0 @@ * Worker object that contains all functions that will be executed in parallel |
@@ -18,3 +18,3 @@ "use strict"; | ||
isRunningInWorker() { | ||
return threads_2.isWorkerRuntime(); | ||
return (0, threads_2.isWorkerRuntime)(); | ||
}, | ||
@@ -40,3 +40,3 @@ /** | ||
// so we transfer the ArrayBuffer instead | ||
return threads_1.Transfer(data); | ||
return (0, threads_1.Transfer)(data); | ||
}, | ||
@@ -43,0 +43,0 @@ }; |
{ | ||
"name": "@matrixai/workers", | ||
"version": "1.3.1", | ||
"version": "1.3.2", | ||
"author": "Roger Qiu", | ||
@@ -14,2 +14,3 @@ "description": "Multithreaded Workers", | ||
"scripts": { | ||
"prepare": "tsc -p ./tsconfig.build.json", | ||
"build": "rm -r ./dist || true; tsc -p ./tsconfig.build.json", | ||
@@ -20,29 +21,29 @@ "ts-node": "ts-node -r tsconfig-paths/register", | ||
"lintfix": "eslint '{src,tests,benches}/**/*.{js,ts}' --fix", | ||
"docs": "rm -r ./docs || true; typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src && touch ./docs/.nojekyll", | ||
"docs": "rm -r ./docs || true; typedoc --gitRevision master --tsconfig ./tsconfig.build.json --out ./docs src", | ||
"bench": "ts-node -r tsconfig-paths/register ./benches" | ||
}, | ||
"dependencies": { | ||
"@matrixai/async-init": "^1.7.0", | ||
"@matrixai/async-init": "^1.7.2", | ||
"@matrixai/logger": "^2.1.0", | ||
"@matrixai/errors": "^1.0.1", | ||
"@matrixai/errors": "^1.1.0", | ||
"threads": "^1.6.5" | ||
}, | ||
"devDependencies": { | ||
"@types/jest": "^26.0.20", | ||
"@types/node": "^14.14.35", | ||
"@typescript-eslint/eslint-plugin": "^4.12.0", | ||
"@typescript-eslint/parser": "^4.12.0", | ||
"@types/jest": "^27.0.2", | ||
"@types/node": "^16.11.7", | ||
"@typescript-eslint/eslint-plugin": "^5.23.0", | ||
"@typescript-eslint/parser": "^5.23.0", | ||
"benny": "^3.6.15", | ||
"eslint": "^7.17.0", | ||
"eslint-config-prettier": "^7.1.0", | ||
"eslint-plugin-prettier": "^3.3.1", | ||
"jest": "^26.6.3", | ||
"prettier": "^2.2.1", | ||
"eslint": "^8.15.0", | ||
"eslint-config-prettier": "^8.5.0", | ||
"eslint-plugin-prettier": "^4.0.0", | ||
"jest": "^27.2.5", | ||
"prettier": "^2.6.2", | ||
"systeminformation": "^5.8.9", | ||
"ts-jest": "^26.4.4", | ||
"ts-node": "^9.1.1", | ||
"ts-jest": "^27.0.5", | ||
"ts-node": "^10.4.0", | ||
"tsconfig-paths": "^3.9.0", | ||
"typedoc": "^0.21.5", | ||
"typescript": "^4.1.3" | ||
"typedoc": "^0.22.15", | ||
"typescript": "^4.5.2" | ||
} | ||
} |
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
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
New author
Supply chain riskA new npm collaborator published a version of the package for the first time. New collaborators are usually benign additions to a project, but do indicate a change to the security surface area of a package.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
32381
295
1
Updated@matrixai/async-init@^1.7.2
Updated@matrixai/errors@^1.1.0