| 
9 | 9 | </tr>  | 
10 | 10 | <tr>  | 
11 | 11 | <td>  | 
 | 12 | +<a href="#14.2.0">14.2.0</a><br/>  | 
12 | 13 | <a href="#14.1.0">14.1.0</a><br/>  | 
13 | 14 | <a href="#14.0.0">14.0.0</a><br/>  | 
14 | 15 | </td>  | 
 | 
31 | 32 |   * [io.js](CHANGELOG_IOJS.md)  | 
32 | 33 |   * [Archive](CHANGELOG_ARCHIVE.md)  | 
33 | 34 | 
 
  | 
 | 35 | +<a id="14.2.0"></a>  | 
 | 36 | +## 2020-05-05, Version 14.2.0 (Current), @targos  | 
 | 37 | + | 
 | 38 | +### Notable Changes  | 
 | 39 | + | 
 | 40 | +#### Track function calls with `assert.CallTracker` (experimental)  | 
 | 41 | + | 
 | 42 | +`assert.CallTracker` is a new experimental API that allows to track and later  | 
 | 43 | +verify the number of times a function was called. This works by creating a  | 
 | 44 | +`CallTracker` object and using its `calls` method to create wrapper functions  | 
 | 45 | +that will count each time they are called. Then the `verify` method can be used  | 
 | 46 | +to assert that the expected number of calls happened:  | 
 | 47 | + | 
 | 48 | +```js  | 
 | 49 | +const assert = require('assert');  | 
 | 50 | + | 
 | 51 | +const tracker = new assert.CallTracker();  | 
 | 52 | + | 
 | 53 | +function func() {}  | 
 | 54 | +// callsfunc() must be called exactly twice before tracker.verify().  | 
 | 55 | +const callsfunc = tracker.calls(func, 2);  | 
 | 56 | +callsfunc();  | 
 | 57 | +callsfunc();  | 
 | 58 | + | 
 | 59 | +function otherFunc() {}  | 
 | 60 | +// The second parameter defaults to `1`.  | 
 | 61 | +const callsotherFunc = tracker.calls(otherFunc);  | 
 | 62 | +callsotherFunc();  | 
 | 63 | + | 
 | 64 | +// Calls tracker.verify() and verifies if all tracker.calls() functions have  | 
 | 65 | +// been called the right number of times.  | 
 | 66 | +process.on('exit', () => {  | 
 | 67 | +  tracker.verify();  | 
 | 68 | +});  | 
 | 69 | +```  | 
 | 70 | + | 
 | 71 | +Additionally, `tracker.report()` will return an array which contains information  | 
 | 72 | +about the errors, if there are any:  | 
 | 73 | + | 
 | 74 | +<!-- eslint-disable max-len -->  | 
 | 75 | +```js  | 
 | 76 | +const assert = require('assert');  | 
 | 77 | + | 
 | 78 | +const tracker = new assert.CallTracker();  | 
 | 79 | + | 
 | 80 | +function func() {}  | 
 | 81 | +const callsfunc = tracker.calls(func);  | 
 | 82 | + | 
 | 83 | +console.log(tracker.report());  | 
 | 84 | +/*  | 
 | 85 | +[  | 
 | 86 | +  {  | 
 | 87 | +    message: 'Expected the func function to be executed 1 time(s) but was executed 0 time(s).',  | 
 | 88 | +    actual: 0,  | 
 | 89 | +    expected: 1,  | 
 | 90 | +    operator: 'func',  | 
 | 91 | +    stack: Error  | 
 | 92 | +        ...  | 
 | 93 | +  }  | 
 | 94 | +]  | 
 | 95 | +*/  | 
 | 96 | +```  | 
 | 97 | + | 
 | 98 | +Contributed by ConorDavenport - [#31982](https://github.com/nodejs/node/pull/31982).  | 
 | 99 | + | 
 | 100 | +### Commits  | 
 | 101 | + | 
 | 102 | +#### Semver-minor commits  | 
 | 103 | + | 
 | 104 | +* [[`c87ed21fdf`](https://github.com/nodejs/node/commit/c87ed21fdf)] - **(SEMVER-MINOR)** **assert**: port common.mustCall() to assert (ConorDavenport) [#31982](https://github.com/nodejs/node/pull/31982)  | 
 | 105 | +* [[`c49e3ea20c`](https://github.com/nodejs/node/commit/c49e3ea20c)] - **(SEMVER-MINOR)** **console**: support console constructor groupIndentation option (rickyes) [#32964](https://github.com/nodejs/node/pull/32964)  | 
 | 106 | +* [[`bc9e413dae`](https://github.com/nodejs/node/commit/bc9e413dae)] - **(SEMVER-MINOR)** **worker**: add stack size resource limit option (Anna Henningsen) [#33085](https://github.com/nodejs/node/pull/33085)  | 
 | 107 | + | 
 | 108 | +#### Semver-patch commits  | 
 | 109 | + | 
 | 110 | +* [[`f62d92b900`](https://github.com/nodejs/node/commit/f62d92b900)] - **build**: add --error-on-warn configure flag (Daniel Bevenius) [#32685](https://github.com/nodejs/node/pull/32685)  | 
 | 111 | +* [[`db293c47dd`](https://github.com/nodejs/node/commit/db293c47dd)] - **cluster**: fix error on worker disconnect/destroy (Santiago Gimeno) [#32793](https://github.com/nodejs/node/pull/32793)  | 
 | 112 | +* [[`83e165bf88`](https://github.com/nodejs/node/commit/83e165bf88)] - **crypto**: check DiffieHellman p and g params (Ben Noordhuis) [#32739](https://github.com/nodejs/node/pull/32739)  | 
 | 113 | +* [[`e07cca6af6`](https://github.com/nodejs/node/commit/e07cca6af6)] - **crypto**: generator must be int32 in DiffieHellman() (Ben Noordhuis) [#32739](https://github.com/nodejs/node/pull/32739)  | 
 | 114 | +* [[`637442fec9`](https://github.com/nodejs/node/commit/637442fec9)] - **crypto**: key size must be int32 in DiffieHellman() (Ben Noordhuis) [#32739](https://github.com/nodejs/node/pull/32739)  | 
 | 115 | +* [[`c5a4534d5c`](https://github.com/nodejs/node/commit/c5a4534d5c)] - **deps**: V8: backport e29c62b74854 (Anna Henningsen) [#33125](https://github.com/nodejs/node/pull/33125)  | 
 | 116 | +* [[`8325c29e92`](https://github.com/nodejs/node/commit/8325c29e92)] - **deps**: update to uvwasi 0.0.8 (Colin Ihrig) [#33078](https://github.com/nodejs/node/pull/33078)  | 
 | 117 | +* [[`2174159598`](https://github.com/nodejs/node/commit/2174159598)] - **esm**: improve commonjs hint on module not found (Daniele Belardi) [#31906](https://github.com/nodejs/node/pull/31906)  | 
 | 118 | +* [[`74b0e8c3a8`](https://github.com/nodejs/node/commit/74b0e8c3a8)] - **http**: ensure client request emits close (Robert Nagy) [#33178](https://github.com/nodejs/node/pull/33178)  | 
 | 119 | +* [[`a4ec01c55b`](https://github.com/nodejs/node/commit/a4ec01c55b)] - **http**: simplify sending header (Robert Nagy) [#33200](https://github.com/nodejs/node/pull/33200)  | 
 | 120 | +* [[`451993ea94`](https://github.com/nodejs/node/commit/451993ea94)] - **http**: set default timeout in agent keepSocketAlive (Owen Smith) [#33127](https://github.com/nodejs/node/pull/33127)  | 
 | 121 | +* [[`3cb1713a59`](https://github.com/nodejs/node/commit/3cb1713a59)] - **http2,doc**: minor fixes (Alba Mendez) [#28044](https://github.com/nodejs/node/pull/28044)  | 
 | 122 | +* [[`eab4be1b93`](https://github.com/nodejs/node/commit/eab4be1b93)] - **lib**: cosmetic change to builtinLibs list for maintainability (James M Snell) [#33106](https://github.com/nodejs/node/pull/33106)  | 
 | 123 | +* [[`542da430ff`](https://github.com/nodejs/node/commit/542da430ff)] - **lib**: fix validateport error message when allowZero is false (rickyes) [#32861](https://github.com/nodejs/node/pull/32861)  | 
 | 124 | +* [[`5eccf1e9ad`](https://github.com/nodejs/node/commit/5eccf1e9ad)] - **module**: no type module resolver side effects (Guy Bedford) [#33086](https://github.com/nodejs/node/pull/33086)  | 
 | 125 | +* [[`466213d726`](https://github.com/nodejs/node/commit/466213d726)] - **n-api**: simplify uv\_idle wrangling (Ben Noordhuis) [#32997](https://github.com/nodejs/node/pull/32997)  | 
 | 126 | +* [[`ed45b51642`](https://github.com/nodejs/node/commit/ed45b51642)] - **path**: fix comment grammar (thecodrr) [#32942](https://github.com/nodejs/node/pull/32942)  | 
 | 127 | +* [[`bb2d2f6e0e`](https://github.com/nodejs/node/commit/bb2d2f6e0e)] - **src**: remove unused v8 Message namespace (Adrian Estrada) [#33180](https://github.com/nodejs/node/pull/33180)  | 
 | 128 | +* [[`de643bc325`](https://github.com/nodejs/node/commit/de643bc325)] - **src**: use unique\_ptr for CachedData in ContextifyScript::New (Anna Henningsen) [#33113](https://github.com/nodejs/node/pull/33113)  | 
 | 129 | +* [[`f61928ba35`](https://github.com/nodejs/node/commit/f61928ba35)] - **src**: return undefined when validation err == 0 (James M Snell) [#33107](https://github.com/nodejs/node/pull/33107)  | 
 | 130 | +* [[`f4e5ab14da`](https://github.com/nodejs/node/commit/f4e5ab14da)] - **src**: crypto::UseSNIContext to use BaseObjectPtr (James M Snell) [#33107](https://github.com/nodejs/node/pull/33107)  | 
 | 131 | +* [[`541ea035bf`](https://github.com/nodejs/node/commit/541ea035bf)] - **src**: separate out NgLibMemoryManagerBase (James M Snell) [#33104](https://github.com/nodejs/node/pull/33104)  | 
 | 132 | +* [[`10a87c81cf`](https://github.com/nodejs/node/commit/10a87c81cf)] - **src**: remove unnecessary fully qualified names (rickyes) [#33077](https://github.com/nodejs/node/pull/33077)  | 
 | 133 | +* [[`45032a39e8`](https://github.com/nodejs/node/commit/45032a39e8)] - **stream**: fix stream.finished on Duplex (Robert Nagy) [#33133](https://github.com/nodejs/node/pull/33133)  | 
 | 134 | +* [[`4cfa7e0716`](https://github.com/nodejs/node/commit/4cfa7e0716)] - **stream**: simplify Readable push/unshift logic (himself65) [#32899](https://github.com/nodejs/node/pull/32899)  | 
 | 135 | +* [[`bc40ed31b3`](https://github.com/nodejs/node/commit/bc40ed31b3)] - **stream**: add null check in Readable.from (Pranshu Srivastava) [#32873](https://github.com/nodejs/node/pull/32873)  | 
 | 136 | +* [[`b183d0a18a`](https://github.com/nodejs/node/commit/b183d0a18a)] - **stream**: let Duplex re-use Writable properties (Robert Nagy) [#33079](https://github.com/nodejs/node/pull/33079)  | 
 | 137 | +* [[`ec24577406`](https://github.com/nodejs/node/commit/ec24577406)] - **v8**: use AliasedBuffers for passing heap statistics around (Joyee Cheung) [#32929](https://github.com/nodejs/node/pull/32929)  | 
 | 138 | +* [[`d39254ada6`](https://github.com/nodejs/node/commit/d39254ada6)] - **vm**: fix vm.measureMemory() and introduce execution option (Joyee Cheung) [#32988](https://github.com/nodejs/node/pull/32988)  | 
 | 139 | +* [[`4423304ac4`](https://github.com/nodejs/node/commit/4423304ac4)] - **vm**: throw error when duplicated exportNames in SyntheticModule (himself65) [#32810](https://github.com/nodejs/node/pull/32810)  | 
 | 140 | +* [[`3866dc1311`](https://github.com/nodejs/node/commit/3866dc1311)] - **wasi**: use free() to release preopen array (Anna Henningsen) [#33110](https://github.com/nodejs/node/pull/33110)  | 
 | 141 | +* [[`d7d9960d38`](https://github.com/nodejs/node/commit/d7d9960d38)] - **wasi**: update start() behavior to match spec (Colin Ihrig) [#33073](https://github.com/nodejs/node/pull/33073)  | 
 | 142 | +* [[`8d5ac1bbf0`](https://github.com/nodejs/node/commit/8d5ac1bbf0)] - **wasi**: rename \_\_wasi\_unstable\_reactor\_start() (Colin Ihrig) [#33073](https://github.com/nodejs/node/pull/33073)  | 
 | 143 | +* [[`c6d632a72a`](https://github.com/nodejs/node/commit/c6d632a72a)] - **worker**: unify custom error creation (Anna Henningsen) [#33084](https://github.com/nodejs/node/pull/33084)  | 
 | 144 | + | 
 | 145 | +#### Documentation commits  | 
 | 146 | + | 
 | 147 | +* [[`6925b358f9`](https://github.com/nodejs/node/commit/6925b358f9)] - **doc**: mark assert.CallTracker experimental (Ruben Bridgewater) [#33124](https://github.com/nodejs/node/pull/33124)  | 
 | 148 | +* [[`413f5d3581`](https://github.com/nodejs/node/commit/413f5d3581)] - **doc**: add missing deprecation not (Robert Nagy) [#33203](https://github.com/nodejs/node/pull/33203)  | 
 | 149 | +* [[`7893bde07e`](https://github.com/nodejs/node/commit/7893bde07e)] - **doc**: fix a typo in crypto.generateKeyPairSync() (himself65) [#33187](https://github.com/nodejs/node/pull/33187)  | 
 | 150 | +* [[`d02ced8af6`](https://github.com/nodejs/node/commit/d02ced8af6)] - **doc**: add util.types.isArrayBufferView() (Kevin Locke) [#33092](https://github.com/nodejs/node/pull/33092)  | 
 | 151 | +* [[`36d50027af`](https://github.com/nodejs/node/commit/36d50027af)] - **doc**: clarify when not to run CI on docs (Juan José Arboleda) [#33101](https://github.com/nodejs/node/pull/33101)  | 
 | 152 | +* [[`a99013718c`](https://github.com/nodejs/node/commit/a99013718c)] - **doc**: fix the spelling error in stream.md (白一梓) [#31561](https://github.com/nodejs/node/pull/31561)  | 
 | 153 | +* [[`23962191c1`](https://github.com/nodejs/node/commit/23962191c1)] - **doc**: correct Nodejs to Node.js spelling (Nick Schonning) [#33088](https://github.com/nodejs/node/pull/33088)  | 
 | 154 | +* [[`de15edcfc0`](https://github.com/nodejs/node/commit/de15edcfc0)] - **doc**: improve worker pool example (Ranjan Purbey) [#33082](https://github.com/nodejs/node/pull/33082)  | 
 | 155 | +* [[`289a5c8dfb`](https://github.com/nodejs/node/commit/289a5c8dfb)] - **doc**: some grammar fixes (Chris Holland) [#33081](https://github.com/nodejs/node/pull/33081)  | 
 | 156 | +* [[`82e459d9af`](https://github.com/nodejs/node/commit/82e459d9af)] - **doc**: don't check links in tmp dirs (Ben Noordhuis) [#32996](https://github.com/nodejs/node/pull/32996)  | 
 | 157 | +* [[`c5a2f9a02a`](https://github.com/nodejs/node/commit/c5a2f9a02a)] - **doc**: fix markdown parsing on doc/api/os.md (Juan José Arboleda) [#33067](https://github.com/nodejs/node/pull/33067)  | 
 | 158 | + | 
 | 159 | +#### Other commits  | 
 | 160 | + | 
 | 161 | +* [[`60ebbc4386`](https://github.com/nodejs/node/commit/60ebbc4386)] - **test**: update c8 ignore comment (Benjamin Coe) [#33151](https://github.com/nodejs/node/pull/33151)  | 
 | 162 | +* [[`e276524fcc`](https://github.com/nodejs/node/commit/e276524fcc)] - **test**: skip memory usage tests when ASAN is enabled (Anna Henningsen) [#33129](https://github.com/nodejs/node/pull/33129)  | 
 | 163 | +* [[`89ed7a5862`](https://github.com/nodejs/node/commit/89ed7a5862)] - **test**: move test-process-title to sequential (Anna Henningsen) [#33150](https://github.com/nodejs/node/pull/33150)  | 
 | 164 | +* [[`af7da46d9b`](https://github.com/nodejs/node/commit/af7da46d9b)] - **test**: fix out-of-bound reads from invalid sizeof usage (Anna Henningsen) [#33115](https://github.com/nodejs/node/pull/33115)  | 
 | 165 | +* [[`9ccb6b2e8c`](https://github.com/nodejs/node/commit/9ccb6b2e8c)] - **test**: add missing calls to napi\_async\_destroy (Anna Henningsen) [#33114](https://github.com/nodejs/node/pull/33114)  | 
 | 166 | +* [[`3c2f608a8d`](https://github.com/nodejs/node/commit/3c2f608a8d)] - **test**: correct typo in test name (Colin Ihrig) [#33083](https://github.com/nodejs/node/pull/33083)  | 
 | 167 | +* [[`92c7e0620f`](https://github.com/nodejs/node/commit/92c7e0620f)] - **test**: check args on SourceTextModule cachedData (Juan José Arboleda) [#32956](https://github.com/nodejs/node/pull/32956)  | 
 | 168 | +* [[`f79ef96fea`](https://github.com/nodejs/node/commit/f79ef96fea)] - **test**: mark test flaky on freebsd (Sam Roberts) [#32849](https://github.com/nodejs/node/pull/32849)  | 
 | 169 | +* [[`aced1f5d70`](https://github.com/nodejs/node/commit/aced1f5d70)] - **test**: flaky test-stdout-close-catch on freebsd (Sam Roberts) [#32849](https://github.com/nodejs/node/pull/32849)  | 
 | 170 | +* [[`6734cc43df`](https://github.com/nodejs/node/commit/6734cc43df)] - **tools**: bump remark-preset-lint-node to 1.15.0 (Rich Trott) [#33157](https://github.com/nodejs/node/pull/33157)  | 
 | 171 | +* [[`a87d371014`](https://github.com/nodejs/node/commit/a87d371014)] - **tools**: fix redundant-move warning in inspector (Daniel Bevenius) [#32685](https://github.com/nodejs/node/pull/32685)  | 
 | 172 | +* [[`12426f59f5`](https://github.com/nodejs/node/commit/12426f59f5)] -  **tools **: update  [email protected] (Rich Trott)  [#33072](https://github.com/nodejs/node/pull/33072)  | 
 | 173 | +* [[`8c40ffc329`](https://github.com/nodejs/node/commit/8c40ffc329)] - **tools**: update broken types in type parser (Colin Ihrig) [#33068](https://github.com/nodejs/node/pull/33068)  | 
 | 174 | + | 
34 | 175 | <a id="14.1.0"></a>  | 
35 | 176 | ## 2020-04-29, Version 14.1.0 (Current), @BethGriggs  | 
36 | 177 | 
 
  | 
 | 
0 commit comments