lightning-pool 4.12.0 → 4.13.0
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 +436 -0
- package/{types/index.d.ts → index.d.ts} +1 -1
- package/package.json +8 -20
- package/{esm/pool-options.js → pool-options.js} +12 -11
- package/{esm/pool-request.js → pool-request.js} +5 -1
- package/{types/pool.d.ts → pool.d.ts} +5 -4
- package/{esm/pool.js → pool.js} +11 -7
- package/{esm/resource-item.js → resource-item.js} +6 -3
- package/cjs/abort-error.js +0 -6
- package/cjs/constants.js +0 -16
- package/cjs/index.js +0 -12
- package/cjs/package.json +0 -3
- package/cjs/pool-options.js +0 -128
- package/cjs/pool-request.js +0 -25
- package/cjs/pool.js +0 -486
- package/cjs/resource-item.js +0 -13
- package/cjs/tsconfig-build-cjs.tsbuildinfo +0 -1
- package/cjs/types.js +0 -2
- package/esm/package.json +0 -3
- package/esm/tsconfig-build-esm.tsbuildinfo +0 -1
- package/types/index.d.cts +0 -7
- /package/{types/abort-error.d.ts → abort-error.d.ts} +0 -0
- /package/{esm/abort-error.js → abort-error.js} +0 -0
- /package/{types/constants.d.ts → constants.d.ts} +0 -0
- /package/{esm/constants.js → constants.js} +0 -0
- /package/{esm/index.js → index.js} +0 -0
- /package/{types/pool-options.d.ts → pool-options.d.ts} +0 -0
- /package/{types/pool-request.d.ts → pool-request.d.ts} +0 -0
- /package/{types/resource-item.d.ts → resource-item.d.ts} +0 -0
- /package/{types/types.d.ts → types.d.ts} +0 -0
- /package/{esm/types.js → types.js} +0 -0
package/CHANGELOG.md
ADDED
|
@@ -0,0 +1,436 @@
|
|
|
1
|
+
## Changelog
|
|
2
|
+
|
|
3
|
+
### [v4.13.0](https://github.com/panates/lightning-pool/compare/v4.12.0...v4.13.0) -
|
|
4
|
+
|
|
5
|
+
### [v4.12.0](https://github.com/panates/lightning-pool/compare/v4.11.1...v4.12.0) - 4 December 2025
|
|
6
|
+
|
|
7
|
+
#### 🛠 Refactoring and Updates
|
|
8
|
+
|
|
9
|
+
- refactor: Now any closed pool can be started again @Eray Hanoğlu
|
|
10
|
+
|
|
11
|
+
### [v4.11.1](https://github.com/panates/lightning-pool/compare/v4.11.0...v4.11.1) - 2 May 2025
|
|
12
|
+
|
|
13
|
+
#### 💬 General Changes
|
|
14
|
+
|
|
15
|
+
- dev: Fixed circular typing dependencies @Eray Hanoğlu
|
|
16
|
+
- doc: Fixed ci-test badge @Eray Hanoğlu
|
|
17
|
+
- dev: Added git+ to repository url @Eray Hanoğlu
|
|
18
|
+
|
|
19
|
+
### [v4.11.0](https://github.com/panates/lightning-pool/compare/v4.10.1...v4.11.0) - 2 May 2025
|
|
20
|
+
|
|
21
|
+
### [v4.10.1](https://github.com/panates/lightning-pool/compare/v4.10.0...v4.10.1) - 28 January 2025
|
|
22
|
+
|
|
23
|
+
#### 🛠 Refactoring and Updates
|
|
24
|
+
|
|
25
|
+
- refactor: Updated dependencies @Eray Hanoğlu
|
|
26
|
+
- refactor: Updated dependencies @Eray Hanoğlu
|
|
27
|
+
|
|
28
|
+
### [v4.10.0](https://github.com/panates/lightning-pool/compare/v4.9.0...v4.10.0) - 15 October 2024
|
|
29
|
+
|
|
30
|
+
- fix: pool.close does not wait for asynchronous resources to be destroyed
|
|
31
|
+
|
|
32
|
+
### [v4.9.0](https://github.com/panates/lightning-pool/compare/v4.8.0...v4.9.0) - 15 October 2024
|
|
33
|
+
|
|
34
|
+
- fix: Pool does not destroy resources unless started.
|
|
35
|
+
|
|
36
|
+
### [v4.8.0](https://github.com/panates/lightning-pool/compare/v4.7.3...v4.8.0) - 20 August 2024
|
|
37
|
+
|
|
38
|
+
#### 💬 General Changes
|
|
39
|
+
|
|
40
|
+
- Fixed compatibility for "Node16" and "NodeNext" moduleResolution options @Eray Hanoğlu
|
|
41
|
+
|
|
42
|
+
### [v4.7.3](https://github.com/panates/lightning-pool/compare/v4.7.2...v4.7.3) - 12 August 2024
|
|
43
|
+
|
|
44
|
+
#### 💬 General Changes
|
|
45
|
+
|
|
46
|
+
- Applied publint to check package.json @Eray Hanoğlu
|
|
47
|
+
|
|
48
|
+
### [v4.7.2](https://github.com/panates/lightning-pool/compare/v4.7.1...v4.7.2) - 12 August 2024
|
|
49
|
+
|
|
50
|
+
#### 💬 General Changes
|
|
51
|
+
|
|
52
|
+
- Added "node" moduleResolution support @Eray Hanoğlu
|
|
53
|
+
- Added "node" moduleResolution support @Eray Hanoğlu
|
|
54
|
+
|
|
55
|
+
### [v4.7.1](https://github.com/panates/lightning-pool/compare/v4.7.0...v4.7.1) - 12 August 2024
|
|
56
|
+
|
|
57
|
+
#### 💬 General Changes
|
|
58
|
+
|
|
59
|
+
- Applied publint to check package.json @Eray Hanoğlu
|
|
60
|
+
|
|
61
|
+
### [v4.7.0](https://github.com/panates/lightning-pool/compare/v4.6.1...v4.7.0) - 12 August 2024
|
|
62
|
+
|
|
63
|
+
#### 🪲 Fixes
|
|
64
|
+
|
|
65
|
+
- Fix: Added package.json in esm directory which overwrite "type" property to "module" @Eray Hanoğlu
|
|
66
|
+
|
|
67
|
+
### [v4.6.1](https://github.com/panates/lightning-pool/compare/v4.6.0...v4.6.1) - 12 August 2024
|
|
68
|
+
|
|
69
|
+
### [v4.6.0](https://github.com/panates/lightning-pool/compare/v4.5.0...v4.6.0) - 12 August 2024
|
|
70
|
+
|
|
71
|
+
#### 💬 General Changes
|
|
72
|
+
|
|
73
|
+
- Rollback to ES2020 @Eray Hanoğlu
|
|
74
|
+
|
|
75
|
+
### [v4.5.0](https://github.com/panates/lightning-pool/compare/v4.4.3...v4.5.0) - 9 August 2024
|
|
76
|
+
|
|
77
|
+
#### 💬 General Changes
|
|
78
|
+
|
|
79
|
+
- Made ready for Node16 moduleResolution @Eray Hanoğlu
|
|
80
|
+
|
|
81
|
+
### [v4.4.3](https://github.com/panates/lightning-pool/compare/v4.4.2...v4.4.3) - 3 August 2024
|
|
82
|
+
|
|
83
|
+
#### 💬 General Changes
|
|
84
|
+
|
|
85
|
+
- Fixed files config @Eray Hanoğlu
|
|
86
|
+
|
|
87
|
+
### [v4.4.2](https://github.com/panates/lightning-pool/compare/v4.4.1...v4.4.2) - 3 August 2024
|
|
88
|
+
|
|
89
|
+
#### 💬 General Changes
|
|
90
|
+
|
|
91
|
+
- Fixed typings config @Eray Hanoğlu
|
|
92
|
+
|
|
93
|
+
### [v4.4.1](https://github.com/panates/lightning-pool/compare/v4.4.0...v4.4.1) - 3 August 2024
|
|
94
|
+
|
|
95
|
+
#### 💬 General Changes
|
|
96
|
+
|
|
97
|
+
- Added "tslib" to dependencies @Eray Hanoğlu
|
|
98
|
+
- Added "factoryCreateOptions" argument to .acquire() method. This argument will be passed to factory.create method @Eray Hanoğlu
|
|
99
|
+
- Revert "Added "factoryCreateOptions" argument to .acquire() method. This argument will be passed to factory.create method" @Eray Hanoğlu
|
|
100
|
+
|
|
101
|
+
### [v4.4.0](https://github.com/panates/lightning-pool/compare/v4.3.0...v4.4.0) - 29 July 2024
|
|
102
|
+
|
|
103
|
+
#### 💬 General Changes
|
|
104
|
+
|
|
105
|
+
- Revert "Added "factoryCreateOptions" argument to .acquire() method. This argument will be passed to factory.create method" @Eray Hanoğlu
|
|
106
|
+
|
|
107
|
+
### [v4.3.0](https://github.com/panates/lightning-pool/compare/v4.2.2...v4.3.0) - 29 July 2024
|
|
108
|
+
|
|
109
|
+
#### 💬 General Changes
|
|
110
|
+
|
|
111
|
+
- Moved lint config to @panates/eslint-config-ts @Eray Hanoğlu
|
|
112
|
+
- Updated dependencies @Eray Hanoğlu
|
|
113
|
+
- Updated dependencies @Eray Hanoğlu
|
|
114
|
+
- Updated dependencies @Eray Hanoğlu
|
|
115
|
+
- Added "factoryCreateOptions" argument to .acquire() method. This argument will be passed to factory.create method @Eray Hanoğlu
|
|
116
|
+
- Updated config @Eray Hanoğlu
|
|
117
|
+
- Updated config @Eray Hanoğlu
|
|
118
|
+
- Updated config @Eray Hanoğlu
|
|
119
|
+
- Updated config @Eray Hanoğlu
|
|
120
|
+
- Updated config @Eray Hanoğlu
|
|
121
|
+
- Updated config @Eray Hanoğlu
|
|
122
|
+
- Updated node versions @Eray Hanoğlu
|
|
123
|
+
- Updated node versions @Eray Hanoğlu
|
|
124
|
+
- Updated node versions @Eray Hanoğlu
|
|
125
|
+
- Updated node versions @Eray Hanoğlu
|
|
126
|
+
- Updated config @Eray Hanoğlu
|
|
127
|
+
- Updated node versions @Eray Hanoğlu
|
|
128
|
+
- Updated config @Eray Hanoğlu
|
|
129
|
+
- Updated config @Eray Hanoğlu
|
|
130
|
+
- Updated node versions @Eray Hanoğlu
|
|
131
|
+
- Updated config @Eray Hanoğlu
|
|
132
|
+
|
|
133
|
+
### [v4.2.2](https://github.com/panates/lightning-pool/compare/v4.2.1...v4.2.2) - 10 September 2023
|
|
134
|
+
|
|
135
|
+
#### 💬 General Changes
|
|
136
|
+
|
|
137
|
+
- updated dependencies @Eray Hanoğlu
|
|
138
|
+
|
|
139
|
+
### [v4.2.1](https://github.com/panates/lightning-pool/compare/v4.2.0...v4.2.1) - 9 January 2023
|
|
140
|
+
|
|
141
|
+
#### 💬 General Changes
|
|
142
|
+
|
|
143
|
+
- updated dependencies @Eray Hanoğlu
|
|
144
|
+
|
|
145
|
+
### [v4.2.0](https://github.com/panates/lightning-pool/compare/v4.1.0...v4.2.0) - 14 October 2022
|
|
146
|
+
|
|
147
|
+
#### 💬 General Changes
|
|
148
|
+
|
|
149
|
+
- Fixed typing @Eray Hanoğlu
|
|
150
|
+
|
|
151
|
+
### [v4.1.0](https://github.com/panates/lightning-pool/compare/v4.0.0...v4.1.0) - 22 September 2022
|
|
152
|
+
|
|
153
|
+
#### 💬 General Changes
|
|
154
|
+
|
|
155
|
+
- Fixed exports for multi module support @Eray Hanoğlu
|
|
156
|
+
- Update CircleCI config @Eray Hanoğlu
|
|
157
|
+
- Update CircleCI config @Eray Hanoğlu
|
|
158
|
+
- Update CircleCI config @Eray Hanoğlu
|
|
159
|
+
- Update CircleCI config @Eray Hanoğlu
|
|
160
|
+
- Update CircleCI config @Eray Hanoğlu
|
|
161
|
+
- Update CircleCI confi @Eray Hanoğlu
|
|
162
|
+
- Update CircleCI config @Eray Hanoğlu
|
|
163
|
+
|
|
164
|
+
## [v4.0.0](https://github.com/panates/lightning-pool/compare/v3.1.4...v4.0.0) - 17 September 2022
|
|
165
|
+
|
|
166
|
+
#### 💬 General Changes
|
|
167
|
+
|
|
168
|
+
- Added ESM module support @Eray Hanoğlu
|
|
169
|
+
- Updated dependencies @Eray Hanoğlu
|
|
170
|
+
|
|
171
|
+
### [v3.1.4](https://github.com/panates/lightning-pool/compare/v3.1.3...v3.1.4) - 20 July 2022
|
|
172
|
+
|
|
173
|
+
#### 💬 General Changes
|
|
174
|
+
|
|
175
|
+
- Updated dependencies @Eray Hanoğlu
|
|
176
|
+
|
|
177
|
+
### [v3.1.3](https://github.com/panates/lightning-pool/compare/v3.1.2...v3.1.3) - 3 July 2021
|
|
178
|
+
|
|
179
|
+
#### 💬 General Changes
|
|
180
|
+
|
|
181
|
+
- Updated dependencies @Eray Hanoğlu
|
|
182
|
+
|
|
183
|
+
### [v3.1.2](https://github.com/panates/lightning-pool/compare/v3.1.1...v3.1.2) - 30 May 2021
|
|
184
|
+
|
|
185
|
+
#### 💬 General Changes
|
|
186
|
+
|
|
187
|
+
- Lint @Eray Hanoğlu
|
|
188
|
+
|
|
189
|
+
### [v3.1.1](https://github.com/panates/lightning-pool/compare/v3.1.0...v3.1.1) - 17 March 2021
|
|
190
|
+
|
|
191
|
+
#### 💬 General Changes
|
|
192
|
+
|
|
193
|
+
- Updated dependencies @Eray Hanoğlu
|
|
194
|
+
- Updated dependencies @Eray Hanoğlu
|
|
195
|
+
- Updated dependencies @Eray Hanoğlu
|
|
196
|
+
|
|
197
|
+
### [v3.1.0](https://github.com/panates/lightning-pool/compare/v3.0.1...v3.1.0) - 9 December 2020
|
|
198
|
+
|
|
199
|
+
#### 💬 General Changes
|
|
200
|
+
|
|
201
|
+
- Added releaseAsync() and destroyAsync() for async release operations. @Eray Hanoğlu
|
|
202
|
+
- Updated node versions @Eray Hanoğlu
|
|
203
|
+
|
|
204
|
+
### [v3.0.1](https://github.com/panates/lightning-pool/compare/v3.0.0...v3.0.1) - 19 November 2020
|
|
205
|
+
|
|
206
|
+
#### 💬 General Changes
|
|
207
|
+
|
|
208
|
+
- Moved all codebase to TypeScript @Eray Hanoğlu
|
|
209
|
+
- Updated readme @Eray Hanoğlu
|
|
210
|
+
- Immediately destroy resource when force it true @Eray Hanoğlu
|
|
211
|
+
|
|
212
|
+
## [v3.0.0](https://github.com/panates/lightning-pool/compare/v2.4.0...v3.0.0) - 19 November 2020
|
|
213
|
+
|
|
214
|
+
#### 💬 General Changes
|
|
215
|
+
|
|
216
|
+
- Moved all codebase to TypeScript @Eray Hanoğlu
|
|
217
|
+
|
|
218
|
+
### [v2.4.0](https://github.com/panates/lightning-pool/compare/v2.3.0...v2.4.0) - 17 November 2020
|
|
219
|
+
|
|
220
|
+
#### 💬 General Changes
|
|
221
|
+
|
|
222
|
+
- Added waitTerminateTime to close() method. Now the pool can wait for given time before terminating the pool. @Eray Hanoğlu
|
|
223
|
+
|
|
224
|
+
### [v2.3.0](https://github.com/panates/lightning-pool/compare/v2.2.0...v2.3.0) - 9 October 2020
|
|
225
|
+
|
|
226
|
+
#### 💬 General Changes
|
|
227
|
+
|
|
228
|
+
- Removed resetOnReturn option. Reset will be executed if factory has reset method. @Eray Hanoğlu
|
|
229
|
+
- Removed resetOnReturn option. Reset will be executed if factory has reset method. @Eray Hanoğlu
|
|
230
|
+
|
|
231
|
+
### [v2.2.0](https://github.com/panates/lightning-pool/compare/v2.1.13...v2.2.0) - 1 October 2020
|
|
232
|
+
|
|
233
|
+
#### 💬 General Changes
|
|
234
|
+
|
|
235
|
+
- Updated dependencies @Eray Hanoğlu
|
|
236
|
+
|
|
237
|
+
### [v2.1.13](https://github.com/panates/lightning-pool/compare/v2.1.12...v2.1.13) - 30 September 2020
|
|
238
|
+
|
|
239
|
+
#### 💬 General Changes
|
|
240
|
+
|
|
241
|
+
- Updated typing @Eray Hanoğlu
|
|
242
|
+
|
|
243
|
+
### [v2.1.12](https://github.com/panates/lightning-pool/compare/v2.1.11...v2.1.12) - 25 September 2020
|
|
244
|
+
|
|
245
|
+
#### 💬 General Changes
|
|
246
|
+
|
|
247
|
+
- Updated typing @Eray Hanoğlu
|
|
248
|
+
|
|
249
|
+
### [v2.1.11](https://github.com/panates/lightning-pool/compare/v2.1.10...v2.1.11) - 24 September 2020
|
|
250
|
+
|
|
251
|
+
#### 💬 General Changes
|
|
252
|
+
|
|
253
|
+
- Updated typing @Eray Hanoğlu
|
|
254
|
+
|
|
255
|
+
### [v2.1.10](https://github.com/panates/lightning-pool/compare/v2.1.9...v2.1.10) - 22 September 2020
|
|
256
|
+
|
|
257
|
+
#### 💬 General Changes
|
|
258
|
+
|
|
259
|
+
- Updated typing @Eray Hanoğlu
|
|
260
|
+
|
|
261
|
+
### [v2.1.9](https://github.com/panates/lightning-pool/compare/v2.1.8...v2.1.9) - 22 September 2020
|
|
262
|
+
|
|
263
|
+
#### 💬 General Changes
|
|
264
|
+
|
|
265
|
+
- Updated typing @Eray Hanoğlu
|
|
266
|
+
|
|
267
|
+
### [v2.1.8](https://github.com/panates/lightning-pool/compare/v2.1.7...v2.1.8) - 22 September 2020
|
|
268
|
+
|
|
269
|
+
#### 💬 General Changes
|
|
270
|
+
|
|
271
|
+
- Updated dependencies @Eray Hanoğlu
|
|
272
|
+
|
|
273
|
+
### [v2.1.7](https://github.com/panates/lightning-pool/compare/v2.1.6...v2.1.7) - 18 August 2020
|
|
274
|
+
|
|
275
|
+
#### 💬 General Changes
|
|
276
|
+
|
|
277
|
+
- Updated dependencies @Eray Hanoğlu
|
|
278
|
+
|
|
279
|
+
### [v2.1.6](https://github.com/panates/lightning-pool/compare/v2.1.5...v2.1.6) - 16 July 2020
|
|
280
|
+
|
|
281
|
+
#### 💬 General Changes
|
|
282
|
+
|
|
283
|
+
- Updated dependencies @Eray Hanoğlu
|
|
284
|
+
- Updated dependencies @Eray Hanoğlu
|
|
285
|
+
|
|
286
|
+
### [v2.1.5](https://github.com/panates/lightning-pool/compare/v2.1.4...v2.1.5) - 9 April 2020
|
|
287
|
+
|
|
288
|
+
#### 💬 General Changes
|
|
289
|
+
|
|
290
|
+
- Updated dependencies @Eray Hanoğlu
|
|
291
|
+
|
|
292
|
+
### [v2.1.4](https://github.com/panates/lightning-pool/compare/v2.1.3...v2.1.4) - 9 April 2020
|
|
293
|
+
|
|
294
|
+
### [v2.1.3](https://github.com/panates/lightning-pool/compare/v2.1.2...v2.1.3) - 13 December 2019
|
|
295
|
+
|
|
296
|
+
- [PoolRequest] make callback optional
|
|
297
|
+
|
|
298
|
+
#### 💬 General Changes
|
|
299
|
+
|
|
300
|
+
- Updated dependencies @Eray Hanoğlu
|
|
301
|
+
|
|
302
|
+
### [v2.1.2](https://github.com/panates/lightning-pool/compare/v2.1.1...v2.1.2) - 29 August 2019
|
|
303
|
+
|
|
304
|
+
#### 💬 General Changes
|
|
305
|
+
|
|
306
|
+
- Updated dependencies @Eray Hanoğlu
|
|
307
|
+
|
|
308
|
+
### [v2.1.1](https://github.com/panates/lightning-pool/compare/v2.1.0...v2.1.1) - 6 August 2019
|
|
309
|
+
|
|
310
|
+
#### 💬 General Changes
|
|
311
|
+
|
|
312
|
+
- No need calling stop to exiting program. @Eray Hanoğlu
|
|
313
|
+
|
|
314
|
+
### [v2.1.0](https://github.com/panates/lightning-pool/compare/v2.0.10...v2.1.0) - 6 August 2019
|
|
315
|
+
|
|
316
|
+
#### 💬 General Changes
|
|
317
|
+
|
|
318
|
+
- Added typings for TypeScript @Eray Hanoğlu
|
|
319
|
+
|
|
320
|
+
### [v2.0.10](https://github.com/panates/lightning-pool/compare/v2.0.9...v2.0.10) - 11 April 2019
|
|
321
|
+
|
|
322
|
+
#### 💬 General Changes
|
|
323
|
+
|
|
324
|
+
- Updated dependencies @Eray Hanoğlu
|
|
325
|
+
|
|
326
|
+
### [v2.0.9](https://github.com/panates/lightning-pool/compare/v2.0.8...v2.0.9) - 11 February 2019
|
|
327
|
+
|
|
328
|
+
#### 💬 General Changes
|
|
329
|
+
|
|
330
|
+
- Updated dependencies @Eray Hanoğlu
|
|
331
|
+
|
|
332
|
+
### [v2.0.8](https://github.com/panates/lightning-pool/compare/v2.0.7...v2.0.8) - 14 December 2018
|
|
333
|
+
|
|
334
|
+
#### 💬 General Changes
|
|
335
|
+
|
|
336
|
+
- Updated dependencies @Eray Hanoğlu
|
|
337
|
+
- [-] Fixed assert.rejects and assert.doesNotReject error for old node versions @Eray Hanoğlu
|
|
338
|
+
- [-] Fixed test a bug @Eray Hanoğlu
|
|
339
|
+
|
|
340
|
+
### [v2.0.7](https://github.com/panates/lightning-pool/compare/v2.0.6...v2.0.7) - 26 November 2018
|
|
341
|
+
|
|
342
|
+
#### 💬 General Changes
|
|
343
|
+
|
|
344
|
+
- Updated dependencies @Eray Hanoğlu
|
|
345
|
+
- Updated dependencies @Eray Hanoğlu
|
|
346
|
+
|
|
347
|
+
### [v2.0.6](https://github.com/panates/lightning-pool/compare/v2.0.4...v2.0.6) - 26 November 2018
|
|
348
|
+
|
|
349
|
+
#### 💬 General Changes
|
|
350
|
+
|
|
351
|
+
- Updated dependencies @Eray Hanoğlu
|
|
352
|
+
- Updated dependencies @Eray Hanoğlu
|
|
353
|
+
- Updated dependencies @Eray Hanoğlu
|
|
354
|
+
- Updated dependencies @Eray Hanoğlu
|
|
355
|
+
|
|
356
|
+
### [v2.0.4](https://github.com/panates/lightning-pool/compare/v2.0.1...v2.0.4) - 13 October 2018
|
|
357
|
+
|
|
358
|
+
#### 💬 General Changes
|
|
359
|
+
|
|
360
|
+
- Updated dev dependencies @Eray Hanoğlu
|
|
361
|
+
- Updated dependencies @Eray Hanoglu
|
|
362
|
+
- Fixed travis script @Eray Hanoğlu
|
|
363
|
+
- Coverage optimizations @Eray Hanoğlu
|
|
364
|
+
- Updated travis script @Eray Hanoğlu
|
|
365
|
+
- Updated travis script @Eray Hanoğlu
|
|
366
|
+
- Updated dev dependencies @Eray Hanoğlu
|
|
367
|
+
- - Fixed inline documentation @Eray Hanoglu
|
|
368
|
+
|
|
369
|
+
### [v2.0.1](https://github.com/panates/lightning-pool/compare/v2.0.0...v2.0.1) - 27 August 2018
|
|
370
|
+
|
|
371
|
+
#### 💬 General Changes
|
|
372
|
+
|
|
373
|
+
- * Updated benchmark. Removed advanced-pool comparison (it is so slow to compare) @Eray Hanoglu
|
|
374
|
+
- * Updated benchmark. Removed advanced-pool comparison (it is so slow to compare) @Eray Hanoglu
|
|
375
|
+
- - Fix: State does not set to ACQUIRED after validate @Eray Hanoglu
|
|
376
|
+
- * Updated benchmark. Removed advanced-pool comparison (it is so slow to compare) @Eray Hanoglu
|
|
377
|
+
|
|
378
|
+
## [v2.0.0](https://github.com/panates/lightning-pool/compare/v1.2.0...v2.0.0) - 13 August 2018
|
|
379
|
+
|
|
380
|
+
#### 💬 General Changes
|
|
381
|
+
|
|
382
|
+
- * Removed obsolete callback support. Now factory works with promises only. @Eray Hanoglu
|
|
383
|
+
|
|
384
|
+
### [v1.2.0](https://github.com/panates/lightning-pool/compare/v1.1.2...v1.2.0) - 10 August 2018
|
|
385
|
+
|
|
386
|
+
#### 💬 General Changes
|
|
387
|
+
|
|
388
|
+
- * Moved to JavaScript ES6 @Eray Hanoglu
|
|
389
|
+
|
|
390
|
+
### [v1.1.2](https://github.com/panates/lightning-pool/compare/v1.1.1...v1.1.2) - 12 March 2018
|
|
391
|
+
|
|
392
|
+
#### 💬 General Changes
|
|
393
|
+
|
|
394
|
+
- Updated dependencies @Eray Hanoglu
|
|
395
|
+
|
|
396
|
+
### [v1.1.1](https://github.com/panates/lightning-pool/compare/v1.1.0...v1.1.1) - 12 March 2018
|
|
397
|
+
|
|
398
|
+
#### 💬 General Changes
|
|
399
|
+
|
|
400
|
+
- Updated dependencies @Eray Hanoglu
|
|
401
|
+
- Removed redundant export @Eray Hanoglu
|
|
402
|
+
|
|
403
|
+
### [v1.1.0](https://github.com/panates/lightning-pool/compare/v1.0.4...v1.1.0) - 10 January 2018
|
|
404
|
+
|
|
405
|
+
#### 💬 General Changes
|
|
406
|
+
|
|
407
|
+
- Renamed "stop" with "close" @Eray Hanoglu
|
|
408
|
+
|
|
409
|
+
### [v1.0.4](https://github.com/panates/lightning-pool/compare/v1.0.3...v1.0.4) - 10 January 2018
|
|
410
|
+
|
|
411
|
+
#### 💬 General Changes
|
|
412
|
+
|
|
413
|
+
- [fix] Added missed EventEmitter.apply @Eray Hanoglu
|
|
414
|
+
|
|
415
|
+
### [v1.0.3](https://github.com/panates/lightning-pool/compare/v1.0.2...v1.0.3) - 10 January 2018
|
|
416
|
+
|
|
417
|
+
#### 💬 General Changes
|
|
418
|
+
|
|
419
|
+
- [fix] Fix throwing error when use "min" @Eray Hanoglu
|
|
420
|
+
- [fix] Fix invalid assert code @Eray Hanoglu
|
|
421
|
+
|
|
422
|
+
### [v1.0.2](https://github.com/panates/lightning-pool/compare/v1.0.1...v1.0.2) - 13 November 2017
|
|
423
|
+
|
|
424
|
+
#### 💬 General Changes
|
|
425
|
+
|
|
426
|
+
- Shutdown process improved. @Eray Hanoglu
|
|
427
|
+
|
|
428
|
+
### v1.0.1
|
|
429
|
+
|
|
430
|
+
#### 💬 General Changes
|
|
431
|
+
|
|
432
|
+
- First release @Eray Hanoglu
|
|
433
|
+
- Initial commit @Eray Hanoglu
|
|
434
|
+
- First release @Eray Hanoglu
|
|
435
|
+
- First release @Eray Hanoglu
|
|
436
|
+
- First release @Eray Hanoglu
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "lightning-pool",
|
|
3
3
|
"description": "Fastest generic Pool written with TypeScript",
|
|
4
|
-
"version": "4.
|
|
4
|
+
"version": "4.13.0",
|
|
5
5
|
"author": "Panates",
|
|
6
6
|
"license": "MIT",
|
|
7
7
|
"dependencies": {
|
|
@@ -10,23 +10,15 @@
|
|
|
10
10
|
"tslib": "^2.8.1"
|
|
11
11
|
},
|
|
12
12
|
"type": "module",
|
|
13
|
+
"module": "./index.js",
|
|
14
|
+
"types": "./index.d.ts",
|
|
13
15
|
"exports": {
|
|
14
16
|
".": {
|
|
15
|
-
"
|
|
16
|
-
|
|
17
|
-
"default": "./esm/index.js"
|
|
18
|
-
},
|
|
19
|
-
"require": {
|
|
20
|
-
"types": "./types/index.d.cts",
|
|
21
|
-
"default": "./cjs/index.js"
|
|
22
|
-
},
|
|
23
|
-
"default": "./esm/index.js"
|
|
17
|
+
"types": "./index.d.ts",
|
|
18
|
+
"default": "./index.js"
|
|
24
19
|
},
|
|
25
20
|
"./package.json": "./package.json"
|
|
26
21
|
},
|
|
27
|
-
"main": "./cjs/index.js",
|
|
28
|
-
"module": "./esm/index.js",
|
|
29
|
-
"types": "./types/index.d.ts",
|
|
30
22
|
"repository": {
|
|
31
23
|
"type": "git",
|
|
32
24
|
"url": "git+https://github.com/panates/lightning-pool.git"
|
|
@@ -39,11 +31,7 @@
|
|
|
39
31
|
"generic",
|
|
40
32
|
"generic-pool"
|
|
41
33
|
],
|
|
42
|
-
"
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"types/",
|
|
46
|
-
"LICENSE",
|
|
47
|
-
"README.md"
|
|
48
|
-
]
|
|
34
|
+
"publishConfig": {
|
|
35
|
+
"access": "public"
|
|
36
|
+
}
|
|
49
37
|
}
|
|
@@ -13,20 +13,21 @@ const defaultValues = {
|
|
|
13
13
|
validation: true,
|
|
14
14
|
};
|
|
15
15
|
export class PoolOptions extends EventEmitter {
|
|
16
|
+
pool;
|
|
17
|
+
_acquireMaxRetries = defaultValues.acquireMaxRetries;
|
|
18
|
+
_acquireRetryWait = defaultValues.acquireRetryWait;
|
|
19
|
+
_acquireTimeoutMillis = defaultValues.acquireTimeoutMillis;
|
|
20
|
+
_fifo = defaultValues.fifo;
|
|
21
|
+
_idleTimeoutMillis = defaultValues.idleTimeoutMillis;
|
|
22
|
+
_houseKeepInterval = defaultValues.houseKeepInterval;
|
|
23
|
+
_min = defaultValues.min;
|
|
24
|
+
_minIdle = defaultValues.minIdle;
|
|
25
|
+
_max = defaultValues.max;
|
|
26
|
+
_maxQueue = defaultValues.maxQueue;
|
|
27
|
+
_validation = defaultValues.validation;
|
|
16
28
|
constructor(pool) {
|
|
17
29
|
super();
|
|
18
30
|
this.pool = pool;
|
|
19
|
-
this._acquireMaxRetries = defaultValues.acquireMaxRetries;
|
|
20
|
-
this._acquireRetryWait = defaultValues.acquireRetryWait;
|
|
21
|
-
this._acquireTimeoutMillis = defaultValues.acquireTimeoutMillis;
|
|
22
|
-
this._fifo = defaultValues.fifo;
|
|
23
|
-
this._idleTimeoutMillis = defaultValues.idleTimeoutMillis;
|
|
24
|
-
this._houseKeepInterval = defaultValues.houseKeepInterval;
|
|
25
|
-
this._min = defaultValues.min;
|
|
26
|
-
this._minIdle = defaultValues.minIdle;
|
|
27
|
-
this._max = defaultValues.max;
|
|
28
|
-
this._maxQueue = defaultValues.maxQueue;
|
|
29
|
-
this._validation = defaultValues.validation;
|
|
30
31
|
this.pool = pool;
|
|
31
32
|
}
|
|
32
33
|
get acquireMaxRetries() {
|
|
@@ -1,7 +1,11 @@
|
|
|
1
1
|
function noop() { }
|
|
2
2
|
export class PoolRequest {
|
|
3
|
+
created;
|
|
4
|
+
callback;
|
|
5
|
+
options;
|
|
6
|
+
timeoutHandle;
|
|
7
|
+
timedOut = false;
|
|
3
8
|
constructor(pool, callback, options) {
|
|
4
|
-
this.timedOut = false;
|
|
5
9
|
this.created = Date.now();
|
|
6
10
|
this.callback = callback || noop;
|
|
7
11
|
this.options = options;
|
|
@@ -52,12 +52,13 @@ export declare class Pool<T = any> extends EventEmitter {
|
|
|
52
52
|
/**
|
|
53
53
|
* Shuts down the pool and destroys all resources.
|
|
54
54
|
*/
|
|
55
|
+
close(): void;
|
|
55
56
|
close(callback?: Callback): void;
|
|
56
|
-
close(terminateWait
|
|
57
|
-
close(force
|
|
57
|
+
close(terminateWait?: number, callback?: Callback): void;
|
|
58
|
+
close(force?: boolean, callback?: Callback): void;
|
|
58
59
|
closeAsync(): Promise<void>;
|
|
59
|
-
closeAsync(terminateWait
|
|
60
|
-
closeAsync(force
|
|
60
|
+
closeAsync(terminateWait?: number): Promise<void>;
|
|
61
|
+
closeAsync(force?: boolean): Promise<void>;
|
|
61
62
|
/**
|
|
62
63
|
* Acquires `resource` from the pool or create a new one
|
|
63
64
|
*/
|
package/{esm/pool.js → pool.js}
RENAMED
|
@@ -7,15 +7,19 @@ import { PoolOptions } from './pool-options.js';
|
|
|
7
7
|
import { PoolRequest } from './pool-request.js';
|
|
8
8
|
import { ResourceItem } from './resource-item.js';
|
|
9
9
|
export class Pool extends EventEmitter {
|
|
10
|
+
_options;
|
|
11
|
+
_factory;
|
|
12
|
+
_allResources = new Map();
|
|
13
|
+
_requestQueue = new DoublyLinked();
|
|
14
|
+
_acquiredResources = new DoublyLinked();
|
|
15
|
+
_idleResources = new DoublyLinked();
|
|
16
|
+
_creating = 0;
|
|
17
|
+
_requestsProcessing = 0;
|
|
18
|
+
_state = PoolState.IDLE;
|
|
19
|
+
_houseKeepTimer;
|
|
20
|
+
_closeWaitTimer;
|
|
10
21
|
constructor(factory, config) {
|
|
11
22
|
super();
|
|
12
|
-
this._allResources = new Map();
|
|
13
|
-
this._requestQueue = new DoublyLinked();
|
|
14
|
-
this._acquiredResources = new DoublyLinked();
|
|
15
|
-
this._idleResources = new DoublyLinked();
|
|
16
|
-
this._creating = 0;
|
|
17
|
-
this._requestsProcessing = 0;
|
|
18
|
-
this._state = PoolState.IDLE;
|
|
19
23
|
if (typeof factory !== 'object') {
|
|
20
24
|
throw new TypeError('You must provide `factory` object');
|
|
21
25
|
}
|
|
@@ -1,9 +1,12 @@
|
|
|
1
1
|
import { ResourceState } from './constants.js';
|
|
2
2
|
export class ResourceItem {
|
|
3
|
+
state = ResourceState.IDLE;
|
|
4
|
+
acquiredNode;
|
|
5
|
+
idleNode;
|
|
6
|
+
resource;
|
|
7
|
+
idleTime = 0;
|
|
8
|
+
destroyed = false;
|
|
3
9
|
constructor(resource) {
|
|
4
|
-
this.state = ResourceState.IDLE;
|
|
5
|
-
this.idleTime = 0;
|
|
6
|
-
this.destroyed = false;
|
|
7
10
|
this.resource = resource;
|
|
8
11
|
}
|
|
9
12
|
}
|
package/cjs/abort-error.js
DELETED
package/cjs/constants.js
DELETED
|
@@ -1,16 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ResourceState = exports.PoolState = void 0;
|
|
4
|
-
var PoolState;
|
|
5
|
-
(function (PoolState) {
|
|
6
|
-
PoolState[PoolState["IDLE"] = 0] = "IDLE";
|
|
7
|
-
PoolState[PoolState["STARTED"] = 1] = "STARTED";
|
|
8
|
-
PoolState[PoolState["CLOSING"] = 2] = "CLOSING";
|
|
9
|
-
PoolState[PoolState["CLOSED"] = 3] = "CLOSED";
|
|
10
|
-
})(PoolState || (exports.PoolState = PoolState = {}));
|
|
11
|
-
var ResourceState;
|
|
12
|
-
(function (ResourceState) {
|
|
13
|
-
ResourceState[ResourceState["IDLE"] = 0] = "IDLE";
|
|
14
|
-
ResourceState[ResourceState["ACQUIRED"] = 1] = "ACQUIRED";
|
|
15
|
-
ResourceState[ResourceState["VALIDATION"] = 2] = "VALIDATION";
|
|
16
|
-
})(ResourceState || (exports.ResourceState = ResourceState = {}));
|
package/cjs/index.js
DELETED
|
@@ -1,12 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.createPool = createPool;
|
|
4
|
-
const tslib_1 = require("tslib");
|
|
5
|
-
const pool_js_1 = require("./pool.js");
|
|
6
|
-
tslib_1.__exportStar(require("./abort-error.js"), exports);
|
|
7
|
-
tslib_1.__exportStar(require("./constants.js"), exports);
|
|
8
|
-
tslib_1.__exportStar(require("./pool.js"), exports);
|
|
9
|
-
tslib_1.__exportStar(require("./types.js"), exports);
|
|
10
|
-
function createPool(factory, config) {
|
|
11
|
-
return new pool_js_1.Pool(factory, config);
|
|
12
|
-
}
|
package/cjs/package.json
DELETED