From ea97678fc4c9304eea7f3fb1ddc88eaf59cccc6f Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Fri, 14 Jun 2024 23:27:32 -0700 Subject: [PATCH 1/2] fix: update dependencies to the latest This PR updates the dependencies to the latest version. This makes it possible to use this package on the latest Nodejs version. --- .mocharc.js | 7 +++++++ .travis.yml | 11 +++++------ appveyor.yml | 6 +++--- package.json | 14 +++++++------- 4 files changed, 22 insertions(+), 16 deletions(-) create mode 100644 .mocharc.js diff --git a/.mocharc.js b/.mocharc.js new file mode 100644 index 0000000..df05896 --- /dev/null +++ b/.mocharc.js @@ -0,0 +1,7 @@ +"use strict" + +module.exports = { + spec: ["test/*.js"], + "v8-expose-gc": true, + recursive: true, +} diff --git a/.travis.yml b/.travis.yml index bf650a1..66867bf 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,7 +1,7 @@ sudo: false env: - - CXX=g++-4.9 + - CXX=g++ - CXX=clang++ addons: @@ -9,7 +9,7 @@ addons: sources: - ubuntu-toolchain-r-test packages: - - g++-4.9 + - g++ language: node_js @@ -20,19 +20,18 @@ os: osx_image: xcode10 node_js: - - "10" - "12" - - "14" + - "22" jobs: include: - os: linux arch: arm64 node_js: 12 - env: CXX=g++-4.9 + env: CXX=g++ exclude: - os: osx - env: CXX=g++-4.9 + env: CXX=g++ - os: linux env: CXX=clang++ diff --git a/appveyor.yml b/appveyor.yml index 2feb127..dd6e727 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -5,8 +5,8 @@ environment: # Test against these versions of Node.js and io.js matrix: # node.js - - nodejs_version: "10" - nodejs_version: "12" + - nodejs_version: "22" platform: - x86 @@ -33,7 +33,7 @@ after_test: - ps: If ($env:nodejs_version -eq "12") { npm run prebuild --v8_enable_pointer_compression=false --v8_enable_31bit_smis_on_64bit_arch=false } # Don't actually build. -build: off +build: false # Set build version format here instead of in the admin panel. version: "{build}" @@ -41,7 +41,7 @@ version: "{build}" artifacts: - path: prebuilds name: $(APPVEYOR_REPO_TAG_NAME)-win-$(PLATFORM) - type: zip + type: "Zip" deploy: - provider: GitHub diff --git a/package.json b/package.json index 813b8bd..66cebbc 100644 --- a/package.json +++ b/package.json @@ -24,20 +24,20 @@ }, "main": "lib/weak.js", "scripts": { - "test": "nyc mocha --expose-gc", + "test": "nyc mocha", "install": "node-gyp-build", "prebuild": "prebuildify --napi --tag-armv --tag-uv", "prepack": "prebuildify-ci download && ([ $(ls prebuilds | wc -l) = '5' ] || (echo 'Some prebuilds are missing'; exit 1))" }, "dependencies": { - "node-addon-api": "^3.0.0", - "node-gyp-build": "^4.2.1", - "setimmediate-napi": "^1.0.3" + "node-addon-api": "^8.0.0", + "node-gyp-build": "^4.8.1", + "setimmediate-napi": "^1.0.6" }, "devDependencies": { - "mocha": "^7.1.1", - "nyc": "^15.0.0", - "prebuildify": "^3.0.4", + "mocha": "^10.4.0", + "nyc": "^17.0.0", + "prebuildify": "^6.0.1", "prebuildify-ci": "^1.0.5" } } From c3bd18948575c534f8121ab297e209dd207958e6 Mon Sep 17 00:00:00 2001 From: Amin Yahyaabadi Date: Mon, 17 Jun 2024 13:39:08 -0700 Subject: [PATCH 2/2] ci: set llvm_version to 0.0 for AppVeyor --- appveyor.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/appveyor.yml b/appveyor.yml index dd6e727..d214905 100644 --- a/appveyor.yml +++ b/appveyor.yml @@ -6,7 +6,9 @@ environment: matrix: # node.js - nodejs_version: "12" + llvm_version: "0.0" - nodejs_version: "22" + llvm_version: "0.0" platform: - x86 @@ -16,9 +18,11 @@ platform: install: - python -V - set PYTHON=python + - ps: Install-Product node $env:nodejs_version $env:platform - node -p process.arch - node -p process.version + - npm install --build-from-source # Post-install test scripts.