Integrate typedoc to generate code documentation. (#236)
[poolifier.git] / CHANGELOG.md
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
8 ## [2.0.0] - not released yet
9
10 ### Bug fixes
11
12 - Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
13
14 ### Breaking Changes
15
16 - `maxInactiveTime` on `ThreadWorker` default behavior is now changed, if you want to keep the old behavior set `killBehavior` to `KillBehaviors.HARD`.
17 _Find more details on our JSDoc._
18
19 - `maxTasks` option on `FixedThreadPool` and `DynamicThreadPool` is now removed since is no more needed.
20
21 - We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
22
23 ### Pool options types declaration merge
24
25 `FixedThreadPoolOptions` and `DynamicThreadPoolOptions` type declarations have been merged to `PoolOptions<Worker>`.
26
27 #### New `export` strategy
28
29 ```js
30 // Before
31 const DynamicThreadPool = require('poolifier/lib/dynamic')
32 // After
33 const { DynamicThreadPool } = require('poolifier/lib/dynamic')
34 ```
35
36 But you should always prefer just using
37
38 ```js
39 const { DynamicThreadPool } = require('poolifier')
40 ```
41
42 #### New type definitions for input data and response
43
44 For cluster worker and worker-thread pools, you can now only send and receive serializable data.
45 _This is not a limitation by poolifier but NodeJS._
46
47 #### Public property replacements
48
49 `numWorkers` property is now `numberOfWorkers`
50
51 #### Internal (protected) properties and methods renaming
52
53 These properties are not intended for end users
54
55 - `id` => `nextMessageId`
56
57 These methods are not intended for end users
58
59 - `_chooseWorker` => `chooseWorker`
60 - `_newWorker` => `createWorker`
61 - `_execute` => `internalExecute`
62 - `_chooseWorker` => `chooseWorker`
63 - `_checkAlive` => `checkAlive`
64 - `_run` => `run`
65 - `_runAsync` => `runAsync`
66
67 ## [1.1.0] - 2020-21-05
68
69 ### Added
70
71 - ThreadWorker support async functions as option
72 - Various external library patches
73
74 ## [1.0.0] - 2020-24-01
75
76 ### Added
77
78 - FixedThreadPool implementation
79 - DynamicThreadPool implementation
80 - WorkerThread implementation to improve developer experience