metautil
Advanced tools
Comparing version 5.2.0 to 5.2.1
@@ -31,6 +31,6 @@ 'use strict'; | ||
this.#signal = AbortSignal.any([this.#signal, this.#timeout]); | ||
this.#timeout.addEventListener('abort', () => { | ||
this.#signal.addEventListener('abort', () => { | ||
if (Object.keys(this.defaults).length > 0) this.#default(); | ||
if (this.done) return; | ||
this.fail(this.#timeout.reason); | ||
this.fail(this.#signal.reason); | ||
}); | ||
@@ -37,0 +37,0 @@ } |
@@ -60,9 +60,9 @@ 'use strict'; | ||
if (this.free[index]) throw new Error('Pool: release not captured'); | ||
this.free[index] = true; | ||
this.available++; | ||
if (this.queue.length > 0) { | ||
const { resolve, timer } = this.queue.shift(); | ||
clearTimeout(timer); | ||
if (resolve) setTimeout(resolve, 0, item); | ||
if (resolve) return void setTimeout(resolve, 0, item); | ||
} | ||
this.free[index] = true; | ||
this.available++; | ||
} | ||
@@ -69,0 +69,0 @@ |
{ | ||
"name": "metautil", | ||
"version": "5.2.0", | ||
"version": "5.2.1", | ||
"author": "Timur Shemsedinov <timur.shemsedinov@gmail.com>", | ||
@@ -45,12 +45,12 @@ "license": "MIT", | ||
"devDependencies": { | ||
"@types/node": "^20.10.4", | ||
"eslint": "^8.55.0", | ||
"@types/node": "^20.11.17", | ||
"eslint": "^8.56.0", | ||
"eslint-config-metarhia": "^8.2.2", | ||
"eslint-config-prettier": "^9.1.0", | ||
"eslint-plugin-import": "^2.29.0", | ||
"eslint-plugin-prettier": "^5.0.0", | ||
"eslint-plugin-import": "^2.29.1", | ||
"eslint-plugin-prettier": "^5.1.3", | ||
"metatests": "^0.8.2", | ||
"prettier": "^3.1.1", | ||
"prettier": "^3.2.5", | ||
"typescript": "^5.3.3" | ||
} | ||
} |
@@ -94,3 +94,3 @@ # Metarhia utilities | ||
dc.collect({ key1, key3 }); | ||
const result = await ac; | ||
const result = await dc; | ||
``` | ||
@@ -382,4 +382,4 @@ | ||
Copyright (c) 2017-2023 [Metarhia contributors](https://github.com/metarhia/metautil/graphs/contributors). | ||
Copyright (c) 2017-2024 [Metarhia contributors](https://github.com/metarhia/metautil/graphs/contributors). | ||
Metautil is [MIT licensed](./LICENSE).\ | ||
Metautil is a part of [Metarhia](https://github.com/metarhia) technology stack. |
Sorry, the diff of this file is not supported yet
51760