chore: update 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.0.0/),
6and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
8## [Unreleased]
9
10### Changed
11
12- permit SemVer pre-release publication.
13
14## [2.3.10-0] - 2023-03-18
15
16### Fixed
17
18- Fix `exports` syntax for ESM and CommonJS.
19
20## [2.3.9] - 2023-03-18
21
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
30## [2.3.8] - 2023-03-18
31
32### Changed
33
34- Switch internal benchmarking code to benny.
35- Switch to TypeScript 5.x.x.
36- Switch rollup bundler plugins to core ones.
37- Switch to TSDoc syntax.
38- Enforce conventional commits.
39
40### Fixed
41
42- Fix random integer generator.
43- Fix worker choice strategy pool type identification at initialization.
44
45## [2.3.7] - 2022-10-23
46
47### Changed
48
49- Switch to open collective FOSS project funding platform.
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.
57
58## [2.3.6] - 2022-10-22
59
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
70## [2.3.5] - 2022-10-21
71
72### Changed
73
74- Improve benchmarks: add IO intensive task workload, add task size option, integrate code into linter.
75- Optimize tasks usage lookup implementation.
76
77### Fixed
78
79- Fix missed pool event emitter type export.
80- Fix typedoc documentation generation.
81
82## [2.3.4] - 2022-10-17
83
84### Added
85
86- Fully automate release process with release-it.
87
88### Changed
89
90- Optimize fair share task scheduling algorithm implementation.
91- Update benchmarks versus external pools results with latest version.
92
93## [2.3.3] - 2022-10-15
94
95### Added
96
97- Add support for [cluster settings](https://nodejs.org/api/cluster.html#cluster_cluster_settings) in cluster pool options.
98
99## [2.3.2] - 2022-10-14
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
109## [2.3.1] - 2022-10-13
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
117## [2.2.2] - 2022-10-09
118
119### Fixed
120
121- Fixed `README.md` file.
122
123## [2.2.1] - 2022-10-08
124
125### Added
126
127- Dynamic worker choice strategy change at runtime.
128
129## [2.2.0] - 2022-01-05
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
135## [2.1.0] - 2021-08-29
136
137### Added
138
139- Add an optional pool option `messageHandler` to `PoolOptions<Worker>` for registering a message handler callback on each worker.
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`.
146- `AbstractWorker` class cannot be instantiated without specifying the `mainWorker` argument referencing the main worker.
147
148## [2.0.2] - 2021-05-12
149
150### Bug fixes
151
152- Fix `busy` event emission on fixed pool type
153
154## [2.0.1] - 2021-03-16
155
156### Bug fixes
157
158- Check if pool options are properly set.
159- `busy` event is emitted on all pool types.
160
161## [2.0.0] - 2021-03-01
162
163### Bug fixes
164
165- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
166
167### Breaking Changes
168
169- `FullPool` event is now renamed to `busy`.
170- `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
171 _Find more details on our JSDoc._
172
173- `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
174
175- We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
176
177### Pool options types declaration merge
178
179`FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
180
181#### New `export` strategy
182
183```js
184// Before
185const DynamicThreadPool = require('poolifier/lib/dynamic')
186// After
187const { DynamicThreadPool } = require('poolifier/lib/dynamic')
188```
189
190But you should always prefer just using
191
192```js
193const { DynamicThreadPool } = require('poolifier')
194```
195
196#### New type definitions for input data and response
197
198For cluster worker and worker-thread pools, you can now only send and receive serializable data.
199_This is not a limitation by poolifier but NodeJS._
200
201#### Public property replacements
202
203`numWorkers` property is now `numberOfWorkers`
204
205#### Internal (protected) properties and methods renaming
206
207These properties are not intended for end users
208
209- `id` => `nextMessageId`
210
211These methods are not intended for end users
212
213- `_chooseWorker` => `chooseWorker`
214- `_newWorker` => `createWorker`
215- `_execute` => `internalExecute`
216- `_chooseWorker` => `chooseWorker`
217- `_checkAlive` => `checkAlive`
218- `_run` => `run`
219- `_runAsync` => `runAsync`
220
221## [1.1.0] - 2020-05-21
222
223### Added
224
225- ThreadWorker support async functions as option
226- Various external library patches
227
228## [1.0.0] - 2020-01-24
229
230### Added
231
232- FixedThreadPool implementation
233- DynamicThreadPool implementation
234- WorkerThread implementation to improve developer experience