diff --git a/.travis.yml b/.travis.yml index 20d5f0c6..a5f21f67 100644 --- a/.travis.yml +++ b/.travis.yml @@ -26,6 +26,8 @@ env: - TRAVIS_NODE_VERSION="14" - 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/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/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: 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/appveyor.yml b/appveyor.yml index bb66fb31..9d37ae0c 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -19,11 +19,13 @@ environment: - nodejs_version: "14" - nodejs_version: "15" - nodejs_version: "16" + - nodejs_version: "17" + - nodejs_version: "18" # 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% diff --git a/nan.h b/nan.h index 6c8356c8..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 **********************************************************************************/ @@ -43,6 +43,8 @@ #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 +#define NODE_18_0_MODULE_VERSION 108 #ifdef _MSC_VER # define NAN_HAS_CPLUSPLUS_11 (_MSC_VER >= 1800) @@ -2548,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/package.json b/package.json index 3cb78a11..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": { @@ -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" 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(