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