Skip to content

Commit 34221c1

Browse files
committed
Prepare release v5.1.0.
1 parent 79a446f commit 34221c1

File tree

3 files changed

+124
-15
lines changed

3 files changed

+124
-15
lines changed

CHANGELOG.md

+82-9
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,78 @@
11
# node-addon-api Changelog
22

3+
## 2023-01-13 Version 5.1.0, @NickNaso
4+
5+
### Notable changes
6+
7+
#### API
8+
9+
- Fixed memory leak in `Napi::AsyncProgressWorkerBase`.
10+
- Added api to get `callback_info` from `Napi::CallBackInfo`.
11+
- Fixed erros and warning in VS 2017.
12+
- Made `Npi::Env::CleanupHook` public.
13+
- Removed `Napi::TypedArray::unknown_array_type`.
14+
15+
#### TEST
16+
17+
- Some minor fixes all over the test suite.
18+
- Added tests related to `Napi::Env`.
19+
- Added tests related to `Napi::TypedArray`.
20+
- Added tests related to `Napi::AsyncWorker`.
21+
- Added tests related to `Napi::TypedThreadSafeFunction`.
22+
- Added tests related to `Napi::Value`.
23+
- Added test related to `Napi::Promise`.
24+
25+
### Documentation
26+
27+
- Some minor fixes all over the documentation.
28+
- Added `Napi::HandleScope` example.
29+
- Added documentation about how to run a specific unit test.
30+
31+
### TOOL
32+
33+
- Added Windows with VS 2022 and Node.JS 19.x to the CI matrix.
34+
- Fixed stale workflow.
35+
- Updated Node.js versions on CI component.
36+
- Added condition for Window to find eslint.
37+
38+
### Commits
39+
40+
* \[[`79a446fb9c`](https://github.com/nodejs/node-addon-api/commit/79a446fb9c)] - Update contributors (#1265) (Kevin Eady)
41+
* \[[`01c61690c6`](https://github.com/nodejs/node-addon-api/commit/01c61690c6)] - **src**: napi-inl: Fix a memory leak bug in `AsyncProgressWorkerBase` (Ammar Faizi) [#1264](https://github.com/nodejs/node-addon-api/pull/1264)
42+
* \[[`55bd08ee26`](https://github.com/nodejs/node-addon-api/commit/55bd08ee26)] - **src**: api to get callback\_info from CallBackInfo (JckXia) [#1253](https://github.com/nodejs/node-addon-api/pull/1253)
43+
* \[[`ad76256714`](https://github.com/nodejs/node-addon-api/commit/ad76256714)] - **test**: add tests related to env (JckXia) [#1254](https://github.com/nodejs/node-addon-api/pull/1254)
44+
* \[[`5c3937365d`](https://github.com/nodejs/node-addon-api/commit/5c3937365d)] - **chore**: add Windows with VS 2022 and Node.JS 19.x to the CI matrix (#1252) (Vladimir Morozov)
45+
* \[[`97736c93f4`](https://github.com/nodejs/node-addon-api/commit/97736c93f4)] - **src**: fix errors and warnings in VS 2017 (Vladimir Morozov) [#1245](https://github.com/nodejs/node-addon-api/pull/1245)
46+
* \[[`ad7ff92c16`](https://github.com/nodejs/node-addon-api/commit/ad7ff92c16)] - **src**: refactor call js wrapper (#1242) (Jack)
47+
* \[[`39267baf1b`](https://github.com/nodejs/node-addon-api/commit/39267baf1b)] - **src**: make CleanupHook public (Julian Mesa) [#1240](https://github.com/nodejs/node-addon-api/pull/1240)
48+
* \[[`edf630cc79`](https://github.com/nodejs/node-addon-api/commit/edf630cc79)] - **src**: fix implementation of Signal (Kevin Eady) [#1216](https://github.com/nodejs/node-addon-api/pull/1216)
49+
* \[[`de5a502f3c`](https://github.com/nodejs/node-addon-api/commit/de5a502f3c)] - **doc**: Napi::Error is caught (Nicola Del Gobbo) [#1241](https://github.com/nodejs/node-addon-api/pull/1241)
50+
* \[[`10ad762807`](https://github.com/nodejs/node-addon-api/commit/10ad762807)] - **test**: removed the usage of default\_configuration. (Nicola Del Gobbo) [#1226](https://github.com/nodejs/node-addon-api/pull/1226)
51+
* \[[`e9db2adef2`](https://github.com/nodejs/node-addon-api/commit/e9db2adef2)] - **test**: Add test coverage to TSFN::New() overloads (#1201) (Jack)
52+
* \[[`c849ad3f6a`](https://github.com/nodejs/node-addon-api/commit/c849ad3f6a)] - **chore**: fix stale workflow (#1228) (Richard Lau)
53+
* \[[`e408804ad8`](https://github.com/nodejs/node-addon-api/commit/e408804ad8)] - **test**: adding ref for threadsafefunctions (JckXia) [#1222](https://github.com/nodejs/node-addon-api/pull/1222)
54+
* \[[`a8afb2d73c`](https://github.com/nodejs/node-addon-api/commit/a8afb2d73c)] - **src**: remove TypedArray::unknown\_array\_type (Kevin Eady) [#1209](https://github.com/nodejs/node-addon-api/pull/1209)
55+
* \[[`257a52f823`](https://github.com/nodejs/node-addon-api/commit/257a52f823)] - **test**: Add test cased for failed task cancellations (#1214) (Jack)
56+
* \[[`793268c59f`](https://github.com/nodejs/node-addon-api/commit/793268c59f)] - **test**: Add test case for canceling async worker tasks (#1202) (Jack)
57+
* \[[`1331856ef1`](https://github.com/nodejs/node-addon-api/commit/1331856ef1)] - **doc**: add HandleScope example (#1210) (Kevin Eady)
58+
* \[[`d5fc875e5d`](https://github.com/nodejs/node-addon-api/commit/d5fc875e5d)] - **test**: remove update to process.config (#1208) (Michael Dawson)
59+
* \[[`30cd4a37f0`](https://github.com/nodejs/node-addon-api/commit/30cd4a37f0)] - **test**: add tests for .Data method (JckXia) [#1203](https://github.com/nodejs/node-addon-api/pull/1203)
60+
* \[[`225ca35963`](https://github.com/nodejs/node-addon-api/commit/225ca35963)] - **test**: Add test coverage for "TSFN::Ref()" (#1196) (Jack)
61+
* \[[`5a5a213985`](https://github.com/nodejs/node-addon-api/commit/5a5a213985)] - Update CI component versions (#1200) (Vladimir Morozov)
62+
* \[[`fb27e72b0c`](https://github.com/nodejs/node-addon-api/commit/fb27e72b0c)] - **doc**: Update CONTRIBUTING.md (Saint Gabriel) [#1185](https://github.com/nodejs/node-addon-api/pull/1185)
63+
* \[[`e9def3ed72`](https://github.com/nodejs/node-addon-api/commit/e9def3ed72)] - **doc**: Update Readme for filter conditions in unit tests (Deepak Rajamohan) [#1199](https://github.com/nodejs/node-addon-api/pull/1199)
64+
* \[[`efd67876e1`](https://github.com/nodejs/node-addon-api/commit/efd67876e1)] - **doc**: updated npm script for focused tests (Peter Šándor)
65+
* \[[`134961d853`](https://github.com/nodejs/node-addon-api/commit/134961d853)] - **test**: CallbackInfo NewTarget() basic coverage (#1048) (Peter Šándor)
66+
* \[[`1dfd03bdd5`](https://github.com/nodejs/node-addon-api/commit/1dfd03bdd5)] - Update README.md (#1187) (Saint Gabriel)
67+
* \[[`576128fd19`](https://github.com/nodejs/node-addon-api/commit/576128fd19)] - **doc**: fix typo in async\_operations.md (#1189) (Tobias Nießen)
68+
* \[[`63d3c30ec1`](https://github.com/nodejs/node-addon-api/commit/63d3c30ec1)] - **test**: add tests for TypedArray (Dante Calderon) [#1179](https://github.com/nodejs/node-addon-api/pull/1179)
69+
* \[[`358ac2f080`](https://github.com/nodejs/node-addon-api/commit/358ac2f080)] - Fix link to CMake.js documentation (#1180) (Kyle Kovacs)
70+
* \[[`dc4f2bbe4a`](https://github.com/nodejs/node-addon-api/commit/dc4f2bbe4a)] - **test**: Add promise unit test (#1173) (Jenny)
71+
* \[[`f3124ae0ed`](https://github.com/nodejs/node-addon-api/commit/f3124ae0ed)] - **doc**: fix broken `Napi::ThreadSafeFunction` link (#1172) (Feng Yu)
72+
* \[[`10b440fe27`](https://github.com/nodejs/node-addon-api/commit/10b440fe27)] - **src**: reformat all code (Kevin Eady) [#1160](https://github.com/nodejs/node-addon-api/pull/1160)
73+
* \[[`33e402971e`](https://github.com/nodejs/node-addon-api/commit/33e402971e)] - **test**: Add condition for window to find eslint (#1176) (Jack)
74+
* \[[`d53843b83b`](https://github.com/nodejs/node-addon-api/commit/d53843b83b)] - **test**: add missing value tests (JckXia) [#1170](https://github.com/nodejs/node-addon-api/pull/1170)
75+
376
## 2022-05-02 Version 5.0.0, @NickNaso
477

578
### Notable changes:
@@ -16,7 +89,7 @@ of `Napi::Value`'s.
1689
- Improved the test framework. Added the possibility to run subsets of tests
1790
more easily.
1891
- Added test for `Napi::AsyncContext` class.
19-
- Fixed ramdom failure on test for `Napi::ThreadSafeFunction` e
92+
- Fixed ramdom failure on test for `Napi::ThreadSafeFunction` e
2093
`Napi::TypedThreadSafeFunction` class.
2194
- Fixed compilation problem on debian 8 system.
2295
- Added test for `Napi::Object::Set()` method.
@@ -142,10 +215,10 @@ more easily.
142215

143216
#### API
144217

145-
- `Napi::Reference` updated the default value to reflect the most possible
218+
- `Napi::Reference` updated the default value to reflect the most possible
146219
values when there are any errors occurred on `napi_reference_unref`.
147220
- Added the check for nullpointer on `Napi::String` initialization.
148-
- Added the wraps for `napi_add_env_cleanup_hook` and
221+
- Added the wraps for `napi_add_env_cleanup_hook` and
149222
`napi_remove_env_cleanup_hook`.
150223
- Added `Napi::Maybe<T>` class to handle pending exception when cpp exception
151224
disabled.
@@ -176,9 +249,9 @@ disabled.
176249

177250
#### API
178251

179-
- Fixed a crashing issue in `Napi::Error::ThrowAsJavaScriptException`
252+
- Fixed a crashing issue in `Napi::Error::ThrowAsJavaScriptException`
180253
introducing the preprocessor directive `NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS`.
181-
- Fixed compilation problem for GCC 11 and C++20.
254+
- Fixed compilation problem for GCC 11 and C++20.
182255

183256
#### TEST
184257

@@ -297,12 +370,12 @@ introducing the preprocessor directive `NODE_API_SWALLOW_UNTHROWABLE_EXCEPTIONS`
297370
#### API
298371

299372
- Added `Napi::TypedThreadSafeFunction` class that is a new implementation for
300-
thread-safe functions.
373+
thread-safe functions.
301374
- Fixed leak on `Napi::AsyncProgressWorkerBase`.
302-
- Fixed empty data on `Napi::AsyncProgressWorker::OnProgress` caused by race
375+
- Fixed empty data on `Napi::AsyncProgressWorker::OnProgress` caused by race
303376
conditions of `Napi::AsyncProgressWorker`.
304377
- Added `Napi::ArrayBuffer::Detach()` and `Napi::ArrayBuffer::IsDetached()`.
305-
- Fixed problem on `Napi::FinalizeCallback` it needs to create a
378+
- Fixed problem on `Napi::FinalizeCallback` it needs to create a
306379
`Napi::HandleScope` when it calls `Napi::ObjectWrap::~ObjectWrap()`.
307380

308381
#### Documentation
@@ -373,7 +446,7 @@ conditions of `Napi::AsyncProgressWorker`.
373446
#### API
374447

375448
- Introduced `include_dir` for use with **gyp** in a scalar context.
376-
- Added `Napi::Addon` to help handle the loading of a native add-on into
449+
- Added `Napi::Addon` to help handle the loading of a native add-on into
377450
multiple threads and or multiple times in the same thread.
378451
- Concentrate callbacks provided to core N-API.
379452
- Make sure wrapcallback is used.

README.md

+5-5
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ and node-addon-api.
7070
- **[Contributors](#contributors)**
7171
- **[License](#license)**
7272

73-
## **Current version: 5.0.0**
73+
## **Current version: 5.1.0**
7474

7575
(See [CHANGELOG.md](CHANGELOG.md) for complete Changelog)
7676

@@ -194,21 +194,21 @@ To run a specific unit test, filter conditions are available
194194
```
195195
npm run unit --filter=objectwrap
196196
```
197-
197+
198198
Multiple unit tests cane be selected with wildcards
199199

200200
**Example:**
201201
compile and run all test files ending with "reference" -> function_reference.cc, object_reference.cc, reference.cc
202-
```
202+
```
203203
npm run unit --filter=*reference
204204
```
205-
205+
206206
Multiple filter conditions can be joined to broaden the test selection
207207

208208
**Example:**
209209
compile and run all tests under folders threadsafe_function and typed_threadsafe_function and also the objectwrap.cc file
210210
npm run unit --filter='*function objectwrap'
211-
211+
212212
### **Debug**
213213

214214
To run the **node-addon-api** tests with `--debug` option:

package.json

+37-1
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,10 @@
1515
"name": "Alexander Floh",
1616
"url": "https://github.com/alexanderfloh"
1717
},
18+
{
19+
"name": "Ammar Faizi",
20+
"url": "https://github.com/ammarfaizi2"
21+
},
1822
{
1923
"name": "András Timár, Dr",
2024
"url": "https://github.com/timarandras"
@@ -71,6 +75,10 @@
7175
"name": "Daniel Bevenius",
7276
"url": "https://github.com/danbev"
7377
},
78+
{
79+
"name": "Dante Calderón",
80+
"url": "https://github.com/dantehemerson"
81+
},
7482
{
7583
"name": "Darshan Sen",
7684
"url": "https://github.com/RaisinTen"
@@ -103,6 +111,10 @@
103111
"name": "extremeheat",
104112
"url": "https://github.com/extremeheat"
105113
},
114+
{
115+
"name": "Feng Yu",
116+
"url": "https://github.com/F3n67u"
117+
},
106118
{
107119
"name": "Ferdinand Holzer",
108120
"url": "https://github.com/fholzer"
@@ -147,6 +159,10 @@
147159
"name": "Jason Ginchereau",
148160
"url": "https://github.com/jasongin"
149161
},
162+
{
163+
"name": "Jenny",
164+
"url": "https://github.com/egg-bread"
165+
},
150166
{
151167
"name": "Jeroen Janssen",
152168
"url": "https://github.com/japj"
@@ -167,6 +183,10 @@
167183
"name": "joshgarde",
168184
"url": "https://github.com/joshgarde"
169185
},
186+
{
187+
"name": "Julian Mesa",
188+
"url": "https://github.com/julianmesa-gitkraken"
189+
},
170190
{
171191
"name": "Kasumi Hanazuki",
172192
"url": "https://github.com/hanazuki"
@@ -199,6 +219,10 @@
199219
"name": "Kyle Farnung",
200220
"url": "https://github.com/kfarnung"
201221
},
222+
{
223+
"name": "Kyle Kovacs",
224+
"url": "https://github.com/nullromo"
225+
},
202226
{
203227
"name": "legendecas",
204228
"url": "https://github.com/legendecas"
@@ -267,6 +291,10 @@
267291
"name": "pacop",
268292
"url": "https://github.com/pacop"
269293
},
294+
{
295+
"name": "Peter Šándor",
296+
"url": "https://github.com/petersandor"
297+
},
270298
{
271299
"name": "Philipp Renoth",
272300
"url": "https://github.com/DaAitch"
@@ -275,6 +303,10 @@
275303
"name": "rgerd",
276304
"url": "https://github.com/rgerd"
277305
},
306+
{
307+
"name": "Richard Lau",
308+
"url": "https://github.com/richardlau"
309+
},
278310
{
279311
"name": "Rolf Timmermans",
280312
"url": "https://github.com/rolftimmermans"
@@ -287,6 +319,10 @@
287319
"name": "Ryuichi Okumura",
288320
"url": "https://github.com/okuryu"
289321
},
322+
{
323+
"name": "Saint Gabriel",
324+
"url": "https://github.com/chineduG"
325+
},
290326
{
291327
"name": "Sampson Gao",
292328
"url": "https://github.com/sampsongao"
@@ -415,6 +451,6 @@
415451
"lint:fix": "node tools/clang-format --fix && node tools/eslint-format --fix"
416452
},
417453
"pre-commit": "lint",
418-
"version": "5.0.0",
454+
"version": "5.1.0",
419455
"support": true
420456
}

0 commit comments

Comments
 (0)