From f9e63d6924bc562ddea81ba941460da71efcfd24 Mon Sep 17 00:00:00 2001 From: Eddie Monge Jr Date: Thu, 16 Dec 2021 12:31:22 -0800 Subject: [PATCH 1/8] docs: license format and contributors The license file differed enough that licensed did not recognize it. The link to the contributors was also outdated. --- LICENSE.md | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/LICENSE.md b/LICENSE.md index dddd13d5..2d33043d 100644 --- a/LICENSE.md +++ b/LICENSE.md @@ -1,10 +1,6 @@ The MIT License (MIT) -===================== -Copyright (c) 2018 NAN contributors ------------------------------------ - -*NAN contributors listed at * +Copyright (c) 2018 [NAN contributors]() Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions: From 96ed51a8607462f9601d26a3906a69f304955779 Mon Sep 17 00:00:00 2001 From: Michael Ira Krufky Date: Sun, 2 Jan 2022 10:17:25 -0500 Subject: [PATCH 2/8] add node 17 to the test matrix relates-to: https://github.com/nodejs/nan/issues/924 --- .travis.yml | 1 + appveyor.yml | 1 + 2 files changed, 2 insertions(+) diff --git a/.travis.yml b/.travis.yml index 20d5f0c6..ad3d02cd 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,7 @@ env: - TRAVIS_NODE_VERSION="14" - TRAVIS_NODE_VERSION="15" - TRAVIS_NODE_VERSION="16" + - TRAVIS_NODE_VERSION="17" - TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="2.0.18" - TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="3.1.13" - TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="4.2.12" diff --git a/appveyor.yml b/appveyor.yml index bb66fb31..e7c88eb3 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,6 +19,7 @@ environment: - nodejs_version: "14" - nodejs_version: "15" - nodejs_version: "16" + - nodejs_version: "17" # Install scripts. (runs after repo cloning) install: From 8db8c8f544f2b6ce1b0859ef6ecdd0a3873a9e62 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Gerhard=20St=C3=B6bich?= <18708370+Flarna@users.noreply.github.com> Date: Mon, 3 Jan 2022 09:37:06 +0100 Subject: [PATCH 3/8] add define NODE_17_0_MODULE_VERSION --- nan.h | 1 + 1 file changed, 1 insertion(+) diff --git a/nan.h b/nan.h index 6c8356c8..ae39e8a2 100644 --- a/nan.h +++ b/nan.h @@ -43,6 +43,7 @@ #define NODE_14_0_MODULE_VERSION 83 #define NODE_15_0_MODULE_VERSION 88 #define NODE_16_0_MODULE_VERSION 93 +#define NODE_17_0_MODULE_VERSION 102 #ifdef _MSC_VER # define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800) From a866bb44bcce1d5e2d62bc38732e978be8ceffe7 Mon Sep 17 00:00:00 2001 From: Christian Clauss Date: Fri, 22 Apr 2022 22:05:53 +0200 Subject: [PATCH 4/8] Upgrade node-gyp Failure to upgrade is causing a ton of pain at is:issue label:"ERR! node-gyp -v <= v5.1.0" --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 3cb78a11..bbea318a 100644 --- a/package.json +++ b/package.json @@ -28,7 +28,7 @@ "commander": "^2.8.1", "glob": "^5.0.14", "request": "=2.81.0", - "node-gyp": "~3.6.2", + "node-gyp": "~8.4.1", "readable-stream": "^2.1.4", "tap": "~0.7.1", "xtend": "~4.0.0" From 3aaaf1bb45c38944c175812ea3e146771ac9b1ea Mon Sep 17 00:00:00 2001 From: Michael Ira Krufky Date: Thu, 21 Apr 2022 20:54:05 -0400 Subject: [PATCH 5/8] fix appveyor build tests when x86 binary is not available As per Feodor Fitsner (Appveyor Support staff): > There is no x86 build of Node 18.x anymore, so you should [...] change it to: > > Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) x64 See Appveyor ticket: https://help.appveyor.com/discussions/problems/31957-please-install-nodejs-v18-new-builds-are-failing-looks-like-node-18-is-missing This fixes the following error: ``` Running Install scripts Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) Updating Node.js v18.0.0 (x86) Uninstalling Node.js v8.17.0 (x86)... Installing Node.js v18.0.0 (x86)... Exception calling "DownloadFile" with "2" argument(s): "The remote server returned an error: (404) Not Found." At C:\Program Files\AppVeyor\BuildAgent\Modules\nodejs-utils\nodejs-utils.psm1:58 char:5 + (New-Object Net.WebClient).DownloadFile($packageUrl, $packageFile ... + ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ + CategoryInfo : NotSpecified: (:) [], MethodInvocationException + FullyQualifiedErrorId : WebException IF %nodejs_version% LSS 4 npm -g install npm@2 IF %nodejs_version% EQU 5 npm -g install npm@3 set PATH=%APPDATA%\npm;%PATH% npm install 'npm' is not recognized as an internal or external command, operable program or batch file. Command exited with code 1 ``` --- appveyor.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/appveyor.yml b/appveyor.yml index e7c88eb3..09e735aa 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -24,7 +24,7 @@ environment: # Install scripts. (runs after repo cloning) install: # Get the latest stable version of Node 0.STABLE.latest - - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) + - ps: Update-NodeJsInstallation (Get-NodeJsLatestBuild $env:nodejs_version) x64 - IF %nodejs_version% LSS 4 npm -g install npm@2 - IF %nodejs_version% EQU 5 npm -g install npm@3 - set PATH=%APPDATA%\npm;%PATH% From 16fa32231e2ccd89d2804b3f765319128b20c4ac Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Sat, 23 Apr 2022 04:41:11 +0200 Subject: [PATCH 6/8] Add support for Node 18 Add compatibility with Node 18.0.0 --- .travis.yml | 1 + appveyor.yml | 1 + nan.h | 6 +++++- test/cpp/news.cpp | 12 ++++++++++-- 4 files changed, 17 insertions(+), 3 deletions(-) diff --git a/.travis.yml b/.travis.yml index ad3d02cd..a5f21f67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -27,6 +27,7 @@ env: - TRAVIS_NODE_VERSION="15" - TRAVIS_NODE_VERSION="16" - TRAVIS_NODE_VERSION="17" + - TRAVIS_NODE_VERSION="18" - TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="2.0.18" - TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="3.1.13" - TRAVIS_NODE_VERSION="lts/*" ELECTRON_VERSION="4.2.12" diff --git a/appveyor.yml b/appveyor.yml index 09e735aa..9d37ae0c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -20,6 +20,7 @@ environment: - nodejs_version: "15" - nodejs_version: "16" - nodejs_version: "17" + - nodejs_version: "18" # Install scripts. (runs after repo cloning) install: diff --git a/nan.h b/nan.h index ae39e8a2..df5496c1 100644 --- a/nan.h +++ b/nan.h @@ -44,6 +44,7 @@ #define NODE_15_0_MODULE_VERSION 88 #define NODE_16_0_MODULE_VERSION 93 #define NODE_17_0_MODULE_VERSION 102 +#define NODE_18_0_MODULE_VERSION 108 #ifdef _MSC_VER # define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800) @@ -2549,7 +2550,10 @@ inline void SetAccessor( , obj , settings , attribute - , signature); +#if (NODE_MODULE_VERSION < NODE_18_0_MODULE_VERSION) + , signature +#endif + ); } inline bool SetAccessor( diff --git a/test/cpp/news.cpp b/test/cpp/news.cpp index 5b54c0ce..a218167c 100644 --- a/test/cpp/news.cpp +++ b/test/cpp/news.cpp @@ -114,7 +114,11 @@ NAN_METHOD(NewScript) { } NAN_METHOD(NewScript2) { - v8::ScriptOrigin origin(New("x").ToLocalChecked()); + v8::ScriptOrigin origin( +#if NODE_MODULE_VERSION >= NODE_18_0_MODULE_VERSION + info.GetIsolate(), +#endif + New("x").ToLocalChecked()); v8::Local script = New( New("2+4").ToLocalChecked() @@ -131,7 +135,11 @@ NAN_METHOD(CompileScript) { } NAN_METHOD(CompileScript2) { - v8::ScriptOrigin origin(New("x").ToLocalChecked()); + v8::ScriptOrigin origin( +#if NODE_MODULE_VERSION >= NODE_18_0_MODULE_VERSION + info.GetIsolate(), +#endif + New("x").ToLocalChecked()); v8::Local script = CompileScript(New("2+4").ToLocalChecked(), origin).ToLocalChecked(); info.GetReturnValue().Set( From 862939f55504e980eb898a67ccd74f945043bc53 Mon Sep 17 00:00:00 2001 From: Benjamin Byholm Date: Wed, 25 May 2022 16:02:09 +0300 Subject: [PATCH 7/8] Prepare for 2.16.0 --- CHANGELOG.md | 6 +++++- README.md | 4 ++-- nan.h | 2 +- 3 files changed, 8 insertions(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2838f1a0..d82f56fa 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,6 +1,10 @@ # NAN ChangeLog -**Version 2.15.0: current Node 16.6.1, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** +**Version 2.16.0: current Node 18.2.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** + +### 2.16.0 May 25 2022 + + - Feature: Add support for Node 18 (#937) 16fa32231e2ccd89d2804b3f765319128b20c4ac ### 2.15.0 Aug 4 2021 diff --git a/README.md b/README.md index 8988a09d..0913333f 100644 --- a/README.md +++ b/README.md @@ -1,9 +1,9 @@ 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, 14, 15 and 16.** +**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, 14, 15, 16, 17 and 18.** -***Current version: 2.15.0*** +***Current version: 2.16.0*** *(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* diff --git a/nan.h b/nan.h index df5496c1..9e7c59e4 100644 --- a/nan.h +++ b/nan.h @@ -13,7 +13,7 @@ * * MIT License * - * Version 2.15.0: current Node 16.6.1, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1 + * Version 2.16.0: current Node 18.2.0, 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 22c8ac4b6de36a66a1cfef9363d4d7c12db87cd6 Mon Sep 17 00:00:00 2001 From: Benjamin Byholm Date: Wed, 25 May 2022 16:02:42 +0300 Subject: [PATCH 8/8] 2.16.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index bbea318a..d7ca99bc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "nan", - "version": "2.15.0", + "version": "2.16.0", "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 14 compatibility", "main": "include_dirs.js", "repository": {