Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: nodejs/nan
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: v2.22.1
Choose a base ref
...
head repository: nodejs/nan
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: v2.22.2
Choose a head ref
  • 3 commits
  • 5 files changed
  • 2 contributors

Commits on Feb 26, 2025

  1. Fix version guard for ScriptOrigin constructors (#989)

    * Fix version guard for ScriptOrigin constructors
    
    The current version guard for Isolate-less ScriptOrigin constructors
    checks both V8_MAJOR_VERSION > 11 and V8_MINOR_VERSION > 7. Newer V8s
    with a minor version not greater than 7, such as V8 v13.2.152.36 of
    Electron v34.2.0, still fall back to deprecated constructors removed
    since V8 v12.7.23 and fail to compile.
    
    Isolate-taking constructors were deprecate_soon'd in 2282b3d (12.1.140),
    deprecated in 0b52081 (12.6.175) and removed in 7cd2b0c (12.7.23).
    
    Corrected the version cutoff to 12.6.175 when the constructors in
    question were officially deprecated.
    SuibianP authored Feb 26, 2025
    Copy the full SHA
    053239d View commit details
  2. Prepare for 2.22.2

    kkoopa committed Feb 26, 2025
    Copy the full SHA
    d136f6f View commit details
  3. 2.22.2

    kkoopa committed Feb 26, 2025
    Copy the full SHA
    3bf8863 View commit details
Showing with 12 additions and 6 deletions.
  1. +5 −1 CHANGELOG.md
  2. +1 −1 README.md
  3. +1 −1 nan.h
  4. +4 −2 nan_scriptorigin.h
  5. +1 −1 package.json
6 changes: 5 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
# NAN ChangeLog

**Version 2.22.1: current Node 22.14.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1**
**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**

### 2.22.2 Feb 26 2025

- Bugfix: Fix version guard for `ScriptOrigin` constructors (#989) 053239d73702ac11fa0c3c438f85c1409f960f89

### 2.22.1 Feb 21 2025

2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -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 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, and 22.**

***Current version: 2.22.1***
***Current version: 2.22.2***

*(See [CHANGELOG.md](https://github.com/nodejs/nan/blob/master/CHANGELOG.md) for complete ChangeLog)*

2 changes: 1 addition & 1 deletion nan.h
Original file line number Diff line number Diff line change
@@ -13,7 +13,7 @@
*
* MIT License <https://github.com/nodejs/nan/blob/master/LICENSE.md>
*
* Version 2.22.0: current Node 22.9.0, Node 0.12: 0.12.18, Node 0.10: 0.10.48, iojs: 3.3.1
* 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
*
* See https://github.com/nodejs/nan for the latest update to this file
**********************************************************************************/
6 changes: 4 additions & 2 deletions nan_scriptorigin.h
Original file line number Diff line number Diff line change
@@ -12,8 +12,10 @@
class ScriptOrigin : public v8::ScriptOrigin {
public:

#if defined(V8_MAJOR_VERSION) && (V8_MAJOR_VERSION > 11 \
&& defined(V8_MINOR_VERSION) && V8_MINOR_VERSION > 7)
#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) :
v8::ScriptOrigin(name) {}

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "nan",
"version": "2.22.1",
"version": "2.22.2",
"description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 22 compatibility",
"main": "include_dirs.js",
"repository": {