diff --git a/.github/workflows/test-dev.yml b/.github/workflows/test-dev.yml index 8481117..f8e70de 100644 --- a/.github/workflows/test-dev.yml +++ b/.github/workflows/test-dev.yml @@ -17,15 +17,9 @@ jobs: fail-fast: false matrix: platform: [ubuntu-20.04, ubuntu-22.04, ubuntu-24.04, macos-12, macos-14, windows-2019] - node-version: [16.x, 18.x, 20.x, 22.x] + node-version: [18.x, 20.x, 22.x] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] exclude: - - node-version: 16.x - platform: ubuntu-22.04 - - node-version: 16.x - platform: ubuntu-24.04 - - node-version: 16.x - python-version: 3.12 - platform: ubuntu-24.04 python-version: 3.8 @@ -51,7 +45,7 @@ jobs: strategy: matrix: platform: [ubuntu-20.04, macos-12, macos-14, windows-2019] - node-version: [16.x, 18.x, 20.x, 22.x] + node-version: [18.x, 20.x, 22.x] steps: - uses: actions/checkout@v4 diff --git a/.github/workflows/test-package.yml b/.github/workflows/test-package.yml index 875b477..5692c28 100644 --- a/.github/workflows/test-package.yml +++ b/.github/workflows/test-package.yml @@ -26,7 +26,7 @@ jobs: - macos-12 - macos-13 - macos-14 - node-version: [16.x, 18.x, 20.x, 22.x] + node-version: [18.x, 20.x, 22.x] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] exclude: - platform: ubuntu-24.04 diff --git a/.github/workflows/test-release.yml b/.github/workflows/test-release.yml index be81fb8..7547f64 100644 --- a/.github/workflows/test-release.yml +++ b/.github/workflows/test-release.yml @@ -24,7 +24,7 @@ jobs: - macos-12 - macos-13 - macos-14 - node-version: [16.x, 18.x, 20.x, 22.x] + node-version: [18.x, 20.x, 22.x] python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] exclude: - platform: ubuntu-24.04 diff --git a/CHANGELOG.md b/CHANGELOG.md index 4f72734..c6fa201 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -5,9 +5,10 @@ All notable changes to this project will be documented in this file. The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/), and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html). -### [1.6.0] +# [1.6.0] - macOS Apple Silicon prebuilt binaries - Tested with Node.js 22 + - Drop Node.js 16 support - Drop macOS 11 support - Fix (and test) all compression modules on all platforms - Recompiling the built-in Python now requires that `conan>=2.0.0` is installed diff --git a/binding.gyp b/binding.gyp index 1960034..5bcf8bb 100644 --- a/binding.gyp +++ b/binding.gyp @@ -50,8 +50,7 @@ ['OS == "win"', { 'msvs_settings': { 'VCCLCompilerTool': { - 'ExceptionHandling': 1, - 'AdditionalOptions': [' /std:c++14' ] + 'ExceptionHandling': 1 }, }, 'conditions': [ @@ -95,11 +94,9 @@ 'xcode_settings': { 'GCC_ENABLE_CPP_EXCEPTIONS': 'YES', 'CLANG_CXX_LIBRARY': 'libc++', - 'MACOSX_DEPLOYMENT_TARGET': '10.7', - 'OTHER_CPLUSPLUSFLAGS': [ '-std=c++14' ] + 'MACOSX_DEPLOYMENT_TARGET': '10.7' }, 'cflags': [ '-fvisibility=hidden '], - 'cflags_cc': [ '-std=c++14' ], 'cflags!': [ '-fno-exceptions' ], 'cflags_cc!': [ '-fno-exceptions' ], }] diff --git a/package-lock.json b/package-lock.json index baa5c3a..8d6dc16 100644 --- a/package-lock.json +++ b/package-lock.json @@ -5367,9 +5367,9 @@ } }, "node_modules/node-addon-api": { - "version": "8.1.0", - "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.1.0.tgz", - "integrity": "sha512-yBY+qqWSv3dWKGODD6OGE6GnTX7Q2r+4+DfpqxHSHh8x0B4EKP9+wVGLS6U/AM1vxSNNmUEuIV5EGhYwPpfOwQ==", + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/node-addon-api/-/node-addon-api-8.2.0.tgz", + "integrity": "sha512-qnyuI2ROiCkye42n9Tj5aX1ns7rzj6n7zW1XReSnLSL9v/vbLeR6fJq6PU27YU/ICfYw6W7Ouk/N7cysWu/hlw==", "engines": { "node": "^18 || ^20 || >= 21" } diff --git a/package.json b/package.json index c6fc586..834cfbb 100644 --- a/package.json +++ b/package.json @@ -88,7 +88,7 @@ "typescript": "^5.3.3" }, "engines": { - "node": ">= 16.0.0" + "node": ">= 18.0.0" }, "dependencies": { "@mapbox/node-pre-gyp": "^1.0.11", diff --git a/src/objstore.cc b/src/objstore.cc index 8624771..8b7e2d9 100644 --- a/src/objstore.cc +++ b/src/objstore.cc @@ -35,15 +35,7 @@ Value PyObjectWrap::New(Napi::Env env, PyStrongRef &&obj) { } VERBOSE_PYOBJ(OBJS, *obj, "Objstore insert"); - // This is a very ugly workaround for https://github.com/nodejs/node-addon-api/issues/1239 - napi_value ext = External::New(env, obj.gift()); - napi_value jsval; - napi_status r = napi_new_instance(env, context->pyObj->Value(), 1, &ext, &jsval); - if (r != napi_ok) { - napi_throw(env, Napi::Value()); - return Napi::Value(); - } - js = Napi::Value(env, jsval).ToObject(); + js = context->pyObj->New({External::New(env, obj.gift())}); auto result = ObjectWrap::Unwrap(js); context->object_store.insert({*result->self, result});