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.0
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.1
Choose a head ref
  • 7 commits
  • 9 files changed
  • 3 contributors

Commits on Oct 18, 2024

  1. Test on new versions of Node

    kkoopa committed Oct 18, 2024
    Copy the full SHA
    848a433 View commit details

Commits on Oct 19, 2024

  1. Change methodswithdata tests line endings to LF (#971)

    These two files got committed with CRLF line endings, while the rest of the repo uses LF line endings.
    dsanders11 authored Oct 19, 2024

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    ef5a989 View commit details

Commits on Feb 11, 2025

  1. Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature.
    Copy the full SHA
    475ef4f View commit details

Commits on Feb 13, 2025

  1. Fix compatibility with Python >= 3.12 (#987)

    cclauss authored Feb 13, 2025
    Copy the full SHA
    b5d90f1 View commit details

Commits on Feb 21, 2025

  1. AppVeyor: Test and support versions 8, 10, 12, 14, 16, 17, 18, 19, 20…

    …, 21, and 22 (#983)
    
    * AppVeyor: Test on a supported version of Python
    
    Python 3.9 is the oldest version of Python that is supported.
    * https://devguide.python.org/versions
    
    * node-gyp > v10
    
    * versions 8, 10, 12, 14, 16, 17, 18, 19, 20, 21, and 22
    cclauss authored Feb 21, 2025
    Copy the full SHA
    313fb5f View commit details
  2. Prepare for 2.22.1

    kkoopa committed Feb 21, 2025
    Copy the full SHA
    a4b3248 View commit details
  3. 2.22.1

    kkoopa committed Feb 21, 2025
    Copy the full SHA
    84e835e View commit details
Showing with 338 additions and 320 deletions.
  1. +52 −0 .github/workflows/ci.yml
  2. +0 −1 .npmignore
  3. +0 −52 .travis.yml
  4. +5 −1 CHANGELOG.md
  5. +2 −3 README.md
  6. +43 −27 appveyor.yml
  7. +5 −5 package.json
  8. +194 −194 test/cpp/methodswithdata.cpp
  9. +37 −37 test/js/methodswithdata-test.js
52 changes: 52 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-nodejs
# https://github.com/actions/setup-node
# https://docs.github.com/en/actions/using-github-hosted-runners/using-github-hosted-runners/about-github-hosted-runners#standard-github-hosted-runners-for-public-repositories

name: ci
on:
push:
# branches: [main]
pull_request:
# branches: [main]
workflow_dispatch:
permissions:
contents: read
jobs:
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]
os: [windows-latest]
include:
- node-version: lts/*
os: macos-13 # macOS on Intel
- node-version: lts/*
os: macos-latest # macOS on arm64
- node-version: lts/*
os: ubuntu-latest # Linux on x64
- node-version: lts/*
os: ubuntu-24.04-arm # Linux on arm64
- node-version: lts/*
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 }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm install
# TODO: On Windows Node.js v11 these will fail but `make test` will succeed
- if: matrix.node-version != '11.x'
run: |
npm run-script rebuild-tests
npm test
- run: make test
1 change: 0 additions & 1 deletion .npmignore
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
test/
examples/
.dntrc
.travis.yml
.npmignore
appveyor.yml
Makefile
52 changes: 0 additions & 52 deletions .travis.yml

This file was deleted.

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

### 2.22.1 Feb 21 2025

- Build: Fix compatibility with Python >= 3.12 (#987) b5d90f15730b620fb6cc4fed079674740424539a

### 2.22.0 Oct 11 2024

5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,15 +1,14 @@
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, 16, 17, 18, 19, 20, 21, 22 and 23.**
**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.0***
***Current version: 2.22.1***

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

[![NPM](https://nodei.co/npm/nan.png?downloads=true&downloadRank=true)](https://nodei.co/npm/nan/) [![NPM](https://nodei.co/npm-dl/nan.png?months=6&height=3)](https://nodei.co/npm/nan/)

[![Build Status](https://api.travis-ci.com/nodejs/nan.svg?branch=master)](https://travis-ci.com/nodejs/nan)
[![Build status](https://ci.appveyor.com/api/projects/status/kh73pbm9dsju7fgh)](https://ci.appveyor.com/project/RodVagg/nan)

Thanks to the crazy changes in V8 (and some in Node core), keeping native addons compiling happily across versions, particularly 0.10 to 0.12 to 4.0, is a minor nightmare. The goal of this project is to store all logic necessary to develop native Node.js addons without having to inspect `NODE_MODULE_VERSION` and get yourself into a macro-tangle.
70 changes: 43 additions & 27 deletions appveyor.yml
Original file line number Diff line number Diff line change
@@ -1,51 +1,67 @@
# http://www.appveyor.com/docs/appveyor-yml
# https://www.appveyor.com/docs/windows-images-software
# https://nodejs.org/en/about/previous-releases
# https://devguide.python.org/versions

# Test supported Node.js versions before unsupported versions.
# Run on the most current Visual Studio possible for each nodejs_version.
# Run on the earliest supported Python version when possible (currently py39).
# For all supported Node.js versions test also on the latest Python (currently py313).

image:
- Visual Studio 2017
- Visual Studio 2022

# Test against these versions of Io.js and Node.js.
environment:
matrix:
# node.js
- nodejs_version: "0.10"
- nodejs_version: "0.12"
- nodejs_version: "4"
- nodejs_version: "5"
- nodejs_version: "6"
- nodejs_version: "7"
- nodejs_version: "8"
- nodejs_version: "9"
- nodejs_version: "10"
- nodejs_version: "11"
- nodejs_version: "12"
- nodejs_version: "13"
- nodejs_version: "14"
- nodejs_version: "15"
- nodejs_version: "16"
- nodejs_version: "17"
- nodejs_version: "18"
- nodejs_version: "19"
- nodejs_version: "20"
NODE_GYP_FORCE_PYTHON: C:\Python39-x64\python.exe
matrix: # Test against these versions of Io.js and Node.js.
# - nodejs_version: "23" # Enable after nodejs/nan#979 or similar.
- nodejs_version: "22"
- nodejs_version: "22"
NODE_GYP_FORCE_PYTHON: C:\Python312-x64\python.exe
- nodejs_version: "21"
- nodejs_version: "20"
- nodejs_version: "19"
- nodejs_version: "18"
- nodejs_version: "17"
- nodejs_version: "16"
- nodejs_version: "14"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- nodejs_version: "12"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- nodejs_version: "10"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019
- nodejs_version: "8"
APPVEYOR_BUILD_WORKER_IMAGE: Visual Studio 2019

matrix:
fast_finish: true

# Install scripts. (runs after repo cloning)
install:
# Output useful info for debugging.
- node --version
- npm --version
- py --list
- py -VV # py is 64-bit AMD64 Python 3 on Visual Studio images
- python -VV # python is 32-bit Intel Python 3 on Visual Studio images
# Get the latest stable version of Node 0.STABLE.latest
- 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
- node --version
- set PATH=%APPDATA%\npm;%PATH%
# Typical npm stuff.
- npm install
- IF %nodejs_version% LSS 8 (npm run rebuild-tests) ELSE (npm run rebuild-tests-2017)
- npm run rebuild-tests

# Post-install test scripts.
test_script:
# Output useful info for debugging.
- node --version
- npm --version
- py --list
- py -VV # py is 64-bit AMD64 Python 3 on Visual Studio images
- python -VV # python is 32-bit Intel Python 3 on Visual Studio images
# run tests
- IF %nodejs_version% LSS 1 (npm test) ELSE (IF %nodejs_version% LSS 4 (iojs node_modules\tap\bin\tap.js --gc test/js/*-test.js) ELSE (node node_modules\tap\bin\tap.js --gc test/js/*-test.js))
- node node_modules\tap\bin\tap.js --gc test/js/*-test.js

# Don't actually build.
build: off
10 changes: 5 additions & 5 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "nan",
"version": "2.22.0",
"description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 23 compatibility",
"version": "2.22.1",
"description": "Native Abstractions for Node.js: C++ header for Node 0.8 -> 22 compatibility",
"main": "include_dirs.js",
"repository": {
"type": "git",
@@ -10,8 +10,8 @@
"scripts": {
"test": "tap --gc --stderr test/js/*-test.js",
"test:worker": "node --experimental-worker test/tap-as-worker.js --gc --stderr test/js/*-test.js",
"rebuild-tests": "node-gyp rebuild --msvs_version=2015 --directory test",
"rebuild-tests-2017": "node-gyp rebuild --msvs_version=2017 --directory test",
"rebuild-tests-2015": "node-gyp rebuild --msvs_version=2015 --directory test",
"rebuild-tests": "node-gyp rebuild --directory test",
"docs": "doc/.build.sh"
},
"contributors": [
@@ -29,7 +29,7 @@
"commander": "^2.8.1",
"glob": "^5.0.14",
"request": "=2.81.0",
"node-gyp": "~8.4.1",
"node-gyp": "~v10.3.1",
"readable-stream": "^2.1.4",
"tap": "~0.7.1",
"xtend": "~4.0.0"
Loading