Enhance changelog documentation
[poolifier.git] / CHANGELOG.md
CommitLineData
522eea03 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
fa0f5b28
S
8## [2.0.0] - not released yet
9
f3f833ab 10### Bug fixes
d63d3be3 11
ddbeaffd 12- Now a thread/process by default is not deleted when the task submitted take more time than maxInactiveTime configured (issue #70).
d63d3be3 13
fa0f5b28
S
14### Breaking Changes
15
ddbeaffd 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.
fa0f5b28
S
19
20#### New `export` strategy
21
22```js
23// Before
777b7824 24const DynamicThreadPool = require('poolifier/lib/dynamic')
fa0f5b28 25// After
777b7824 26const { DynamicThreadPool } = require('poolifier/lib/dynamic')
fa0f5b28
S
27```
28
29But you should always prefer just using
30
31```js
777b7824 32const { DynamicThreadPool } = require('poolifier')
fa0f5b28
S
33```
34
d3c8a1a8
S
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
5c5a1fb7
S
40#### Public properties renaming
41
42- Thread Pool's `numWorkers` is now `numberOfWorkers`
280c2a77 43- Thread Pool's `nextWorker` is now `nextWorkerIndex`
5c5a1fb7 44
280c2a77 45#### Internal (protected) properties and methods renaming
fa0f5b28 46
280c2a77
S
47These properties are not intended for end users
48
49- `id` => `nextMessageId`
50
51These methods are not intended for end users
fa0f5b28
S
52
53- `_chooseWorker` => `chooseWorker`
280c2a77 54- `_newWorker` => `createWorker`
fa0f5b28
S
55- `_execute` => `internalExecute`
56- `_chooseWorker` => `chooseWorker`
57- `_checkAlive` => `checkAlive`
58- `_run` => `run`
59- `_runAsync` => `runAsync`
60
0312f71a
APA
61## [1.1.0] - 2020-21-05
62
63### Added
64
65- ThreadWorker support async functions as option
cf9aa6c3 66- Various external library patches
0312f71a 67
522eea03 68## [1.0.0] - 2020-24-01
69
70### Added
71
72- FixedThreadPool implementation
73- DynamicThreadPool implementation
0312f71a 74- WorkerThread implementation to improve developer experience