@alwatr/async-queue 1.2.8 → 1.2.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +6 -0
- package/dist/main.cjs +1 -1
- package/dist/main.mjs +1 -1
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -3,6 +3,12 @@
|
|
|
3
3
|
All notable changes to this project will be documented in this file.
|
|
4
4
|
See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
|
|
5
5
|
|
|
6
|
+
## [1.2.9](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.2.8...@alwatr/async-queue@1.2.9) (2024-08-31)
|
|
7
|
+
|
|
8
|
+
### Miscellaneous Chores
|
|
9
|
+
|
|
10
|
+
* Update package.json exports for [@alwatr](https://github.com/alwatr) packages ([dacb362](https://github.com/Alwatr/nanolib/commit/dacb362b145e3c51b4aba00ff643687a3fac11d2)) by @
|
|
11
|
+
|
|
6
12
|
## [1.2.8](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.2.7...@alwatr/async-queue@1.2.8) (2024-08-31)
|
|
7
13
|
|
|
8
14
|
### Dependencies update
|
package/dist/main.cjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @alwatr/async-queue v1.2.
|
|
1
|
+
/* @alwatr/async-queue v1.2.9 */
|
|
2
2
|
"use strict";var o=Object.defineProperty;var a=Object.getOwnPropertyDescriptor;var h=Object.getOwnPropertyNames;var l=Object.prototype.hasOwnProperty;var p=(e,i)=>{for(var s in i)o(e,s,{get:i[s],enumerable:!0})},u=(e,i,s,r)=>{if(i&&typeof i=="object"||typeof i=="function")for(let t of h(i))!l.call(e,t)&&t!==s&&o(e,t,{get:()=>i[t],enumerable:!(r=a(i,t))||r.enumerable});return e};var c=e=>u(o({},"__esModule",{value:!0}),e);var w={};p(w,{AsyncQueue:()=>n});module.exports=c(w);var m=require("@alwatr/flatomise"),n=class{constructor(){this.i={}}async push(i,s){let r=(0,m.newFlatomise)(),t=this.i[i];this.i[i]=r.promise;try{await t}catch{}return setTimeout(()=>{s().then(r.resolve,r.reject).then(()=>{this.i[i]===r.promise&&delete this.i[i]})},0),r.promise}isRunning(i){return this.i[i]!==void 0}waitForFinish(i){return this.i[i]??Promise.resolve()}waitForAllFinish(){return Promise.all(Object.values(this.i))}};0&&(module.exports={AsyncQueue});
|
|
3
3
|
//# sourceMappingURL=main.cjs.map
|
package/dist/main.mjs
CHANGED
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
/* @alwatr/async-queue v1.2.
|
|
1
|
+
/* @alwatr/async-queue v1.2.9 */
|
|
2
2
|
import{newFlatomise as o}from"@alwatr/flatomise";var r=class{constructor(){this.i={}}async push(i,t){let e=o(),s=this.i[i];this.i[i]=e.promise;try{await s}catch{}return setTimeout(()=>{t().then(e.resolve,e.reject).then(()=>{this.i[i]===e.promise&&delete this.i[i]})},0),e.promise}isRunning(i){return this.i[i]!==void 0}waitForFinish(i){return this.i[i]??Promise.resolve()}waitForAllFinish(){return Promise.all(Object.values(this.i))}};export{r as AsyncQueue};
|
|
3
3
|
//# sourceMappingURL=main.mjs.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@alwatr/async-queue",
|
|
3
|
-
"version": "1.2.
|
|
3
|
+
"version": "1.2.9",
|
|
4
4
|
"description": "A queue that executes async tasks in order like mutex and semaphore methodology for javascript and typescript.",
|
|
5
5
|
"author": "S. Ali Mihandoost <ali.mihandoost@gmail.com>",
|
|
6
6
|
"keywords": [
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"types": "./dist/main.d.ts",
|
|
35
35
|
"exports": {
|
|
36
36
|
".": {
|
|
37
|
+
"types": "./dist/main.d.ts",
|
|
37
38
|
"import": "./dist/main.mjs",
|
|
38
|
-
"require": "./dist/main.cjs"
|
|
39
|
-
"types": "./dist/main.d.ts"
|
|
39
|
+
"require": "./dist/main.cjs"
|
|
40
40
|
}
|
|
41
41
|
},
|
|
42
42
|
"license": "MIT",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"clean": "rm -rfv dist *.tsbuildinfo"
|
|
75
75
|
},
|
|
76
76
|
"dependencies": {
|
|
77
|
-
"@alwatr/flatomise": "^1.1.
|
|
77
|
+
"@alwatr/flatomise": "^1.1.10"
|
|
78
78
|
},
|
|
79
79
|
"devDependencies": {
|
|
80
80
|
"@alwatr/nano-build": "^1.3.8",
|
|
@@ -85,5 +85,5 @@
|
|
|
85
85
|
"jest": "^29.7.0",
|
|
86
86
|
"typescript": "^5.5.4"
|
|
87
87
|
},
|
|
88
|
-
"gitHead": "
|
|
88
|
+
"gitHead": "1f163e85c5f0c769d5dcdf232e8042c64ec1854d"
|
|
89
89
|
}
|