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