@alwatr/async-queue 1.2.2 → 1.2.4

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 CHANGED
@@ -3,6 +3,16 @@
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.4](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.2.3...@alwatr/async-queue@1.2.4) (2024-03-28)
7
+
8
+ **Note:** Version bump only for package @alwatr/async-queue
9
+
10
+ ## [1.2.3](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.2.2...@alwatr/async-queue@1.2.3) (2024-01-31)
11
+
12
+ ### Miscellaneous Chores
13
+
14
+ * **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
15
+
6
16
  ## [1.2.2](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.2.1...@alwatr/async-queue@1.2.2) (2024-01-24)
7
17
 
8
18
  **Note:** Version bump only for package @alwatr/async-queue
@@ -15,7 +25,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
15
25
 
16
26
  ### Features
17
27
 
18
- * **async-queue:** Add waitForAllFinish method to AsyncQueue class ([3fdef04](https://github.com/Alwatr/nanolib/commit/3fdef04244c515b727c9ccabfd21d7667b561a83)) by @AliMD
28
+ - **async-queue:** Add waitForAllFinish method to AsyncQueue class ([3fdef04](https://github.com/Alwatr/nanolib/commit/3fdef04244c515b727c9ccabfd21d7667b561a83)) by @AliMD
19
29
 
20
30
  ## [1.1.1](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.1.0...@alwatr/async-queue@1.1.1) (2024-01-16)
21
31
 
@@ -25,8 +35,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
25
35
 
26
36
  ### Features
27
37
 
28
- * **AsyncQueue:** generic type for push method ([aec6710](https://github.com/Alwatr/nanolib/commit/aec6710041347452fa52bb2556e59d24bb0932a3)) by @AliMD
29
- * **AsyncQueue:** waitForFinish ([47decb4](https://github.com/Alwatr/nanolib/commit/47decb44a21338393d0820e9a965bf27f22dfbcd)) by @AliMD
38
+ - **AsyncQueue:** generic type for push method ([aec6710](https://github.com/Alwatr/nanolib/commit/aec6710041347452fa52bb2556e59d24bb0932a3)) by @AliMD
39
+ - **AsyncQueue:** waitForFinish ([47decb4](https://github.com/Alwatr/nanolib/commit/47decb44a21338393d0820e9a965bf27f22dfbcd)) by @AliMD
30
40
 
31
41
  ## [1.0.2](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.0.1...@alwatr/async-queue@1.0.2) (2024-01-08)
32
42
 
@@ -40,9 +50,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
40
50
 
41
51
  ### Bug Fixes
42
52
 
43
- * **async-queue:** remove wait deps ([83b2e11](https://github.com/Alwatr/nanolib/commit/83b2e115a939b90049c4af8d1cd6c4ebee282bf8)) by @njfamirm
53
+ - **async-queue:** remove wait deps ([83b2e11](https://github.com/Alwatr/nanolib/commit/83b2e115a939b90049c4af8d1cd6c4ebee282bf8)) by @njfamirm
44
54
 
45
55
  ### Features
46
56
 
47
- * **async-queue:** A simple async queue like mutex and semaphore methodology for javascript and typescript. ([e753ff2](https://github.com/Alwatr/nanolib/commit/e753ff29cf53e0e6bcdd9661666ee60300960db3)) by @AliMD
48
- * **async-queue:** add isRunning ([2e54a0a](https://github.com/Alwatr/nanolib/commit/2e54a0a5200ccbfcc64e443728eb6d16513b4296)) by @njfamirm
57
+ - **async-queue:** A simple async queue like mutex and semaphore methodology for javascript and typescript. ([e753ff2](https://github.com/Alwatr/nanolib/commit/e753ff29cf53e0e6bcdd9661666ee60300960db3)) by @AliMD
58
+ - **async-queue:** add isRunning ([2e54a0a](https://github.com/Alwatr/nanolib/commit/2e54a0a5200ccbfcc64e443728eb6d16513b4296)) by @njfamirm
package/dist/main.cjs CHANGED
@@ -1,3 +1,3 @@
1
- /* @alwatr/async-queue v1.2.2 */
1
+ /* @alwatr/async-queue v1.2.4 */
2
2
  "use strict";var o=Object.defineProperty;var h=Object.getOwnPropertyDescriptor;var l=Object.getOwnPropertyNames;var p=Object.prototype.hasOwnProperty;var u=(e,i,r)=>i in e?o(e,i,{enumerable:!0,configurable:!0,writable:!0,value:r}):e[i]=r;var c=(e,i)=>{for(var r in i)o(e,r,{get:i[r],enumerable:!0})},w=(e,i,r,t)=>{if(i&&typeof i=="object"||typeof i=="function")for(let s of l(i))!p.call(e,s)&&s!==r&&o(e,s,{get:()=>i[s],enumerable:!(t=h(i,s))||t.enumerable});return e};var P=e=>w(o({},"__esModule",{value:!0}),e);var m=(e,i,r)=>(u(e,typeof i!="symbol"?i+"":i,r),r);var T={};c(T,{AsyncQueue:()=>n});module.exports=P(T);var a=require("@alwatr/flatomise"),n=class{constructor(){m(this,"i",{})}async push(i,r){let t=(0,a.newFlatomise)(),s=this.i[i];this.i[i]=t.promise;try{await s}catch{}return setTimeout(()=>{r().then(t.resolve,t.reject).then(()=>{this.i[i]===t.promise&&delete this.i[i]})},0),t.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.2 */
1
+ /* @alwatr/async-queue v1.2.4 */
2
2
  var m=Object.defineProperty;var a=(r,i,e)=>i in r?m(r,i,{enumerable:!0,configurable:!0,writable:!0,value:e}):r[i]=e;var s=(r,i,e)=>(a(r,typeof i!="symbol"?i+"":i,e),e);import{newFlatomise as h}from"@alwatr/flatomise";var o=class{constructor(){s(this,"i",{})}async push(i,e){let t=h(),n=this.i[i];this.i[i]=t.promise;try{await n}catch{}return setTimeout(()=>{e().then(t.resolve,t.reject).then(()=>{this.i[i]===t.promise&&delete this.i[i]})},0),t.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{o 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.2",
3
+ "version": "1.2.4",
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": [
@@ -74,16 +74,16 @@
74
74
  "clean": "rm -rfv dist *.tsbuildinfo"
75
75
  },
76
76
  "dependencies": {
77
- "@alwatr/flatomise": "^1.1.3"
77
+ "@alwatr/flatomise": "^1.1.5"
78
78
  },
79
79
  "devDependencies": {
80
- "@alwatr/nano-build": "^1.3.2",
80
+ "@alwatr/nano-build": "^1.3.4",
81
81
  "@alwatr/prettier-config": "^1.0.4",
82
- "@alwatr/tsconfig-base": "^1.1.1",
83
- "@alwatr/type-helper": "^1.2.0",
84
- "@types/node": "^20.11.6",
82
+ "@alwatr/tsconfig-base": "^1.1.2",
83
+ "@alwatr/type-helper": "^1.2.2",
84
+ "@types/node": "^20.11.30",
85
85
  "jest": "^29.7.0",
86
- "typescript": "^5.3.3"
86
+ "typescript": "^5.4.3"
87
87
  },
88
- "gitHead": "3486060abc5f331a3b8c78da7f1d671ba1139b5d"
88
+ "gitHead": "df149736d1e85335aaeb9c547ff3bdd1161f9b33"
89
89
  }