From: Jérôme Benoit Date: Tue, 3 Jan 2023 20:52:46 +0000 (+0100) Subject: Apply dependencies update X-Git-Tag: v2.3.8~55 X-Git-Url: https://git.piment-noir.org/?a=commitdiff_plain;h=a974afa67937a18f493d733d9f5285b99c8b08fd;p=poolifier.git Apply dependencies update Signed-off-by: Jérôme Benoit --- 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)