From d9d978e870514660691de3273c49c6c49d844327 Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Thu, 13 Feb 2025 22:04:28 +0100 Subject: [PATCH] build(deps-dev): bump the regular group across 1 directory with 4 updates (#2762) * build(deps-dev): bump the regular group across 1 directory with 4 updates Bumps the regular group with 4 updates in the / directory: [@types/node](https://github.com/DefinitelyTyped/DefinitelyTyped/tree/HEAD/types/node), [eslint-plugin-perfectionist](https://github.com/azat-io/eslint-plugin-perfectionist), [globals](https://github.com/sindresorhus/globals) and [prettier](https://github.com/prettier/prettier). Updates `@types/node` from 22.13.1 to 22.13.2 - [Release notes](https://github.com/DefinitelyTyped/DefinitelyTyped/releases) - [Commits](https://github.com/DefinitelyTyped/DefinitelyTyped/commits/HEAD/types/node) Updates `eslint-plugin-perfectionist` from 4.8.0 to 4.9.0 - [Release notes](https://github.com/azat-io/eslint-plugin-perfectionist/releases) - [Changelog](https://github.com/azat-io/eslint-plugin-perfectionist/blob/main/changelog.md) - [Commits](https://github.com/azat-io/eslint-plugin-perfectionist/compare/v4.8.0...v4.9.0) Updates `globals` from 15.14.0 to 15.15.0 - [Release notes](https://github.com/sindresorhus/globals/releases) - [Commits](https://github.com/sindresorhus/globals/compare/v15.14.0...v15.15.0) Updates `prettier` from 3.5.0 to 3.5.1 - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/3.5.0...3.5.1) --- updated-dependencies: - dependency-name: "@types/node" dependency-type: direct:development update-type: version-update:semver-patch dependency-group: regular - dependency-name: eslint-plugin-perfectionist dependency-type: direct:development update-type: version-update:semver-minor dependency-group: regular - dependency-name: globals dependency-type: direct:development update-type: version-update:semver-minor dependency-group: regular - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-patch dependency-group: regular ... Signed-off-by: dependabot[bot] * [autofix.ci] apply automated fixes --------- Signed-off-by: dependabot[bot] Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: autofix-ci[bot] <114827586+autofix-ci[bot]@users.noreply.github.com> --- package.json | 8 ++--- pnpm-lock.yaml | 62 +++++++++++++++++++------------------- src/pools/abstract-pool.ts | 38 +++++++++++------------ 3 files changed, 54 insertions(+), 54 deletions(-) diff --git a/package.json b/package.json index 14316d42..12e8939c 100644 --- a/package.json +++ b/package.json @@ -112,21 +112,21 @@ "@rollup/plugin-terser": "^0.4.4", "@rollup/plugin-typescript": "^12.1.2", "@std/expect": "npm:@jsr/std__expect@^1.0.13", - "@types/node": "^22.13.1", + "@types/node": "^22.13.2", "c8": "^10.1.3", "clean-publish": "^5.1.0", "cross-env": "^7.0.3", "eslint": "^9.20.1", "eslint-define-config": "^2.1.0", "eslint-plugin-jsdoc": "^50.6.3", - "eslint-plugin-perfectionist": "^4.8.0", - "globals": "^15.14.0", + "eslint-plugin-perfectionist": "^4.9.0", + "globals": "^15.15.0", "husky": "^9.1.7", "lint-staged": "^15.4.3", "mocha": "^11.1.0", "mochawesome": "^7.1.3", "neostandard": "^0.12.1", - "prettier": "^3.5.0", + "prettier": "^3.5.1", "rollup": "^4.34.6", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-command": "^1.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 1c269b9a..5a49192d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,7 +16,7 @@ importers: version: 1.9.4 '@commitlint/cli': specifier: ^19.7.1 - version: 19.7.1(@types/node@22.13.1)(typescript@5.7.3) + version: 19.7.1(@types/node@22.13.2)(typescript@5.7.3) '@commitlint/config-conventional': specifier: ^19.7.1 version: 19.7.1 @@ -36,8 +36,8 @@ importers: specifier: npm:@jsr/std__expect@^1.0.13 version: '@jsr/std__expect@1.0.13' '@types/node': - specifier: ^22.13.1 - version: 22.13.1 + specifier: ^22.13.2 + version: 22.13.2 c8: specifier: ^10.1.3 version: 10.1.3 @@ -57,11 +57,11 @@ importers: specifier: ^50.6.3 version: 50.6.3(eslint@9.20.1(jiti@2.4.2)) eslint-plugin-perfectionist: - specifier: ^4.8.0 - version: 4.8.0(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3) + specifier: ^4.9.0 + version: 4.9.0(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3) globals: - specifier: ^15.14.0 - version: 15.14.0 + specifier: ^15.15.0 + version: 15.15.0 husky: specifier: ^9.1.7 version: 9.1.7 @@ -78,8 +78,8 @@ importers: specifier: ^0.12.1 version: 0.12.1(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3) prettier: - specifier: ^3.5.0 - version: 3.5.0 + specifier: ^3.5.1 + version: 3.5.1 rollup: specifier: ^4.34.6 version: 4.34.6 @@ -773,8 +773,8 @@ packages: '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - '@types/node@22.13.1': - resolution: {integrity: sha512-jK8uzQlrvXqEU91UxiK5J7pKHyzgnI1Qnl0QDHIgVGuolJhRb9EEl28Cj9b3rGR8B2lhFCtvIm5os8lFnO/1Ew==} + '@types/node@22.13.2': + resolution: {integrity: sha512-Z+r8y3XL9ZpI2EY52YYygAFmo2/oWfNSj4BCpAXE2McAexDk8VcnBMGC9Djn9gTKt4d2T/hhXqmPzo4hfIXtTg==} '@types/unist@3.0.3': resolution: {integrity: sha512-ko/gIFJRv177XgZsZcBwnqJN5x/Gien8qNOn0D5bQU/zAzVf9Zt3BlcUiLqhV9y4ARk0GbT3tnUiPNgnTXzc/Q==} @@ -1340,8 +1340,8 @@ packages: peerDependencies: eslint: '>=8.23.0' - eslint-plugin-perfectionist@4.8.0: - resolution: {integrity: sha512-ZF04IAPGItYMlj9xjgvvl/QpksZf79g0dkxbNcuxDjbcUSZ4CwucJ7h5Yzt5JuHe+i6igQbUYEp40j4ndfbvWQ==} + eslint-plugin-perfectionist@4.9.0: + resolution: {integrity: sha512-76lDfJnonOcXGW3bEXuqhEGId0LrOlvIE1yLHvK/eKMMPOc0b43KchAIR2Bdbqlg+LPXU5/Q+UzuzkO+cWHT6w==} engines: {node: ^18.0.0 || >=20.0.0} peerDependencies: eslint: '>=8.0.0' @@ -1558,8 +1558,8 @@ packages: resolution: {integrity: sha512-oahGvuMGQlPw/ivIYBjVSrWAfWLBeku5tpPE2fOPLi+WHffIWbuh2tCjhyQhTBPMf5E9jDEH4FOmTYgYwbKwtQ==} engines: {node: '>=18'} - globals@15.14.0: - resolution: {integrity: sha512-OkToC372DtlQeje9/zHIo5CT8lRP/FUgEOKBEhU4e0abL7J7CD24fD9ohiLN5hagG/kWCYj4K5oaxxtj2Z0Dig==} + globals@15.15.0: + resolution: {integrity: sha512-7ACyT3wmyp3I61S4fG682L0VA2RGD9otkqGJIwNUMF1SWUombIIk+af1unuDYgMm082aHYwD+mzJvv9Iu8dsgg==} engines: {node: '>=18'} globalthis@1.0.4: @@ -2228,8 +2228,8 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} - prettier@3.5.0: - resolution: {integrity: sha512-quyMrVt6svPS7CjQ9gKb3GLEX/rl3BCL2oa/QkNcXv4YNVBC9olt3s+H7ukto06q7B1Qz46PbrKLO34PR6vXcA==} + prettier@3.5.1: + resolution: {integrity: sha512-hPpFQvHwL3Qv5AdRvBFMhnKo4tYxp0ReXiPn2bxkiohEX6mBeBwEpBSQTkD458RaaDKQMYSp4hX4UtfUTA5wDw==} engines: {node: '>=14'} hasBin: true @@ -2772,11 +2772,11 @@ snapshots: '@biomejs/cli-win32-x64@1.9.4': optional: true - '@commitlint/cli@19.7.1(@types/node@22.13.1)(typescript@5.7.3)': + '@commitlint/cli@19.7.1(@types/node@22.13.2)(typescript@5.7.3)': dependencies: '@commitlint/format': 19.5.0 '@commitlint/lint': 19.7.1 - '@commitlint/load': 19.6.1(@types/node@22.13.1)(typescript@5.7.3) + '@commitlint/load': 19.6.1(@types/node@22.13.2)(typescript@5.7.3) '@commitlint/read': 19.5.0 '@commitlint/types': 19.5.0 tinyexec: 0.3.2 @@ -2823,7 +2823,7 @@ snapshots: '@commitlint/rules': 19.6.0 '@commitlint/types': 19.5.0 - '@commitlint/load@19.6.1(@types/node@22.13.1)(typescript@5.7.3)': + '@commitlint/load@19.6.1(@types/node@22.13.2)(typescript@5.7.3)': dependencies: '@commitlint/config-validator': 19.5.0 '@commitlint/execute-rule': 19.5.0 @@ -2831,7 +2831,7 @@ snapshots: '@commitlint/types': 19.5.0 chalk: 5.4.1 cosmiconfig: 9.0.0(typescript@5.7.3) - cosmiconfig-typescript-loader: 6.1.0(@types/node@22.13.1)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3) + cosmiconfig-typescript-loader: 6.1.0(@types/node@22.13.2)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3) lodash.isplainobject: 4.0.6 lodash.merge: 4.6.2 lodash.uniq: 4.5.0 @@ -3357,7 +3357,7 @@ snapshots: '@types/conventional-commits-parser@5.0.1': dependencies: - '@types/node': 22.13.1 + '@types/node': 22.13.2 '@types/doctrine@0.0.9': {} @@ -3366,7 +3366,7 @@ snapshots: '@types/glob@7.2.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 22.13.1 + '@types/node': 22.13.2 '@types/hast@3.0.4': dependencies: @@ -3378,7 +3378,7 @@ snapshots: '@types/minimatch@5.1.2': {} - '@types/node@22.13.1': + '@types/node@22.13.2': dependencies: undici-types: 6.20.0 @@ -3735,9 +3735,9 @@ snapshots: core-util-is@1.0.3: {} - cosmiconfig-typescript-loader@6.1.0(@types/node@22.13.1)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3): + cosmiconfig-typescript-loader@6.1.0(@types/node@22.13.2)(cosmiconfig@9.0.0(typescript@5.7.3))(typescript@5.7.3): dependencies: - '@types/node': 22.13.1 + '@types/node': 22.13.2 cosmiconfig: 9.0.0(typescript@5.7.3) jiti: 2.4.2 typescript: 5.7.3 @@ -4120,12 +4120,12 @@ snapshots: eslint: 9.20.1(jiti@2.4.2) eslint-plugin-es-x: 7.8.0(eslint@9.20.1(jiti@2.4.2)) get-tsconfig: 4.10.0 - globals: 15.14.0 + globals: 15.15.0 ignore: 5.3.2 minimatch: 9.0.5 semver: 7.7.1 - eslint-plugin-perfectionist@4.8.0(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3): + eslint-plugin-perfectionist@4.9.0(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3): dependencies: '@typescript-eslint/types': 8.24.0 '@typescript-eslint/utils': 8.24.0(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3) @@ -4407,7 +4407,7 @@ snapshots: globals@14.0.0: {} - globals@15.14.0: {} + globals@15.15.0: {} globalthis@1.0.4: dependencies: @@ -4920,7 +4920,7 @@ snapshots: eslint-plugin-promise: 7.2.1(eslint@9.20.1(jiti@2.4.2)) eslint-plugin-react: 7.37.4(eslint@9.20.1(jiti@2.4.2)) find-up: 5.0.0 - globals: 15.14.0 + globals: 15.15.0 peowly: 1.3.2 typescript-eslint: 8.24.0(eslint@9.20.1(jiti@2.4.2))(typescript@5.7.3) transitivePeerDependencies: @@ -5083,7 +5083,7 @@ snapshots: prelude-ls@1.2.1: {} - prettier@3.5.0: {} + prettier@3.5.1: {} prop-types@15.8.1: dependencies: diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index 6efb94fc..0f3a83bb 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -1780,25 +1780,6 @@ export abstract class AbstractPool< } } - private readonly workerNodeStealTask = ( - workerNodeKey: number - ): Task | undefined => { - const workerNodes = this.workerNodes - .slice() - .sort( - (workerNodeA, workerNodeB) => - workerNodeB.usage.tasks.queued - workerNodeA.usage.tasks.queued - ) - const sourceWorkerNode = workerNodes.find( - (sourceWorkerNode, sourceWorkerNodeKey) => - sourceWorkerNodeKey !== workerNodeKey && - sourceWorkerNode.usage.tasks.queued > 0 - ) - if (sourceWorkerNode != null) { - return this.stealTask(sourceWorkerNode, workerNodeKey) - } - } - private readonly handleWorkerNodeIdleEvent = ( eventDetail: WorkerNodeEventDetail, previousStolenTask?: Task @@ -2385,4 +2366,23 @@ export abstract class AbstractPool< ++workerNode.getTaskFunctionWorkerUsage(taskName)!.tasks.stolen } } + + private readonly workerNodeStealTask = ( + workerNodeKey: number + ): Task | undefined => { + const workerNodes = this.workerNodes + .slice() + .sort( + (workerNodeA, workerNodeB) => + workerNodeB.usage.tasks.queued - workerNodeA.usage.tasks.queued + ) + const sourceWorkerNode = workerNodes.find( + (sourceWorkerNode, sourceWorkerNodeKey) => + sourceWorkerNodeKey !== workerNodeKey && + sourceWorkerNode.usage.tasks.queued > 0 + ) + if (sourceWorkerNode != null) { + return this.stealTask(sourceWorkerNode, workerNodeKey) + } + } } -- 2.43.0