From 0be8886cf21c32436cd54c6db22c98ee073d2508 Mon Sep 17 00:00:00 2001 From: Yuval Karmi Date: Sun, 5 Jan 2025 15:21:05 +0200 Subject: [PATCH] patch nan package for electron 33 - see https://github.com/nodejs/nan/issues/978 --- package-lock.json | 24 +++++++++++++----------- package.json | 5 +++-- 2 files changed, 16 insertions(+), 13 deletions(-) diff --git a/package-lock.json b/package-lock.json index 0d60ba6..5da93b1 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "iohook", - "version": "1.0.18", + "version": "1.0.24", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "iohook", - "version": "1.0.18", + "version": "1.0.24", "hasInstallScript": true, "license": "MIT", "dependencies": { @@ -28,8 +28,8 @@ "jest": "^26.6.3", "lint-staged": "^11.0.0", "minimist": "^1.2.5", - "nan": "^2.15.0", - "node-abi": "^3.54.0", + "nan": "^2.22.0", + "node-abi": "^3.71.0", "node-gyp": "^9.4.0", "prebuild": "^11.0.4", "prettier": "^2.3.1", @@ -14968,10 +14968,11 @@ "dev": true }, "node_modules/nan": { - "version": "2.18.0", - "resolved": "https://registry.npmjs.org/nan/-/nan-2.18.0.tgz", - "integrity": "sha512-W7tfG7vMOGtD30sHoZSSc/JVYiyDPEyQVso/Zz+/uQd0B0L46gtC+pHha5FFMRpil6fm/AoEcRWyOVi4+E/f8w==", - "dev": true + "version": "2.22.0", + "resolved": "https://registry.npmjs.org/nan/-/nan-2.22.0.tgz", + "integrity": "sha512-nbajikzWTMwsW+eSsNm3QwlOs7het9gGJU5dDZzRTQGk03vyBOauxgI4VakDzE0PtsGTmXPsXTbbjVhRwR5mpw==", + "dev": true, + "license": "MIT" }, "node_modules/nanoid": { "version": "3.3.7", @@ -15113,10 +15114,11 @@ } }, "node_modules/node-abi": { - "version": "3.54.0", - "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.54.0.tgz", - "integrity": "sha512-p7eGEiQil0YUV3ItH4/tBb781L5impVmmx2E9FRKF7d18XXzp4PGT2tdYMFY6wQqgxD0IwNZOiSJ0/K0fSi/OA==", + "version": "3.71.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.71.0.tgz", + "integrity": "sha512-SZ40vRiy/+wRTf21hxkkEjPJZpARzUMVcJoQse2EF8qkUWbbO2z7vd5oA/H6bVH6SZQ5STGcu0KRDS7biNRfxw==", "dev": true, + "license": "MIT", "dependencies": { "semver": "^7.3.5" }, diff --git a/package.json b/package.json index 3ece7a0..bb3fbf8 100644 --- a/package.json +++ b/package.json @@ -25,7 +25,8 @@ "docs:dev": "vuepress dev docs", "docs:build": "vuepress build docs", "docs:deploy": "npm run docs:build && gh-pages -d docs/.vuepress/dist/", - "release": "git add . && git commit -am 'version bump' && git tag v$(node -p \"require('./package.json').version\") && git push --tags" + "release": "git add . && git commit -am 'version bump' && git tag v$(node -p \"require('./package.json').version\") && git push --tags", + "postinstall": "sed 's/^#include .nan_scriptorigin\\.h./\\/\\/ #include nan_scriptorigin.h/' ./node_modules/nan/nan.h > ./node_modules/nan/nan.h.new && mv ./node_modules/nan/nan.h.new ./node_modules/nan/nan.h" }, "keywords": [ "hook", @@ -80,7 +81,7 @@ "jest": "^26.6.3", "lint-staged": "^11.0.0", "minimist": "^1.2.5", - "nan": "^2.15.0", + "nan": "^2.22.0", "node-abi": "^3.71.0", "node-gyp": "^9.4.0", "prebuild": "^11.0.4",