From 785f02a0550f437cc05f1275adc34e1eff005987 Mon Sep 17 00:00:00 2001 From: "renovate[bot]" <29139614+renovate[bot]@users.noreply.github.com> Date: Sun, 7 Dec 2025 21:18:07 +0100 Subject: [PATCH] chore(deps): update all non-major dependencies (#3077) * chore(deps): update all non-major dependencies * [autofix.ci] apply automated fixes --------- Co-authored-by: renovate[bot] <29139614+renovate[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 | 152 +++++++++--------- src/pools/abstract-pool.ts | 6 +- src/pools/cluster/dynamic.ts | 4 +- src/pools/cluster/fixed.ts | 4 +- src/pools/pool.ts | 8 +- .../abstract-worker-choice-strategy.ts | 6 +- .../fair-share-worker-choice-strategy.ts | 6 +- ...hted-round-robin-worker-choice-strategy.ts | 6 +- .../least-busy-worker-choice-strategy.ts | 6 +- .../least-elu-worker-choice-strategy.ts | 6 +- .../least-used-worker-choice-strategy.ts | 6 +- .../round-robin-worker-choice-strategy.ts | 6 +- ...hted-round-robin-worker-choice-strategy.ts | 6 +- .../worker-choice-strategies-context.ts | 6 +- src/pools/thread/dynamic.ts | 4 +- src/pools/thread/fixed.ts | 4 +- src/pools/worker-node.ts | 4 +- src/pools/worker.ts | 14 +- src/queues/abstract-fixed-queue.ts | 2 +- src/queues/fixed-priority-queue.ts | 2 +- src/queues/fixed-queue.ts | 2 +- src/queues/priority-queue.ts | 2 +- src/queues/queue-types.ts | 6 +- src/utility-types.ts | 12 +- src/utils.ts | 8 +- src/worker/abstract-worker.ts | 6 +- src/worker/cluster-worker.ts | 4 +- src/worker/task-functions.ts | 20 +-- src/worker/thread-worker.ts | 4 +- 30 files changed, 165 insertions(+), 165 deletions(-) diff --git a/package.json b/package.json index e6c4c98a5..3ba0e9de4 100644 --- a/package.json +++ b/package.json @@ -108,8 +108,8 @@ }, "devDependencies": { "@biomejs/biome": "^2.3.8", - "@commitlint/cli": "^20.1.0", - "@commitlint/config-conventional": "^20.0.0", + "@commitlint/cli": "^20.2.0", + "@commitlint/config-conventional": "^20.2.0", "@cspell/eslint-plugin": "^9.4.0", "@eslint/js": "^9.39.1", "@rollup/plugin-terser": "^0.4.4", @@ -120,7 +120,7 @@ "clean-publish": "^6.0.1", "cross-env": "^10.1.0", "eslint": "^9.39.1", - "eslint-plugin-jsdoc": "^61.4.1", + "eslint-plugin-jsdoc": "^61.5.0", "eslint-plugin-perfectionist": "^4.15.1", "globals": "^16.5.0", "husky": "^9.1.7", @@ -128,7 +128,7 @@ "mocha": "^11.7.5", "mochawesome": "^7.1.4", "neostandard": "^0.12.2", - "prettier": "^3.7.3", + "prettier": "^3.7.4", "rollup": "^4.53.3", "rollup-plugin-analyzer": "^4.0.0", "rollup-plugin-command": "^1.1.3", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index da2fbc311..9f7e9fb21 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,11 +15,11 @@ importers: specifier: ^2.3.8 version: 2.3.8 '@commitlint/cli': - specifier: ^20.1.0 - version: 20.1.0(@types/node@24.10.1)(typescript@5.9.3) + specifier: ^20.2.0 + version: 20.2.0(@types/node@24.10.1)(typescript@5.9.3) '@commitlint/config-conventional': - specifier: ^20.0.0 - version: 20.0.0 + specifier: ^20.2.0 + version: 20.2.0 '@cspell/eslint-plugin': specifier: ^9.4.0 version: 9.4.0(eslint@9.39.1(jiti@2.6.1)) @@ -51,8 +51,8 @@ importers: specifier: ^9.39.1 version: 9.39.1(jiti@2.6.1) eslint-plugin-jsdoc: - specifier: ^61.4.1 - version: 61.4.1(eslint@9.39.1(jiti@2.6.1)) + specifier: ^61.5.0 + version: 61.5.0(eslint@9.39.1(jiti@2.6.1)) eslint-plugin-perfectionist: specifier: ^4.15.1 version: 4.15.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) @@ -75,8 +75,8 @@ importers: specifier: ^0.12.2 version: 0.12.2(@typescript-eslint/utils@8.48.1(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3))(eslint@9.39.1(jiti@2.6.1))(typescript@5.9.3) prettier: - specifier: ^3.7.3 - version: 3.7.3 + specifier: ^3.7.4 + version: 3.7.4 rollup: specifier: ^4.53.3 version: 4.53.3 @@ -173,61 +173,61 @@ packages: cpu: [x64] os: [win32] - '@commitlint/cli@20.1.0': - resolution: {integrity: sha512-pW5ujjrOovhq5RcYv5xCpb4GkZxkO2+GtOdBW2/qrr0Ll9tl3PX0aBBobGQl3mdZUbOBgwAexEQLeH6uxL0VYg==} + '@commitlint/cli@20.2.0': + resolution: {integrity: sha512-l37HkrPZ2DZy26rKiTUvdq/LZtlMcxz+PeLv9dzK9NzoFGuJdOQyYU7IEkEQj0pO++uYue89wzOpZ0hcTtoqUA==} engines: {node: '>=v18'} hasBin: true - '@commitlint/config-conventional@20.0.0': - resolution: {integrity: sha512-q7JroPIkDBtyOkVe9Bca0p7kAUYxZMxkrBArCfuD3yN4KjRAenP9PmYwnn7rsw8Q+hHq1QB2BRmBh0/Z19ZoJw==} + '@commitlint/config-conventional@20.2.0': + resolution: {integrity: sha512-MsRac+yNIbTB4Q/psstKK4/ciVzACHicSwz+04Sxve+4DW+PiJeTjU0JnS4m/oOnulrXYN+yBPlKaBSGemRfgQ==} engines: {node: '>=v18'} - '@commitlint/config-validator@20.0.0': - resolution: {integrity: sha512-BeyLMaRIJDdroJuYM2EGhDMGwVBMZna9UiIqV9hxj+J551Ctc6yoGuGSmghOy/qPhBSuhA6oMtbEiTmxECafsg==} + '@commitlint/config-validator@20.2.0': + resolution: {integrity: sha512-SQCBGsL9MFk8utWNSthdxd9iOD1pIVZSHxGBwYIGfd67RTjxqzFOSAYeQVXOu3IxRC3YrTOH37ThnTLjUlyF2w==} engines: {node: '>=v18'} - '@commitlint/ensure@20.0.0': - resolution: {integrity: sha512-WBV47Fffvabe68n+13HJNFBqiMH5U1Ryls4W3ieGwPC0C7kJqp3OVQQzG2GXqOALmzrgAB+7GXmyy8N9ct8/Fg==} + '@commitlint/ensure@20.2.0': + resolution: {integrity: sha512-+8TgIGv89rOWyt3eC6lcR1H7hqChAKkpawytlq9P1i/HYugFRVqgoKJ8dhd89fMnlrQTLjA5E97/4sF09QwdoA==} engines: {node: '>=v18'} '@commitlint/execute-rule@20.0.0': resolution: {integrity: sha512-xyCoOShoPuPL44gVa+5EdZsBVao/pNzpQhkzq3RdtlFdKZtjWcLlUFQHSWBuhk5utKYykeJPSz2i8ABHQA+ZZw==} engines: {node: '>=v18'} - '@commitlint/format@20.0.0': - resolution: {integrity: sha512-zrZQXUcSDmQ4eGGrd+gFESiX0Rw+WFJk7nW4VFOmxub4mAATNKBQ4vNw5FgMCVehLUKG2OT2LjOqD0Hk8HvcRg==} + '@commitlint/format@20.2.0': + resolution: {integrity: sha512-PhNoLNhxpfIBlW/i90uZ3yG3hwSSYx7n4d9Yc+2FAorAHS0D9btYRK4ZZXX+Gm3W5tDtu911ow/eWRfcRVgNWg==} engines: {node: '>=v18'} - '@commitlint/is-ignored@20.0.0': - resolution: {integrity: sha512-ayPLicsqqGAphYIQwh9LdAYOVAQ9Oe5QCgTNTj+BfxZb9b/JW222V5taPoIBzYnAP0z9EfUtljgBk+0BN4T4Cw==} + '@commitlint/is-ignored@20.2.0': + resolution: {integrity: sha512-Lz0OGeZCo/QHUDLx5LmZc0EocwanneYJUM8z0bfWexArk62HKMLfLIodwXuKTO5y0s6ddXaTexrYHs7v96EOmw==} engines: {node: '>=v18'} - '@commitlint/lint@20.0.0': - resolution: {integrity: sha512-kWrX8SfWk4+4nCexfLaQT3f3EcNjJwJBsSZ5rMBw6JCd6OzXufFHgel2Curos4LKIxwec9WSvs2YUD87rXlxNQ==} + '@commitlint/lint@20.2.0': + resolution: {integrity: sha512-cQEEB+jlmyQbyiji/kmh8pUJSDeUmPiWq23kFV0EtW3eM+uAaMLMuoTMajbrtWYWQpPzOMDjYltQ8jxHeHgITg==} engines: {node: '>=v18'} - '@commitlint/load@20.1.0': - resolution: {integrity: sha512-qo9ER0XiAimATQR5QhvvzePfeDfApi/AFlC1G+YN+ZAY8/Ua6IRrDrxRvQAr+YXUKAxUsTDSp9KXeXLBPsNRWg==} + '@commitlint/load@20.2.0': + resolution: {integrity: sha512-iAK2GaBM8sPFTSwtagI67HrLKHIUxQc2BgpgNc/UMNme6LfmtHpIxQoN1TbP+X1iz58jq32HL1GbrFTCzcMi6g==} engines: {node: '>=v18'} '@commitlint/message@20.0.0': resolution: {integrity: sha512-gLX4YmKnZqSwkmSB9OckQUrI5VyXEYiv3J5JKZRxIp8jOQsWjZgHSG/OgEfMQBK9ibdclEdAyIPYggwXoFGXjQ==} engines: {node: '>=v18'} - '@commitlint/parse@20.0.0': - resolution: {integrity: sha512-j/PHCDX2bGM5xGcWObOvpOc54cXjn9g6xScXzAeOLwTsScaL4Y+qd0pFC6HBwTtrH92NvJQc+2Lx9HFkVi48cg==} + '@commitlint/parse@20.2.0': + resolution: {integrity: sha512-LXStagGU1ivh07X7sM+hnEr4BvzFYn1iBJ6DRg2QsIN8lBfSzyvkUcVCDwok9Ia4PWiEgei5HQjju6xfJ1YaSQ==} engines: {node: '>=v18'} - '@commitlint/read@20.0.0': - resolution: {integrity: sha512-Ti7Y7aEgxsM1nkwA4ZIJczkTFRX/+USMjNrL9NXwWQHqNqrBX2iMi+zfuzZXqfZ327WXBjdkRaytJ+z5vNqTOA==} + '@commitlint/read@20.2.0': + resolution: {integrity: sha512-+SjF9mxm5JCbe+8grOpXCXMMRzAnE0WWijhhtasdrpJoAFJYd5UgRTj/oCq5W3HJTwbvTOsijEJ0SUGImECD7Q==} engines: {node: '>=v18'} - '@commitlint/resolve-extends@20.1.0': - resolution: {integrity: sha512-cxKXQrqHjZT3o+XPdqDCwOWVFQiae++uwd9dUBC7f2MdV58ons3uUvASdW7m55eat5sRiQ6xUHyMWMRm6atZWw==} + '@commitlint/resolve-extends@20.2.0': + resolution: {integrity: sha512-KVoLDi9BEuqeq+G0wRABn4azLRiCC22/YHR2aCquwx6bzCHAIN8hMt3Nuf1VFxq/c8ai6s8qBxE8+ZD4HeFTlQ==} engines: {node: '>=v18'} - '@commitlint/rules@20.0.0': - resolution: {integrity: sha512-gvg2k10I/RfvHn5I5sxvVZKM1fl72Sqrv2YY/BnM7lMHcYqO0E2jnRWoYguvBfEcZ39t+rbATlciggVe77E4zA==} + '@commitlint/rules@20.2.0': + resolution: {integrity: sha512-27rHGpeAjnYl/A+qUUiYDa7Yn1WIjof/dFJjYW4gA1Ug+LUGa1P0AexzGZ5NBxTbAlmDgaxSZkLLxtLVqtg8PQ==} engines: {node: '>=v18'} '@commitlint/to-lines@20.0.0': @@ -238,8 +238,8 @@ packages: resolution: {integrity: sha512-drXaPSP2EcopukrUXvUXmsQMu3Ey/FuJDc/5oiW4heoCfoE5BdLQyuc7veGeE3aoQaTVqZnh4D5WTWe2vefYKg==} engines: {node: '>=v18'} - '@commitlint/types@20.0.0': - resolution: {integrity: sha512-bVUNBqG6aznYcYjTjnc3+Cat/iBgbgpflxbIBTnsHTX0YVpnmINPEkSRWymT2Q8aSH3Y7aKnEbunilkYe8TybA==} + '@commitlint/types@20.2.0': + resolution: {integrity: sha512-KTy0OqRDLR5y/zZMnizyx09z/rPlPC/zKhYgH8o/q6PuAjoQAKlRfY4zzv0M64yybQ//6//4H1n14pxaLZfUnA==} engines: {node: '>=v18'} '@cspell/cspell-bundled-dicts@9.4.0': @@ -1439,8 +1439,8 @@ packages: eslint-import-resolver-node: optional: true - eslint-plugin-jsdoc@61.4.1: - resolution: {integrity: sha512-3c1QW/bV25sJ1MsIvsvW+EtLtN6yZMduw7LVQNVt72y2/5BbV5Pg5b//TE5T48LRUxoEQGaZJejCmcj3wCxBzw==} + eslint-plugin-jsdoc@61.5.0: + resolution: {integrity: sha512-PR81eOGq4S7diVnV9xzFSBE4CDENRQGP0Lckkek8AdHtbj+6Bm0cItwlFnxsLFriJHspiE3mpu8U20eODyToIg==} engines: {node: '>=20.11.0'} peerDependencies: eslint: ^7.0.0 || ^8.0.0 || ^9.0.0 @@ -2302,8 +2302,8 @@ packages: resolution: {integrity: sha512-E6rsNU1QNJgB3sjj7OANinGncFKuK+164sLXw1/CqBjj/EkXSoSdHCtWQGBNlREIGLnL7IEUEGa08YFVUbrhVg==} engines: {node: '>=16'} - prettier@3.7.3: - resolution: {integrity: sha512-QgODejq9K3OzoBbuyobZlUhznP5SKwPqp+6Q6xw6o8gnhr4O85L2U915iM2IDcfF2NPXVaM9zlo9tdwipnYwzg==} + prettier@3.7.4: + resolution: {integrity: sha512-v6UNi1+3hSlVvv8fSaoUbggEM5VErKmmpGA7Pl3HF8V6uKY7rvClBOJlH6yNwQtfTueNkGVpOv/mtWL9L4bgRA==} engines: {node: '>=14'} hasBin: true @@ -2858,32 +2858,32 @@ snapshots: '@biomejs/cli-win32-x64@2.3.8': optional: true - '@commitlint/cli@20.1.0(@types/node@24.10.1)(typescript@5.9.3)': + '@commitlint/cli@20.2.0(@types/node@24.10.1)(typescript@5.9.3)': dependencies: - '@commitlint/format': 20.0.0 - '@commitlint/lint': 20.0.0 - '@commitlint/load': 20.1.0(@types/node@24.10.1)(typescript@5.9.3) - '@commitlint/read': 20.0.0 - '@commitlint/types': 20.0.0 + '@commitlint/format': 20.2.0 + '@commitlint/lint': 20.2.0 + '@commitlint/load': 20.2.0(@types/node@24.10.1)(typescript@5.9.3) + '@commitlint/read': 20.2.0 + '@commitlint/types': 20.2.0 tinyexec: 1.0.2 yargs: 17.7.2 transitivePeerDependencies: - '@types/node' - typescript - '@commitlint/config-conventional@20.0.0': + '@commitlint/config-conventional@20.2.0': dependencies: - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 conventional-changelog-conventionalcommits: 7.0.2 - '@commitlint/config-validator@20.0.0': + '@commitlint/config-validator@20.2.0': dependencies: - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 ajv: 8.17.1 - '@commitlint/ensure@20.0.0': + '@commitlint/ensure@20.2.0': dependencies: - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 lodash.camelcase: 4.3.0 lodash.kebabcase: 4.1.1 lodash.snakecase: 4.1.1 @@ -2892,29 +2892,29 @@ snapshots: '@commitlint/execute-rule@20.0.0': {} - '@commitlint/format@20.0.0': + '@commitlint/format@20.2.0': dependencies: - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 chalk: 5.6.2 - '@commitlint/is-ignored@20.0.0': + '@commitlint/is-ignored@20.2.0': dependencies: - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 semver: 7.7.3 - '@commitlint/lint@20.0.0': + '@commitlint/lint@20.2.0': dependencies: - '@commitlint/is-ignored': 20.0.0 - '@commitlint/parse': 20.0.0 - '@commitlint/rules': 20.0.0 - '@commitlint/types': 20.0.0 + '@commitlint/is-ignored': 20.2.0 + '@commitlint/parse': 20.2.0 + '@commitlint/rules': 20.2.0 + '@commitlint/types': 20.2.0 - '@commitlint/load@20.1.0(@types/node@24.10.1)(typescript@5.9.3)': + '@commitlint/load@20.2.0(@types/node@24.10.1)(typescript@5.9.3)': dependencies: - '@commitlint/config-validator': 20.0.0 + '@commitlint/config-validator': 20.2.0 '@commitlint/execute-rule': 20.0.0 - '@commitlint/resolve-extends': 20.1.0 - '@commitlint/types': 20.0.0 + '@commitlint/resolve-extends': 20.2.0 + '@commitlint/types': 20.2.0 chalk: 5.6.2 cosmiconfig: 9.0.0(typescript@5.9.3) cosmiconfig-typescript-loader: 6.2.0(@types/node@24.10.1)(cosmiconfig@9.0.0(typescript@5.9.3))(typescript@5.9.3) @@ -2927,35 +2927,35 @@ snapshots: '@commitlint/message@20.0.0': {} - '@commitlint/parse@20.0.0': + '@commitlint/parse@20.2.0': dependencies: - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 conventional-changelog-angular: 7.0.0 conventional-commits-parser: 5.0.0 - '@commitlint/read@20.0.0': + '@commitlint/read@20.2.0': dependencies: '@commitlint/top-level': 20.0.0 - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 git-raw-commits: 4.0.0 minimist: 1.2.8 tinyexec: 1.0.2 - '@commitlint/resolve-extends@20.1.0': + '@commitlint/resolve-extends@20.2.0': dependencies: - '@commitlint/config-validator': 20.0.0 - '@commitlint/types': 20.0.0 + '@commitlint/config-validator': 20.2.0 + '@commitlint/types': 20.2.0 global-directory: 4.0.1 import-meta-resolve: 4.2.0 lodash.mergewith: 4.6.2 resolve-from: 5.0.0 - '@commitlint/rules@20.0.0': + '@commitlint/rules@20.2.0': dependencies: - '@commitlint/ensure': 20.0.0 + '@commitlint/ensure': 20.2.0 '@commitlint/message': 20.0.0 '@commitlint/to-lines': 20.0.0 - '@commitlint/types': 20.0.0 + '@commitlint/types': 20.2.0 '@commitlint/to-lines@20.0.0': {} @@ -2963,7 +2963,7 @@ snapshots: dependencies: find-up: 7.0.0 - '@commitlint/types@20.0.0': + '@commitlint/types@20.2.0': dependencies: '@types/conventional-commits-parser': 5.0.2 chalk: 5.6.2 @@ -4260,7 +4260,7 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-plugin-jsdoc@61.4.1(eslint@9.39.1(jiti@2.6.1)): + eslint-plugin-jsdoc@61.5.0(eslint@9.39.1(jiti@2.6.1)): dependencies: '@es-joy/jsdoccomment': 0.76.0 '@es-joy/resolve.exports': 1.2.0 @@ -5193,7 +5193,7 @@ snapshots: presentable-error@0.0.1: {} - prettier@3.7.3: {} + prettier@3.7.4: {} prop-types@15.8.1: dependencies: diff --git a/src/pools/abstract-pool.ts b/src/pools/abstract-pool.ts index ec1848e48..507bb151e 100644 --- a/src/pools/abstract-pool.ts +++ b/src/pools/abstract-pool.ts @@ -73,9 +73,9 @@ import { WorkerNode } from './worker-node.js' /** * Base class that implements some shared logic for all poolifier pools. - * @typeParam Worker - Type of worker which manages this pool. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages this pool. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export abstract class AbstractPool< Worker extends IWorker, diff --git a/src/pools/cluster/dynamic.ts b/src/pools/cluster/dynamic.ts index 48d83e4d2..1fcf676b8 100644 --- a/src/pools/cluster/dynamic.ts +++ b/src/pools/cluster/dynamic.ts @@ -7,8 +7,8 @@ import { type ClusterPoolOptions, FixedClusterPool } from './fixed.js' * * This cluster pool creates new workers when the others are busy, up to the maximum number of workers. * When the maximum number of workers is reached and workers are busy, an event is emitted. If you want to listen to this event, use the pool's `emitter`. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. * @author [Christopher Quadflieg](https://github.com/Shinigami92) * @since 2.0.0 */ diff --git a/src/pools/cluster/fixed.ts b/src/pools/cluster/fixed.ts index 6bfd0783c..3f9f51506 100644 --- a/src/pools/cluster/fixed.ts +++ b/src/pools/cluster/fixed.ts @@ -13,8 +13,8 @@ export type ClusterPoolOptions = PoolOptions /** * A cluster pool with a fixed number of workers. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. * @author [Christopher Quadflieg](https://github.com/Shinigami92) * @since 2.0.0 */ diff --git a/src/pools/pool.ts b/src/pools/pool.ts index 9f54fc4d0..fb1ba7b94 100644 --- a/src/pools/pool.ts +++ b/src/pools/pool.ts @@ -74,9 +74,9 @@ export const PoolEvents: Readonly<{ /** * Contract definition for a poolifier pool. - * @typeParam Worker - Type of worker which manages this pool. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages this pool. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export interface IPool< Worker extends IWorker, @@ -289,7 +289,7 @@ export interface PoolInfo { /** * Options for a poolifier pool. - * @typeParam Worker - Type of worker. + * @template Worker - Type of worker. */ export interface PoolOptions { /** diff --git a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts index 6714934ab..e2c825cfe 100644 --- a/src/pools/selection-strategies/abstract-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/abstract-worker-choice-strategy.ts @@ -16,9 +16,9 @@ import { /** * Worker choice strategy abstract base class. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export abstract class AbstractWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts b/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts index a60cc1a65..602a29c66 100644 --- a/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/fair-share-worker-choice-strategy.ts @@ -14,9 +14,9 @@ import { /** * Selects the next worker with a fair share scheduling algorithm. * Loosely modeled after the fair queueing algorithm: https://en.wikipedia.org/wiki/Fair_queuing. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export class FairShareWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts b/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts index 574a3adc3..0eb680db2 100644 --- a/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/interleaved-weighted-round-robin-worker-choice-strategy.ts @@ -13,9 +13,9 @@ import { /** * Selects the next worker with an interleaved weighted round robin scheduling algorithm. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export class InterleavedWeightedRoundRobinWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts b/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts index 62170653f..7bfeca797 100644 --- a/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/least-busy-worker-choice-strategy.ts @@ -13,9 +13,9 @@ import { /** * Selects the least busy worker. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export class LeastBusyWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts b/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts index cda8535c3..e72d57267 100644 --- a/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/least-elu-worker-choice-strategy.ts @@ -13,9 +13,9 @@ import { /** * Selects the worker with the least ELU. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export class LeastEluWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/least-used-worker-choice-strategy.ts b/src/pools/selection-strategies/least-used-worker-choice-strategy.ts index 13e6dd33e..02405f031 100644 --- a/src/pools/selection-strategies/least-used-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/least-used-worker-choice-strategy.ts @@ -11,9 +11,9 @@ import { /** * Selects the least used worker. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export class LeastUsedWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/round-robin-worker-choice-strategy.ts b/src/pools/selection-strategies/round-robin-worker-choice-strategy.ts index 0ec031374..705be6273 100644 --- a/src/pools/selection-strategies/round-robin-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/round-robin-worker-choice-strategy.ts @@ -11,9 +11,9 @@ import { /** * Selects the next worker in a round robin fashion. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export class RoundRobinWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.ts b/src/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.ts index 365fda9df..fdcedc06e 100644 --- a/src/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.ts +++ b/src/pools/selection-strategies/weighted-round-robin-worker-choice-strategy.ts @@ -14,9 +14,9 @@ import { /** * Selects the next worker with a weighted round robin scheduling algorithm. * Loosely modeled after the weighted round robin queueing algorithm: https://en.wikipedia.org/wiki/Weighted_round_robin. - * @typeParam Worker - Type of worker which manages the strategy. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker which manages the strategy. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export class WeightedRoundRobinWorkerChoiceStrategy< Worker extends IWorker, diff --git a/src/pools/selection-strategies/worker-choice-strategies-context.ts b/src/pools/selection-strategies/worker-choice-strategies-context.ts index 66a27865a..8c75842ae 100644 --- a/src/pools/selection-strategies/worker-choice-strategies-context.ts +++ b/src/pools/selection-strategies/worker-choice-strategies-context.ts @@ -18,9 +18,9 @@ import { /** * The worker choice strategies context. - * @typeParam Worker - Type of worker. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Worker - Type of worker. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. * @internal */ export class WorkerChoiceStrategiesContext< diff --git a/src/pools/thread/dynamic.ts b/src/pools/thread/dynamic.ts index 17d759ea9..5102e518a 100644 --- a/src/pools/thread/dynamic.ts +++ b/src/pools/thread/dynamic.ts @@ -7,8 +7,8 @@ import { FixedThreadPool, type ThreadPoolOptions } from './fixed.js' * * This thread pool creates new threads when the others are busy, up to the maximum number of threads. * When the maximum number of threads is reached and workers are busy, an event is emitted. If you want to listen to this event, use the pool's `emitter`. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. * @author [Alessandro Pio Ardizio](https://github.com/pioardi) * @since 0.0.1 */ diff --git a/src/pools/thread/fixed.ts b/src/pools/thread/fixed.ts index bdf63e6a3..3a0a0f904 100644 --- a/src/pools/thread/fixed.ts +++ b/src/pools/thread/fixed.ts @@ -17,8 +17,8 @@ export type ThreadPoolOptions = PoolOptions /** * A thread pool with a fixed number of threads. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. * @author [Alessandro Pio Ardizio](https://github.com/pioardi) * @since 0.0.1 */ diff --git a/src/pools/worker-node.ts b/src/pools/worker-node.ts index 840b3d42f..e47f8475d 100644 --- a/src/pools/worker-node.ts +++ b/src/pools/worker-node.ts @@ -26,8 +26,8 @@ import { /** * Worker node. - * @typeParam Worker - Type of worker. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Worker - Type of worker. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. */ export class WorkerNode extends EventEmitter diff --git a/src/pools/worker.ts b/src/pools/worker.ts index 686389321..db170095b 100644 --- a/src/pools/worker.ts +++ b/src/pools/worker.ts @@ -7,7 +7,7 @@ import type { Task, TaskFunctionProperties } from '../utility-types.js' /** * Callback invoked if the worker raised an error. - * @typeParam Worker - Type of worker. + * @template Worker - Type of worker. */ export type ErrorHandler = ( this: Worker, @@ -16,7 +16,7 @@ export type ErrorHandler = ( /** * Worker event handler. - * @typeParam Worker - Type of worker. + * @template Worker - Type of worker. */ export type EventHandler = | ErrorHandler @@ -26,7 +26,7 @@ export type EventHandler = /** * Callback invoked when the worker exits successfully. - * @typeParam Worker - Type of worker. + * @template Worker - Type of worker. */ export type ExitHandler = ( this: Worker, @@ -35,7 +35,7 @@ export type ExitHandler = ( /** * Callback invoked if the worker has received a message. - * @typeParam Worker - Type of worker. + * @template Worker - Type of worker. */ export type MessageHandler = ( this: Worker, @@ -44,7 +44,7 @@ export type MessageHandler = ( /** * Callback invoked when the worker has started successfully. - * @typeParam Worker - Type of worker. + * @template Worker - Type of worker. */ export type OnlineHandler = (this: Worker) => void @@ -186,8 +186,8 @@ export interface IWorker extends EventEmitter { /** * Worker node interface. - * @typeParam Worker - Type of worker. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Worker - Type of worker. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. * @internal */ export interface IWorkerNode diff --git a/src/queues/abstract-fixed-queue.ts b/src/queues/abstract-fixed-queue.ts index a90849ba3..eba89d3bc 100644 --- a/src/queues/abstract-fixed-queue.ts +++ b/src/queues/abstract-fixed-queue.ts @@ -6,7 +6,7 @@ import { /** * Base fixed queue class. - * @typeParam T - Type of fixed queue data. + * @template T - Type of fixed queue data. * @internal */ export abstract class AbstractFixedQueue implements IFixedQueue { diff --git a/src/queues/fixed-priority-queue.ts b/src/queues/fixed-priority-queue.ts index 6940d8e73..427ac425f 100644 --- a/src/queues/fixed-priority-queue.ts +++ b/src/queues/fixed-priority-queue.ts @@ -4,7 +4,7 @@ import { AbstractFixedQueue } from './abstract-fixed-queue.js' /** * Fixed priority queue. - * @typeParam T - Type of fixed priority queue data. + * @template T - Type of fixed priority queue data. * @internal */ export class FixedPriorityQueue diff --git a/src/queues/fixed-queue.ts b/src/queues/fixed-queue.ts index e18c9d33f..af42e4e78 100644 --- a/src/queues/fixed-queue.ts +++ b/src/queues/fixed-queue.ts @@ -4,7 +4,7 @@ import { AbstractFixedQueue } from './abstract-fixed-queue.js' /** * Fixed queue. - * @typeParam T - Type of fixed queue data. + * @template T - Type of fixed queue data. * @internal */ export class FixedQueue diff --git a/src/queues/priority-queue.ts b/src/queues/priority-queue.ts index 2b3db24ea..503800f39 100644 --- a/src/queues/priority-queue.ts +++ b/src/queues/priority-queue.ts @@ -10,7 +10,7 @@ import { /** * Priority queue. - * @typeParam T - Type of priority queue data. + * @template T - Type of priority queue data. * @internal */ export class PriorityQueue { diff --git a/src/queues/queue-types.ts b/src/queues/queue-types.ts index b4d226dfa..48e00e4d8 100644 --- a/src/queues/queue-types.ts +++ b/src/queues/queue-types.ts @@ -6,7 +6,7 @@ export const defaultQueueSize = 2048 /** * Fixed queue node. - * @typeParam T - Type of fixed queue node data. + * @template T - Type of fixed queue node data. * @internal */ export interface FixedQueueNode { @@ -17,7 +17,7 @@ export interface FixedQueueNode { /** * Fixed queue. - * @typeParam T - Type of fixed queue data. + * @template T - Type of fixed queue data. * @internal */ export interface IFixedQueue { @@ -82,7 +82,7 @@ export const defaultBucketSize = 2048 /** * Priority queue node. - * @typeParam T - Type of priority queue node data. + * @template T - Type of priority queue node data. * @internal */ export interface PriorityQueueNode extends IFixedQueue { diff --git a/src/utility-types.ts b/src/utility-types.ts index cd395c551..b3bdebc39 100644 --- a/src/utility-types.ts +++ b/src/utility-types.ts @@ -7,8 +7,8 @@ import type { KillBehavior } from './worker/worker-options.js' /** * Message object that is passed between main worker and worker. - * @typeParam Data - Type of data sent to the worker or execution response. This can only be structured-cloneable data. - * @typeParam ErrorData - Type of data sent to the worker triggering an error. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker or execution response. This can only be structured-cloneable data. + * @template ErrorData - Type of data sent to the worker triggering an error. This can only be structured-cloneable data. * @internal */ export interface MessageValue @@ -77,7 +77,7 @@ export interface MessageValue /** * An object holding the task execution response promise resolve/reject callbacks. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. * @internal */ export interface PromiseResponseWrapper { @@ -105,7 +105,7 @@ export interface PromiseResponseWrapper { /** * Message object that is passed as a task between main worker and worker. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. * @internal */ export interface Task { @@ -187,7 +187,7 @@ export interface TaskPerformance { /** * Worker error. - * @typeParam Data - Type of data sent to the worker triggering an error. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker triggering an error. This can only be structured-cloneable data. */ export interface WorkerError { /** @@ -233,7 +233,7 @@ export interface WorkerStatistics { /** * Remove readonly modifier from all properties of T. - * @typeParam T - Type to remove readonly modifier. + * @template T - Type to remove readonly modifier. * @internal */ export type Writable = { -readonly [P in keyof T]: T[P] } diff --git a/src/utils.ts b/src/utils.ts index a535d5d69..d15ffbb75 100644 --- a/src/utils.ts +++ b/src/utils.ts @@ -129,7 +129,7 @@ export const isPlainObject = (value: unknown): value is object => /** * Detects whether the given value is a kill behavior or not. - * @typeParam KB - Which specific KillBehavior type to test against. + * @template KB - Which specific KillBehavior type to test against. * @param killBehavior - Which kind of kill behavior to detect. * @param value - Unknown value. * @returns `true` if `value` was strictly equals to `killBehavior`, otherwise `false`. @@ -197,9 +197,9 @@ export const max = (...args: number[]): number => * @param fn - The function to wrap. * @param context - The context to bind the function to. * @returns The wrapped function. - * @typeParam A - The function's arguments. - * @typeParam R - The function's return value. - * @typeParam C - The function's context. + * @template A - The function's arguments. + * @template R - The function's return value. + * @template C - The function's context. * @internal */ // eslint-disable-next-line @typescript-eslint/no-explicit-any, @typescript-eslint/no-unnecessary-type-parameters diff --git a/src/worker/abstract-worker.ts b/src/worker/abstract-worker.ts index 13372cf27..28ab193a8 100644 --- a/src/worker/abstract-worker.ts +++ b/src/worker/abstract-worker.ts @@ -53,9 +53,9 @@ const DEFAULT_WORKER_OPTIONS: Readonly = Object.freeze({ /** * Base class that implements some shared logic for all poolifier workers. - * @typeParam MainWorker - Type of main worker. - * @typeParam Data - Type of data this worker receives from pool's execution. This can only be structured-cloneable data. - * @typeParam Response - Type of response the worker sends back to the main worker. This can only be structured-cloneable data. + * @template MainWorker - Type of main worker. + * @template Data - Type of data this worker receives from pool's execution. This can only be structured-cloneable data. + * @template Response - Type of response the worker sends back to the main worker. This can only be structured-cloneable data. */ export abstract class AbstractWorker< MainWorker extends MessagePort | Worker, diff --git a/src/worker/cluster-worker.ts b/src/worker/cluster-worker.ts index 4a0b56554..a2b626102 100644 --- a/src/worker/cluster-worker.ts +++ b/src/worker/cluster-worker.ts @@ -15,8 +15,8 @@ import { AbstractWorker } from './abstract-worker.js' * * If you use a `DynamicClusterPool` the extra workers that were created will be terminated, * but the minimum number of workers will be guaranteed. - * @typeParam Data - Type of data this worker receives from pool's execution. This can only be structured-cloneable data. - * @typeParam Response - Type of response the worker sends back to the main worker. This can only be structured-cloneable data. + * @template Data - Type of data this worker receives from pool's execution. This can only be structured-cloneable data. + * @template Response - Type of response the worker sends back to the main worker. This can only be structured-cloneable data. * @author [Christopher Quadflieg](https://github.com/Shinigami92) * @since 2.0.0 */ diff --git a/src/worker/task-functions.ts b/src/worker/task-functions.ts index 11099d3c1..7bbcbf938 100644 --- a/src/worker/task-functions.ts +++ b/src/worker/task-functions.ts @@ -5,8 +5,8 @@ import type { WorkerChoiceStrategy } from '../pools/selection-strategies/selecti * This function must return a promise. * @param data - Data sent to the worker. * @returns Execution response promise. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export type TaskAsyncFunction = ( data?: Data @@ -15,8 +15,8 @@ export type TaskAsyncFunction = ( /** * Task function that can be executed. * This function can be synchronous or asynchronous. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export type TaskFunction = | TaskAsyncFunction @@ -24,8 +24,8 @@ export type TaskFunction = /** * Task function object. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export interface TaskFunctionObject { /** @@ -54,8 +54,8 @@ export interface TaskFunctionOperationResult { * Tasks functions that can be executed. * The key is the name of the task function or task function object. * The value is the task function or task function object. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export type TaskFunctions = Record< string, @@ -66,8 +66,8 @@ export type TaskFunctions = Record< * Task synchronous function that can be executed. * @param data - Data sent to the worker. * @returns Execution response. - * @typeParam Data - Type of data sent to the worker. This can only be structured-cloneable data. - * @typeParam Response - Type of execution response. This can only be structured-cloneable data. + * @template Data - Type of data sent to the worker. This can only be structured-cloneable data. + * @template Response - Type of execution response. This can only be structured-cloneable data. */ export type TaskSyncFunction = ( data?: Data diff --git a/src/worker/thread-worker.ts b/src/worker/thread-worker.ts index 2bf172b8e..34bfd5bbb 100644 --- a/src/worker/thread-worker.ts +++ b/src/worker/thread-worker.ts @@ -20,8 +20,8 @@ import { AbstractWorker } from './abstract-worker.js' * * If you use a `DynamicThreadPool` the extra workers that were created will be terminated, * but the minimum number of workers will be guaranteed. - * @typeParam Data - Type of data this worker receives from pool's execution. This can only be structured-cloneable data. - * @typeParam Response - Type of response the worker sends back to the main thread. This can only be structured-cloneable data. + * @template Data - Type of data this worker receives from pool's execution. This can only be structured-cloneable data. + * @template Response - Type of response the worker sends back to the main thread. This can only be structured-cloneable data. * @author [Alessandro Pio Ardizio](https://github.com/pioardi) * @since 0.0.1 */ -- 2.43.0