From a974afa67937a18f493d733d9f5285b99c8b08fd Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=A9r=C3=B4me=20Benoit?= Date: Tue, 3 Jan 2023 21:52:46 +0100 Subject: [PATCH] Apply dependencies update MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: Jérôme Benoit --- examples/typescript/pool.ts | 16 ++++++++++++---- package-lock.json | 28 ++++++++++++++-------------- package.json | 4 ++-- src/pools/abstract-pool.ts | 4 +++- 4 files changed, 31 insertions(+), 21 deletions(-) diff --git a/examples/typescript/pool.ts b/examples/typescript/pool.ts index be92f73b..c2d0a1b8 100644 --- a/examples/typescript/pool.ts +++ b/examples/typescript/pool.ts @@ -6,8 +6,12 @@ export const fixedPool = new FixedThreadPool>( 8, join(__dirname, 'worker.js'), { - errorHandler: (e: Error) => console.error(e), - onlineHandler: () => console.log('Worker is online') + errorHandler: (e: Error) => { + console.error(e) + }, + onlineHandler: () => { + console.log('Worker is online') + } } ) @@ -16,7 +20,11 @@ export const dynamicPool = new DynamicThreadPool>( 8, join(__dirname, 'worker.js'), { - errorHandler: (e: Error) => console.error(e), - onlineHandler: () => console.log('Worker is online') + errorHandler: (e: Error) => { + console.error(e) + }, + onlineHandler: () => { + console.log('Worker is online') + } } ) diff --git a/package-lock.json b/package-lock.json index 65c26933..85940c3a 100644 --- a/package-lock.json +++ b/package-lock.json @@ -24,7 +24,7 @@ "c8": "^7.12.0", "eslint": "^8.31.0", "eslint-config-standard": "^17.0.0", - "eslint-config-standard-with-typescript": "^24.0.0", + "eslint-config-standard-with-typescript": "^26.0.0", "eslint-define-config": "^1.13.0", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", @@ -34,7 +34,7 @@ "eslint-plugin-spellcheck": "^0.0.20", "eslint-plugin-tsdoc": "^0.2.17", "expect": "^29.3.1", - "husky": "^8.0.2", + "husky": "^8.0.3", "lint-staged": "^13.1.0", "microtime": "^3.1.1", "mocha": "^10.2.0", @@ -2981,9 +2981,9 @@ } }, "node_modules/eslint-config-standard-with-typescript": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-24.0.0.tgz", - "integrity": "sha512-vEnGXZ5aiR1enl9652iIP4nTpY3GPcNEwuhrsPbKO3Ce3D6T3yCqZdkUPk8nJetfdL/yO0DLsHg2d/l9iECIdg==", + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-26.0.0.tgz", + "integrity": "sha512-TluIWunQo76qp4MHyYIaTT+sN2q2v/jTeE3Dj4rXsSbx27GOUEOujhJaAL3v9dHVQelAK13gZ5Jy9IWnWCyFrg==", "dev": true, "dependencies": { "@typescript-eslint/parser": "^5.0.0", @@ -4467,9 +4467,9 @@ } }, "node_modules/husky": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz", - "integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true, "bin": { "husky": "lib/bin.js" @@ -11844,9 +11844,9 @@ "dev": true }, "eslint-config-standard-with-typescript": { - "version": "24.0.0", - "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-24.0.0.tgz", - "integrity": "sha512-vEnGXZ5aiR1enl9652iIP4nTpY3GPcNEwuhrsPbKO3Ce3D6T3yCqZdkUPk8nJetfdL/yO0DLsHg2d/l9iECIdg==", + "version": "26.0.0", + "resolved": "https://registry.npmjs.org/eslint-config-standard-with-typescript/-/eslint-config-standard-with-typescript-26.0.0.tgz", + "integrity": "sha512-TluIWunQo76qp4MHyYIaTT+sN2q2v/jTeE3Dj4rXsSbx27GOUEOujhJaAL3v9dHVQelAK13gZ5Jy9IWnWCyFrg==", "dev": true, "requires": { "@typescript-eslint/parser": "^5.0.0", @@ -12867,9 +12867,9 @@ "dev": true }, "husky": { - "version": "8.0.2", - "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.2.tgz", - "integrity": "sha512-Tkv80jtvbnkK3mYWxPZePGFpQ/tT3HNSs/sasF9P2YfkMezDl3ON37YN6jUUI4eTg5LcyVynlb6r4eyvOmspvg==", + "version": "8.0.3", + "resolved": "https://registry.npmjs.org/husky/-/husky-8.0.3.tgz", + "integrity": "sha512-+dQSyqPh4x1hlO1swXBiNb2HzTDN1I2IGLQx1GrBuiqFJfoMrnZWwVmatvSiO+Iz8fBUnf+lekwNo4c2LlXItg==", "dev": true }, "iconv-lite": { diff --git a/package.json b/package.json index d0475326..2848ef1b 100644 --- a/package.json +++ b/package.json @@ -93,7 +93,7 @@ "c8": "^7.12.0", "eslint": "^8.31.0", "eslint-config-standard": "^17.0.0", - "eslint-config-standard-with-typescript": "^24.0.0", + "eslint-config-standard-with-typescript": "^26.0.0", "eslint-define-config": "^1.13.0", "eslint-import-resolver-typescript": "^3.5.2", "eslint-plugin-import": "^2.26.0", @@ -103,7 +103,7 @@ "eslint-plugin-spellcheck": "^0.0.20", "eslint-plugin-tsdoc": "^0.2.17", "expect": "^29.3.1", - "husky": "^8.0.2", + "husky": "^8.0.3", "lint-staged": "^13.1.0", "microtime": "^3.1.1", "mocha": "^10.2.0", diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index c2b54b58..1cd6c56f 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -336,7 +336,9 @@ export abstract class AbstractPool< worker.on('error', this.opts.errorHandler ?? EMPTY_FUNCTION) worker.on('online', this.opts.onlineHandler ?? EMPTY_FUNCTION) worker.on('exit', this.opts.exitHandler ?? EMPTY_FUNCTION) - worker.once('exit', () => this.removeWorker(worker)) + worker.once('exit', () => { + this.removeWorker(worker) + }) this.workers.push(worker) -- 2.34.1