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