chore: generate documentation
[poolifier.git] / CHANGELOG.md
... / ...
CommitLineData
1# Changelog
2
3All notable changes to this project will be documented in this file.
4
5The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8## [Unreleased]
9
10### Fixed
11
12- Fix typedoc generation with inheritance.
13
14## [2.4.2] - 2023-04-06
15
16### Added
17
18- Add `full` event to dynamic pool.
19- Keep worker choice strategy in memory for conditional reuse.
20
21### Fixed
22
23- Fix possible negative worker key at worker removal in worker choice strategies.
24
25## [2.4.1] - 2023-04-05
26
27### Changed
28
29- Optimize worker choice strategy for dynamic pool.
30
31### Fixed
32
33- Ensure dynamic pool does not alter worker choice strategy expected behavior.
34
35## [2.4.0] - 2023-04-04
36
37### Added
38
39- Add `LESS_BUSY` worker choice strategy.
40
41### Changed
42
43- Optimize worker storage in pool.
44- Optimize worker alive status check.
45- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
46- Optimize `LESS_USED` worker choice strategy.
47- Update benchmarks versus external threads pools.
48- Optimize tasks usage statistics requirements for worker choice strategy.
49
50### Fixed
51
52- Ensure trimmable characters are checked at pool initialization.
53- Fix message id integer overflow.
54- Fix pool worker removal in worker choice strategy internals.
55- Fix package publication with pnpm.
56
57## [2.4.0-3] - 2023-04-04
58
59### Added
60
61- Add `LESS_BUSY` worker choice strategy.
62
63### Changed
64
65- Optimize worker storage in pool.
66- Optimize worker alive status check.
67- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
68- Optimize `LESS_USED` worker choice strategy.
69- Update benchmarks versus external threads pools.
70
71### Fixed
72
73- Ensure trimmable characters are checked at pool initialization.
74- Fix message id integer overflow.
75- Fix pool worker removal in worker choice strategy internals.
76- Fix package publication with pnpm.
77
78## [2.4.0-2] - 2023-04-03
79
80### Added
81
82- Add `LESS_BUSY` worker choice strategy.
83
84### Changed
85
86- Optimize worker storage in pool.
87- Optimize worker alive status check.
88- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
89- Optimize `LESS_USED` worker choice strategy.
90
91### Fixed
92
93- Ensure trimmable characters are checked at pool initialization.
94- Fix message id integer overflow.
95- Fix pool worker removal in worker choice strategy internals.
96- Fix package publication with pnpm.
97
98## [2.4.0-1] - 2023-04-03
99
100### Added
101
102- Add `LESS_BUSY` worker choice strategy.
103
104### Changed
105
106- Optimize worker storage in pool.
107- Optimize worker alive status check.
108- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
109- Optimize `LESS_USED` worker choice strategy.
110
111### Fixed
112
113- Ensure trimmable characters are checked at pool initialization.
114- Fix message id integer overflow.
115- Fix pool worker removal in worker choice strategy internals.
116
117## [2.4.0-0] - 2023-04-03
118
119### Added
120
121- Add `LESS_BUSY` worker choice strategy.
122
123### Changed
124
125- Optimize worker storage in pool.
126- Optimize worker alive status check.
127- BREAKING CHANGE: Rename worker choice strategy `LESS_RECENTLY_USED` to `LESS_USED`.
128- Optimize `LESS_USED` worker choice strategy.
129
130### Fixed
131
132- Ensure trimmable characters are checked at pool initialization.
133- Fix message id integer overflow.
134- Fix pool worker removal in worker choice strategy internals.
135
136## [2.3.10] - 2023-03-18
137
138### Fixed
139
140- Fix `exports` syntax for ESM and CommonJS.
141
142### Changed
143
144- Permit SemVer pre-release publication.
145
146## [2.3.10-2] - 2023-03-18
147
148### Fixed
149
150- Fix `exports` syntax for ESM and CommonJS.
151
152## [2.3.10-1] - 2023-03-18
153
154### Changed
155
156- Permit SemVer pre-release publication.
157
158## [2.3.10-0] - 2023-03-18
159
160### Fixed
161
162- Fix `exports` syntax for ESM and CommonJS.
163
164## [2.3.9] - 2023-03-18
165
166### Changed
167
168- Introduce ESM module support along with CommonJS one.
169
170### Fixed
171
172- Fix brown paper bag bug referencing the same object literal.
173
174## [2.3.8] - 2023-03-18
175
176### Changed
177
178- Switch internal benchmarking code to benny.
179- Switch to TypeScript 5.x.x.
180- Switch rollup bundler plugins to core ones.
181- Switch to TSDoc syntax.
182- Enforce conventional commits.
183
184### Fixed
185
186- Fix random integer generator.
187- Fix worker choice strategy pool type identification at initialization.
188
189## [2.3.7] - 2022-10-23
190
191### Changed
192
193- Switch to open collective FOSS project funding platform.
194- Switch to ts-standard linter configuration on TypeScript code.
195
196### Fixed
197
198- Fixed missing async on pool execute method.
199- Fixed typing in TypeScript example.
200- Fixed types in unit tests.
201
202## [2.3.6] - 2022-10-22
203
204### Changed
205
206- Cleanup pool attributes and methods.
207- Refine error types thrown.
208
209### Fixed
210
211- Fix continuous integration build on windows.
212- Fix code coverage reporting by using c8 instead of nyc.
213
214## [2.3.5] - 2022-10-21
215
216### Changed
217
218- Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter.
219- Optimize tasks usage lookup implementation.
220
221### Fixed
222
223- Fix missed pool event emitter type export.
224- Fix typedoc documentation generation.
225
226## [2.3.4] - 2022-10-17
227
228### Added
229
230- Fully automate release process with release-it.
231
232### Changed
233
234- Optimize fair share task scheduling algorithm implementation.
235- Update benchmarks versus external pools results with latest version.
236
237## [2.3.3] - 2022-10-15
238
239### Added
240
241- Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options.
242
243## [2.3.2] - 2022-10-14
244
245### Changed
246
247- Optimize fair share worker selection strategy implementation.
248
249### Fixed
250
251- Fix WRR worker selection strategy: ensure the condition triggering the round robin can be fulfilled.
252
253## [2.3.1] - 2022-10-13
254
255### Added
256
257- Pool worker choice strategies:
258 - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` strategy based on weighted round robin scheduling algorithm using tasks execution time for now.
259 - `WorkerChoiceStrategies.FAIR_SHARE` strategy based on fair share scheduling algorithm using tasks execution time for now.
260
261## [2.2.2] - 2022-10-09
262
263### Fixed
264
265- Fixed `README.md` file.
266
267## [2.2.1] - 2022-10-08
268
269### Added
270
271- Dynamic worker choice strategy change at runtime.
272
273## [2.2.0] - 2022-01-05
274
275### Breaking Changes
276
277- Support only NodeJS version 16.x.x for cluster pool: upstream cluster API have changed on that version.
278
279## [2.1.0] - 2021-08-29
280
281### Added
282
283- Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker.
284
285### Breaking Changes
286
287- `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute.
288- `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`.
289- `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`.
290- `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
291
292## [2.0.2] - 2021-05-12
293
294### Bug fixes
295
296- Fix `busy` event emission on fixed pool type
297
298## [2.0.1] - 2021-03-16
299
300### Bug fixes
301
302- Check if pool options are properly set.
303- `busy` event is emitted on all pool types.
304
305## [2.0.0] - 2021-03-01
306
307### Bug fixes
308
309- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
310
311### Breaking Changes
312
313- `FullPool` event is now renamed to `busy`.
314- `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
315 _Find more details on our JSDoc._
316
317- `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
318
319- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
320
321### Pool options types declaration merge
322
323`FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
324
325#### New `export` strategy
326
327```js
328// Before
329const DynamicThreadPool = require('poolifier/lib/dynamic')
330// After
331const { DynamicThreadPool } = require('poolifier/lib/dynamic')
332```
333
334But you should always prefer just using
335
336```js
337const { DynamicThreadPool } = require('poolifier')
338```
339
340#### New type definitions for input data and response
341
342For cluster worker and worker-thread pools, you can now only send and receive serializable data.
343_This is not a limitation by poolifier but NodeJS._
344
345#### Public property replacements
346
347`numWorkers` property is now `numberOfWorkers`
348
349#### Internal (protected) properties and methods renaming
350
351These properties are not intended for end users
352
353- `id` => `nextMessageId`
354
355These methods are not intended for end users
356
357- `_chooseWorker` => `chooseWorker`
358- `_newWorker` => `createWorker`
359- `_execute` => `internalExecute`
360- `_chooseWorker` => `chooseWorker`
361- `_checkAlive` => `checkAlive`
362- `_run` => `run`
363- `_runAsync` => `runAsync`
364
365## [1.1.0] - 2020-05-21
366
367### Added
368
369- ThreadWorker support async functions as option
370- Various external library patches
371
372## [1.0.0] - 2020-01-24
373
374### Added
375
376- FixedThreadPool implementation
377- DynamicThreadPool implementation
378- WorkerThread implementation to improve developer experience