chore: update changelog entries
[poolifier.git] / CHANGELOG.md
CommitLineData
522eea03 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.0.0/),
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
45a5a54c
JB
8## [Unreleased]
9
7e060cee
JB
10### Changed
11
12- permit SemVer pre-release publication.
13
c81bfafb
JB
14## [2.3.10-0] - 2023-03-18
15
fe18768d
JB
16### Fixed
17
18- Fix `exports` syntax for ESM and CommonJS.
19
d7b78217
JB
20## [2.3.9] - 2023-03-18
21
ed6dd37f
JB
22### Changed
23
24- Introduce ESM module support along with CommonJS one.
25
26### Fixed
27
28- Fix brown paper bag bug referencing the same object literal.
29
68e2ad86
JB
30## [2.3.8] - 2023-03-18
31
ca6c7d70
JB
32### Changed
33
34- Switch internal benchmarking code to benny.
fbdedeb9
JB
35- Switch to TypeScript 5.x.x.
36- Switch rollup bundler plugins to core ones.
ed6dd37f 37- Switch to TSDoc syntax.
fbdedeb9 38- Enforce conventional commits.
ca6c7d70 39
d15211d4
JB
40### Fixed
41
42- Fix random integer generator.
fbdedeb9 43- Fix worker choice strategy pool type identification at initialization.
d15211d4 44
995705ea
JB
45## [2.3.7] - 2022-10-23
46
b953022b
JB
47### Changed
48
49- Switch to open collective FOSS project funding platform.
78cea37e
JB
50- Switch to ts-standard linter configuration on TypeScript code.
51
52### Fixed
53
54- Fixed missing async on pool execute method.
55- Fixed typing in TypeScript example.
56- Fixed types in unit tests.
b953022b 57
3b9f6953
JB
58## [2.3.6] - 2022-10-22
59
f80cead4
JB
60### Changed
61
62- Cleanup pool attributes and methods.
63- Refine error types thrown.
64
65### Fixed
66
67- Fix continuous integration build on windows.
68- Fix code coverage reporting by using c8 instead of nyc.
69
efc22107
JB
70## [2.3.5] - 2022-10-21
71
7a6a0a96
JB
72### Changed
73
a05c10de
JB
74- Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter.
75- Optimize tasks usage lookup implementation.
7a6a0a96 76
b4904890
JB
77### Fixed
78
79- Fix missed pool event emitter type export.
80- Fix typedoc documentation generation.
81
a875f8d1
JB
82## [2.3.4] - 2022-10-17
83
73cda448
JB
84### Added
85
86- Fully automate release process with release-it.
87
45a5a54c
JB
88### Changed
89
73cda448 90- Optimize fair share task scheduling algorithm implementation.
eb4a8a82 91- Update benchmarks versus external pools results with latest version.
45a5a54c 92
90ee1b18 93## [2.3.3] - 2022-10-15
1a76932b
JB
94
95### Added
96
97- Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options.
98
90ee1b18 99## [2.3.2] - 2022-10-14
11df3590
JB
100
101### Changed
102
103- Optimize fair share worker selection strategy implementation.
104
105### Fixed
106
107- Fix WRR worker selection strategy: ensure the condition triggering the round robin can be fulfilled.
108
90ee1b18 109## [2.3.1] - 2022-10-13
23ff945a
JB
110
111### Added
112
113- Pool worker choice strategies:
114 - `WorkerChoiceStrategies.WEIGHTED_ROUND_ROBIN` strategy based on weighted round robin scheduling algorithm using tasks execution time for now.
115 - `WorkerChoiceStrategies.FAIR_SHARE` strategy based on fair share scheduling algorithm using tasks execution time for now.
116
90ee1b18 117## [2.2.2] - 2022-10-09
cb2b6c69
JB
118
119### Fixed
120
121- Fixed `README.md` file.
122
90ee1b18 123## [2.2.1] - 2022-10-08
bdacc2d2 124
bdaf31cd
JB
125### Added
126
127- Dynamic worker choice strategy change at runtime.
bdacc2d2 128
90ee1b18 129## [2.2.0] - 2022-01-05
7e0d447f
JB
130
131### Breaking Changes
132
133- Support only NodeJS version 16.x.x for cluster pool: upstream cluster API have changed on that version.
134
90ee1b18 135## [2.1.0] - 2021-08-29
35cf1c03
JB
136
137### Added
138
139- Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker.
e088a00c
JB
140
141### Breaking Changes
142
143- `AbstractWorker` class `maxInactiveTime`, `killBehavior` and `async` attributes have been removed in favour of the same ones in the worker options `opts` public attribute.
144- `AbstractWorker` class `lastTask` attribute have been renamed to `lastTaskTimestamp`.
145- `AbstractWorker` class `interval` attribute have been renamed to `aliveInterval`.
c365b2d3 146- `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
e088a00c 147
90ee1b18 148## [2.0.2] - 2021-05-12
14916bf9
JB
149
150### Bug fixes
151
152- Fix `busy` event emission on fixed pool type
153
90ee1b18 154## [2.0.1] - 2021-03-16
7f685093
JB
155
156### Bug fixes
157
158- Check if pool options are properly set.
159- `busy` event is emitted on all pool types.
160
90ee1b18 161## [2.0.0] - 2021-03-01
fa0f5b28 162
f3f833ab 163### Bug fixes
d63d3be3 164
ddbeaffd 165- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
d63d3be3 166
fa0f5b28
S
167### Breaking Changes
168
7f685093 169- `FullPool` event is now renamed to `busy`.
1927ee67 170- `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
1a81f8af 171 _Find more details on our JSDoc._
ddbeaffd 172
1927ee67
APA
173- `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
174
ddbeaffd 175- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
fa0f5b28 176
ec2ccfc8
JB
177### Pool options types declaration merge
178
179`FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
180
fa0f5b28
S
181#### New `export` strategy
182
183```js
184// Before
777b7824 185const DynamicThreadPool = require('poolifier/lib/dynamic')
fa0f5b28 186// After
777b7824 187const { DynamicThreadPool } = require('poolifier/lib/dynamic')
fa0f5b28
S
188```
189
190But you should always prefer just using
191
192```js
777b7824 193const { DynamicThreadPool } = require('poolifier')
fa0f5b28
S
194```
195
d3c8a1a8
S
196#### New type definitions for input data and response
197
ec2ccfc8 198For cluster worker and worker-thread pools, you can now only send and receive serializable data.
d3c8a1a8
S
199_This is not a limitation by poolifier but NodeJS._
200
3a4b605f 201#### Public property replacements
5c5a1fb7 202
3a4b605f 203`numWorkers` property is now `numberOfWorkers`
5c5a1fb7 204
280c2a77 205#### Internal (protected) properties and methods renaming
fa0f5b28 206
280c2a77
S
207These properties are not intended for end users
208
209- `id` => `nextMessageId`
210
211These methods are not intended for end users
fa0f5b28
S
212
213- `_chooseWorker` => `chooseWorker`
280c2a77 214- `_newWorker` => `createWorker`
fa0f5b28
S
215- `_execute` => `internalExecute`
216- `_chooseWorker` => `chooseWorker`
217- `_checkAlive` => `checkAlive`
218- `_run` => `run`
219- `_runAsync` => `runAsync`
220
90ee1b18 221## [1.1.0] - 2020-05-21
0312f71a
APA
222
223### Added
224
225- ThreadWorker support async functions as option
cf9aa6c3 226- Various external library patches
0312f71a 227
90ee1b18 228## [1.0.0] - 2020-01-24
522eea03 229
230### Added
231
232- FixedThreadPool implementation
233- DynamicThreadPool implementation
0312f71a 234- WorkerThread implementation to improve developer experience