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