| repos: | ||
| - repo: https://github.com/cpplint/cpplint | ||
| rev: 2.0.0 | ||
| hooks: | ||
| - id: cpplint | ||
| args: | ||
| - --filter=-whitespace/indent_namespace,-whitespace/parens | ||
| - --linelength=88 |
@@ -15,7 +15,13 @@ # https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs | ||
| jobs: | ||
| pre-commit: | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - uses: actions/checkout@v4 | ||
| - uses: pre-commit/action@v3.0.1 | ||
| ci: | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: # TODO: Enable 23.x after nodejs/nan#979 or similar. | ||
| node-version: [22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x] | ||
| matrix: | ||
| node-version: [24.x, 23.x, 22.x, 21.x, 20.x, 19.x, 18.x, 17.x, 16.x] | ||
| os: [windows-latest] | ||
@@ -33,10 +39,2 @@ include: | ||
| os: windows-2025 | ||
| - node-version: 14.x | ||
| os: windows-2019 | ||
| - node-version: 12.x | ||
| os: windows-2019 | ||
| - node-version: 10.x | ||
| os: windows-2019 | ||
| - node-version: 8.x | ||
| os: windows-2019 | ||
| runs-on: ${{ matrix.os }} | ||
@@ -43,0 +41,0 @@ steps: |
+5
-1
| # NAN ChangeLog | ||
| **Version 2.22.2: current Node 22.14.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** | ||
| **Version 2.23.0: current Node 24.4.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1** | ||
| ### 2.23.0 Jul 10 2025 | ||
| - Feature: Support Node 23 (#979) 59ab6d03d5d68554290ee9f34003cd90aa92c185 | ||
| ### 2.22.2 Feb 26 2025 | ||
@@ -6,0 +10,0 @@ |
@@ -109,6 +109,20 @@ /********************************************************************* | ||
| #if NODE_MAJOR_VERSION < 10 | ||
| inline v8::Local<v8::Function> Callee() const { return info_.Callee(); } | ||
| NAN_DEPRECATED inline v8::Local<v8::Function> Callee() const { | ||
| return info_.Callee(); | ||
| } | ||
| #endif | ||
| inline v8::Local<v8::Value> Data() const { return data_; } | ||
| inline v8::Local<v8::Object> Holder() const { return info_.Holder(); } | ||
| inline v8::Local<v8::Object> Holder() const { | ||
| #if defined(V8_MAJOR_VERSION) && \ | ||
| (V8_MAJOR_VERSION > 12 || \ | ||
| (V8_MAJOR_VERSION == 12 && \ | ||
| (defined(V8_MINOR_VERSION) && \ | ||
| (V8_MINOR_VERSION > 5 || \ | ||
| (V8_MINOR_VERSION == 5 && defined(V8_BUILD_NUMBER) && \ | ||
| V8_BUILD_NUMBER >= 214))))) | ||
| return info_.This(); | ||
| #else | ||
| return info_.Holder(); | ||
| #endif | ||
| } | ||
| inline bool IsConstructCall() const { return info_.IsConstructCall(); } | ||
@@ -115,0 +129,0 @@ inline int Length() const { return info_.Length(); } |
@@ -139,5 +139,9 @@ /********************************************************************* | ||
| inline v8::Local<v8::Function> Callee() const { return args_.Callee(); } | ||
| NAN_DEPRECATED inline v8::Local<v8::Function> Callee() const { | ||
| return args_.Callee(); | ||
| } | ||
| inline v8::Local<v8::Value> Data() const { return data_; } | ||
| inline v8::Local<v8::Object> Holder() const { return args_.Holder(); } | ||
| inline v8::Local<v8::Object> Holder() const { | ||
| return args_.Holder(); | ||
| } | ||
| inline bool IsConstructCall() const { return args_.IsConstructCall(); } | ||
@@ -144,0 +148,0 @@ inline int Length() const { return args_.Length(); } |
+13
-0
@@ -16,2 +16,15 @@ /********************************************************************* | ||
| #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \ | ||
| (V8_MAJOR_VERSION == 12 && defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 4)) | ||
| namespace Intercepted { | ||
| constexpr v8::Intercepted No() { return v8::Intercepted::kNo; } | ||
| constexpr v8::Intercepted Yes() { return v8::Intercepted::kYes; } | ||
| }; | ||
| #else | ||
| namespace Intercepted { | ||
| inline void No() {} | ||
| inline void Yes() {} | ||
| }; | ||
| #endif | ||
| typedef void(*FunctionCallback)(const FunctionCallbackInfo<v8::Value>&); | ||
@@ -18,0 +31,0 @@ typedef void(*GetterCallback) |
@@ -93,3 +93,3 @@ /********************************************************************* | ||
| #if NODE_MODULE_VERSION < NODE_4_0_MODULE_VERSION | ||
| #include "nan_define_own_property_helper.h" // NOLINT(build/include) | ||
| #include "nan_define_own_property_helper.h" // NOLINT(build/include_subdir) | ||
| #endif | ||
@@ -96,0 +96,0 @@ |
@@ -103,3 +103,3 @@ /********************************************************************* | ||
| #include "nan_define_own_property_helper.h" // NOLINT(build/include) | ||
| #include "nan_define_own_property_helper.h" // NOLINT(build/include_subdir) | ||
@@ -106,0 +106,0 @@ inline Maybe<bool> DefineOwnProperty( |
+11
-9
@@ -14,7 +14,9 @@ /********************************************************************* | ||
| public: | ||
| #if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 12 || \ | ||
| (V8_MAJOR_VERSION == 12 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 6\ | ||
| || (V8_MINOR_VERSION == 6 && defined(V8_BUILD_NUMBER) \ | ||
| && V8_BUILD_NUMBER >= 175))))) | ||
| #if defined(V8_MAJOR_VERSION) && \ | ||
| (V8_MAJOR_VERSION > 12 || \ | ||
| (V8_MAJOR_VERSION == 12 && \ | ||
| (defined(V8_MINOR_VERSION) && \ | ||
| (V8_MINOR_VERSION > 6 || \ | ||
| (V8_MINOR_VERSION == 6 && defined(V8_BUILD_NUMBER) && \ | ||
| V8_BUILD_NUMBER >= 175))))) | ||
| explicit ScriptOrigin(v8::Local<v8::Value> name) : | ||
@@ -26,3 +28,3 @@ v8::ScriptOrigin(name) {} | ||
| v8::ScriptOrigin(name | ||
| , To<int32_t>(line).FromMaybe(0)) {} | ||
| , To<int32_t>(line).FromMaybe(0)) {} | ||
@@ -33,5 +35,5 @@ ScriptOrigin(v8::Local<v8::Value> name | ||
| v8::ScriptOrigin(name | ||
| , To<int32_t>(line).FromMaybe(0) | ||
| , To<int32_t>(column).FromMaybe(0)) {} | ||
| #elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \ | ||
| , To<int32_t>(line).FromMaybe(0) | ||
| , To<int32_t>(column).FromMaybe(0)) {} | ||
| #elif defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 9 || \ | ||
| (V8_MAJOR_VERSION == 9 && (defined(V8_MINOR_VERSION) && (V8_MINOR_VERSION > 0\ | ||
@@ -38,0 +40,0 @@ || (V8_MINOR_VERSION == 0 && defined(V8_BUILD_NUMBER) \ |
@@ -86,3 +86,3 @@ /********************************************************************* | ||
| //Disable heap allocation | ||
| // Disable heap allocation | ||
| void *operator new(size_t size); | ||
@@ -89,0 +89,0 @@ void operator delete(void *, size_t) { |
+2
-2
| { | ||
| "name": "nan", | ||
| "version": "2.22.2", | ||
| "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 22 compatibility", | ||
| "version": "2.23.0", | ||
| "description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 24 compatibility", | ||
| "main": "include_dirs.js", | ||
@@ -6,0 +6,0 @@ "repository": { |
+4
-4
| 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 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, and 22.** | ||
| **A header file filled with macro and utility goodness for making add-on development for Node.js easier across versions 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, 22, 23 and 24.** | ||
| ***Current version: 2.22.2*** | ||
| ***Current version: 2.23.0*** | ||
@@ -34,6 +34,6 @@ *(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)* | ||
| Simply add **NAN** as a dependency in the *package.json* of your Node addon: | ||
| Simply add **NAN** as a dependency using a package manager like npm, yarn, or bun: | ||
| ``` bash | ||
| $ npm install --save nan | ||
| $ npm install nan | ||
| ``` | ||
@@ -40,0 +40,0 @@ |
Sorry, the diff of this file is too big to display
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
Filesystem access
Supply chain riskAccesses the file system, and could potentially read sensitive data.
Found 1 instance in 1 package
Long strings
Supply chain riskContains long string literals, which may be a sign of obfuscated or packed code.
Found 1 instance in 1 package
445733
0.35%50
2.04%