From 4b962de6aa4a0fb0353d38fdb5e51c3de4145b38 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mathias=20K=C3=BCsel?= Date: Fri, 27 Dec 2024 22:40:13 +0100 Subject: [PATCH] save --- .github/workflows/release.yml | 2 +- .github/workflows/test.yml | 2 +- package.json | 14 +++++++------- src/node_snap7_server.cpp | 4 ++-- 4 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 00e9a47..d96ecf7 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -42,7 +42,7 @@ jobs: - name: Set up node uses: actions/setup-node@v4 with: - node-version: 16 + node-version: 18 architecture: ${{ matrix.arch }} - name: Install diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 0b23879..f1c9f35 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -8,7 +8,7 @@ jobs: fail-fast: false matrix: os: [ubuntu-latest, macos-latest, windows-latest] - node: [16, 18, 20] + node: [18, 20, 22] arch: [x86, x64] exclude: - { os: ubuntu-latest, arch: x86 } diff --git a/package.json b/package.json index 6b58f8d..6fff2aa 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "name": "Mathias Küsel" }, "engines": { - "node": ">=16" + "node": "^18 || ^20 || >= 21" }, "license": "MIT", "readmeFilename": "README.md", @@ -36,14 +36,14 @@ "scripts": { "install": "node-gyp-build", "rebuild": "npm run install --build-from-source", - "prebuild": "prebuildify -t 10.17.0 --napi --strip", + "prebuild": "prebuildify -t 18.20.4 --napi --strip", "test": "", "download-prebuilds": "prebuildify-ci download", - "prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 -i linux-arm64-lts -t 10.17.0 --napi --strip", + "prebuild-linux-arm": "prebuildify-cross -i linux-armv6 -i linux-armv7 -i linux-arm64-lts -t 18.20.4 --napi --strip", "prebuild-android-arm": "prebuildify-cross -i android-armv7 -i android-arm64 -t 8.14.0 --napi --strip", - "prebuild-linux-x64": "prebuildify-cross -i centos7-devtoolset7 -i alpine -t 10.17.0 --napi --strip", - "prebuild-darwin-x64+arm64": "prebuildify -t 10.17.0 --napi --strip --arch x64+arm64", - "prebuild-win32-x86": "prebuildify -t 10.17.0 --napi --strip", - "prebuild-win32-x64": "prebuildify -t 10.17.0 --napi --strip" + "prebuild-linux-x64": "prebuildify-cross -i centos7-devtoolset7 -i alpine -t 18.20.4 --napi --strip", + "prebuild-darwin-x64+arm64": "prebuildify -t 18.20.4 --napi --strip --arch x64+arm64", + "prebuild-win32-x86": "prebuildify -t 18.20.4 --napi --strip", + "prebuild-win32-x64": "prebuildify -t 18.20.4 --napi --strip" } } diff --git a/src/node_snap7_server.cpp b/src/node_snap7_server.cpp index f334345..312160c 100644 --- a/src/node_snap7_server.cpp +++ b/src/node_snap7_server.cpp @@ -418,7 +418,7 @@ S7Server::S7Server(const Napi::CallbackInfo &info) : Napi::ObjectWrap( tsfn.Unref(env); tsfnrw.Unref(env); - snap7Server->SetEventsCallback(&EventCallBack, this); + snap7Server->SetEventsCallback(reinterpret_cast(&EventCallBack), this); } S7Server::~S7Server() { @@ -551,7 +551,7 @@ Napi::Value S7Server::SetResourceless(const Napi::CallbackInfo& info) { int ret; if (resourceless) { - ret = snap7Server->SetRWAreaCallback(&RWAreaCallBack, this); + ret = snap7Server->SetRWAreaCallback(reinterpret_cast(&RWAreaCallBack), this); } else { ret = snap7Server->SetRWAreaCallback(nullptr, nullptr); }