@alwatr/async-queue 1.2.2 → 1.2.3

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,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.3](https://github.com/Alwatr/nanolib/compare/@alwatr/async-queue@1.2.2...@alwatr/async-queue@1.2.3) (2024-01-31)
7
+
8
+ ### Miscellaneous Chores
9
+
10
+ * **deps:** update ([1a45030](https://github.com/Alwatr/nanolib/commit/1a450305440b710a300787d4ca24b1ed8c6a39d7)) by @AliMD
11
+
6
12
  ## [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
13
 
8
14
  **Note:** Version bump only for package @alwatr/async-queue
@@ -15,7 +21,7 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
15
21
 
16
22
  ### Features
17
23
 
18
- * **async-queue:** Add waitForAllFinish method to AsyncQueue class ([3fdef04](https://github.com/Alwatr/nanolib/commit/3fdef04244c515b727c9ccabfd21d7667b561a83)) by @AliMD
24
+ - **async-queue:** Add waitForAllFinish method to AsyncQueue class ([3fdef04](https://github.com/Alwatr/nanolib/commit/3fdef04244c515b727c9ccabfd21d7667b561a83)) by @AliMD
19
25
 
20
26
  ## [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
27
 
@@ -25,8 +31,8 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
25
31
 
26
32
  ### Features
27
33
 
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
34
+ - **AsyncQueue:** generic type for push method ([aec6710](https://github.com/Alwatr/nanolib/commit/aec6710041347452fa52bb2556e59d24bb0932a3)) by @AliMD
35
+ - **AsyncQueue:** waitForFinish ([47decb4](https://github.com/Alwatr/nanolib/commit/47decb44a21338393d0820e9a965bf27f22dfbcd)) by @AliMD
30
36
 
31
37
  ## [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
38
 
@@ -40,9 +46,9 @@ See [Conventional Commits](https://conventionalcommits.org) for commit guideline
40
46
 
41
47
  ### Bug Fixes
42
48
 
43
- * **async-queue:** remove wait deps ([83b2e11](https://github.com/Alwatr/nanolib/commit/83b2e115a939b90049c4af8d1cd6c4ebee282bf8)) by @njfamirm
49
+ - **async-queue:** remove wait deps ([83b2e11](https://github.com/Alwatr/nanolib/commit/83b2e115a939b90049c4af8d1cd6c4ebee282bf8)) by @njfamirm
44
50
 
45
51
  ### Features
46
52
 
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
53
+ - **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
54
+ - **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.3 */
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.3 */
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.3",
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.4"
78
78
  },
79
79
  "devDependencies": {
80
- "@alwatr/nano-build": "^1.3.2",
80
+ "@alwatr/nano-build": "^1.3.3",
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.1",
84
+ "@types/node": "^20.11.13",
85
85
  "jest": "^29.7.0",
86
86
  "typescript": "^5.3.3"
87
87
  },
88
- "gitHead": "3486060abc5f331a3b8c78da7f1d671ba1139b5d"
88
+ "gitHead": "54726b7ac06d4a6ffb42731b58e8d976de1211bd"
89
89
  }