Update CHANGELOG.md (#178)
[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` 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 - We changed some internal structures, but you shouldn't be too affected by them as these are internal changes.
20
21 #### New `export` strategy
22
23 ```js
24 // Before
25 const DynamicThreadPool = require('poolifier/lib/dynamic')
26 // After
27 const { DynamicThreadPool } = require('poolifier/lib/dynamic')
28 ```
29
30 But you should always prefer just using
31
32 ```js
33 const { DynamicThreadPool } = require('poolifier')
34 ```
35
36 #### New type definitions for input data and response
37
38 For cluster and thread pools, you can now only send and receive serializable `JSON` data.
39 _This is not a limitation by poolifier but NodeJS._
40
41 #### Public property replacements
42
43 `numWorkers` property is now `numberOfWorkers`
44 `nextWorker` property is now `nextWorkerIndex`
45
46 #### Internal (protected) properties and methods renaming
47
48 These properties are not intended for end users
49
50 - `id` => `nextMessageId`
51
52 These methods are not intended for end users
53
54 - `_chooseWorker` => `chooseWorker`
55 - `_newWorker` => `createWorker`
56 - `_execute` => `internalExecute`
57 - `_chooseWorker` => `chooseWorker`
58 - `_checkAlive` => `checkAlive`
59 - `_run` => `run`
60 - `_runAsync` => `runAsync`
61
62 ## [1.1.0] - 2020-21-05
63
64 ### Added
65
66 - ThreadWorker support async functions as option
67 - Various external library patches
68
69 ## [1.0.0] - 2020-24-01
70
71 ### Added
72
73 - FixedThreadPool implementation
74 - DynamicThreadPool implementation
75 - WorkerThread implementation to improve developer experience