From 8e4603d00fcbb5069b04da1368939d885163e2ce Mon Sep 17 00:00:00 2001 From: John Kerl Date: Thu, 6 Aug 2020 11:10:50 -0400 Subject: [PATCH 01/21] c++ -> C++ in README.md (#897) --- README.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/README.md b/README.md index 9b5f38ab..a1b3288b 100644 --- a/README.md +++ b/README.md @@ -213,7 +213,7 @@ NAN provides a `v8::Script` helpers as the API has changed over the supported ve ### JSON -The _JSON_ object provides the c++ versions of the methods offered by the `JSON` object in javascript. V8 exposes these methods via the `v8::JSON` object. +The _JSON_ object provides the C++ versions of the methods offered by the `JSON` object in javascript. V8 exposes these methods via the `v8::JSON` object. - Nan::JSON.Parse - Nan::JSON.Stringify From 35f0fab205574b2cbda04e6347c8b2db755e124f Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Sat, 10 Oct 2020 00:44:32 +0200 Subject: [PATCH 02/21] fix gcc 8 function cast warning (#899) --- nan.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/nan.h b/nan.h index 648e6e26..6135f735 100644 --- a/nan.h +++ b/nan.h @@ -2280,18 +2280,25 @@ inline void AsyncExecute (uv_work_t* req) { worker->Execute(); } -inline void AsyncExecuteComplete (uv_work_t* req) { +/* uv_after_work_cb has 1 argument before node-v0.9.4 and + * 2 arguments since node-v0.9.4 + * https://github.com/libuv/libuv/commit/92fb84b751e18f032c02609467f44bfe927b80c5 + */ +inline void AsyncExecuteComplete(uv_work_t *req) { AsyncWorker* worker = static_cast(req->data); worker->WorkComplete(); worker->Destroy(); } +inline void AsyncExecuteComplete (uv_work_t* req, int status) { + AsyncExecuteComplete(req); +} inline void AsyncQueueWorker (AsyncWorker* worker) { uv_queue_work( GetCurrentEventLoop() , &worker->request , AsyncExecute - , reinterpret_cast(AsyncExecuteComplete) + , AsyncExecuteComplete ); } From 955d2b86ac30f4849b297bc1412b5a5f66893756 Mon Sep 17 00:00:00 2001 From: Benjamin Byholm Date: Tue, 13 Oct 2020 15:40:42 +0300 Subject: [PATCH 03/21] Prepare for 2.14.2 --- CHANGELOG.md | 6 +++++- README.md | 2 +- nan.h | 2 +- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 44858c70..93d94964 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # NAN ChangeLog -**Version 2.14.1: current Node 14.0.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** +**Version 2.14.2: current Node 14.13.1, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** + +### 2.14.2 Oct 13 2020 + + - Bugfix: fix gcc 8 function cast warning (#899) 35f0fab205574b2cbda04e6347c8b2db755e124f ### 2.14.1 Apr 21 2020 diff --git a/README.md b/README.md index a1b3288b..f671ef14 100644 --- a/README.md +++ b/README.md @@ -3,7 +3,7 @@ Native Abstractions for Node.js **A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 0.8, 0.10, 0.12, 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13 and 14.** -***Current version: 2.14.1*** +***Current version: 2.14.2*** *(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* diff --git a/nan.h b/nan.h index 6135f735..59cd9b66 100644 --- a/nan.h +++ b/nan.h @@ -13,7 +13,7 @@ * * MIT License * - * Version 2.14.1: current Node 14.0.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1 + * Version 2.14.2: current Node 14.13.1, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1 * * See https://github.com/nodejs/nan for the latest update to this file **********************************************************************************/ From 7c3fc6884666bd19b597ea58a99f51f2f4860c4e Mon Sep 17 00:00:00 2001 From: Benjamin Byholm Date: Tue, 13 Oct 2020 15:41:22 +0300 Subject: [PATCH 04/21] 2.14.2 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index c7182c0b..224eaab8 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nan", - "version": "2.14.1", + "version": "2.14.2", "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 14 compatibility", "main": "include_dirs.js", "repository": { From e54794191bc81b77e3816ad6f6f433e74f40c15b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= Date: Thu, 10 Jun 2021 15:15:24 +0200 Subject: [PATCH 05/21] tests: adapt for v8 8.9 (#910) V8 API for ScriptOrigin constructor has changed. Adapt test to compile with v8 8.9. Currently only `ScriptOrigin` instances are consumed by NAN therefore no adaptions in the NAN API are needed to keep build/tests working. --- test/cpp/nannew.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/test/cpp/nannew.cpp b/test/cpp/nannew.cpp index a489f940..64c85799 100644 --- a/test/cpp/nannew.cpp +++ b/test/cpp/nannew.cpp @@ -246,7 +246,12 @@ NAN_METHOD(testScript) { t.plan(6); +#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 8 || \ + (V8_MAJOR_VERSION == 8 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION >= 9)) + ScriptOrigin origin(New("foo").ToLocalChecked(), 5); +#else ScriptOrigin origin(New("foo").ToLocalChecked(), New(5)); +#endif t.ok(_( assertType