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