From eebd207df7c62ca1b7167303f2641022ced4fb64 Mon Sep 17 00:00:00 2001 From: Scott M Anderson Date: Thu, 6 Aug 2026 22:20:50 -0600 Subject: [PATCH 1/6] cmakeup: CMake updates, remove XP_NAMESPACE - Update minimum CMake version from 3.31 to 4.3 - Remove XP_NAMESPACE and xproinc.cmake inclusion (now part of CMakePresets) - Package name and Target Namespace now match - Make xpExternPackage conditional 'if(COMMAND' and move to end of CMakeLists.txt - Auto-infer dependencies (nodexp) - Add CMAKE_EXPERIMENTAL_GENERATE_SBOM in presets --- CMakeLists.txt | 35 +++++++++++++++++------------------ CMakePresetsBase.json | 2 +- 2 files changed, 18 insertions(+), 19 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index bf3370dee..b455bdc73 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -1,21 +1,5 @@ -cmake_minimum_required(VERSION 3.31) -set(CMAKE_PROJECT_TOP_LEVEL_INCLUDES .devcontainer/cmake/xproinc.cmake) +cmake_minimum_required(VERSION 4.3) project(node-addon-api VERSION 8.5.0) -set(targetsFile ${PROJECT_NAME}-targets) -set(lib_name ${PROJECT_NAME}) -xpFindPkg(PKGS nodexp) -if(DEFINED XP_NAMESPACE) - xpExternPackage(NAMESPACE ${XP_NAMESPACE} - TARGETS_FILE ${targetsFile} LIBRARIES ${lib_name} - BASE v${CMAKE_PROJECT_VERSION} XPDIFF "intro" DEPS nodexp - WEB "https://github.com/nodejs/node-addon-api" UPSTREAM "github.com/nodejs/node-addon-api" - DESC "Module for using N-API from C++" - LICENSE "[MIT](https://github.com/nodejs/node-addon-api/blob/v8.5.0/LICENSE.md 'MIT License')" - ) - set(nameSpace NAMESPACE ${XP_NAMESPACE}::) -elseif(NOT DEFINED CMAKE_INSTALL_CMAKEDIR) - set(CMAKE_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) -endif() ######################################## set(libsrcs napi-inl.deprecated.h @@ -23,13 +7,28 @@ set(libsrcs napi.h ) ######################################## +set(lib_name ${PROJECT_NAME}) add_library(${lib_name} INTERFACE ${libsrcs}) target_include_directories(${lib_name} INTERFACE $) target_compile_definitions(${lib_name} INTERFACE NODE_ADDON_API_DISABLE_DEPRECATED NAPI_CPP_EXCEPTIONS) +find_package(nodexp REQUIRED) target_link_libraries(${lib_name} INTERFACE ${NODEXP_LIBRARIES}) ######################################## +set(targetsFile ${PROJECT_NAME}-targets) +if(COMMAND xpExternPackage) + xpExternPackage(TARGETS_FILE ${targetsFile} + LIBRARIES ${lib_name} DEFAULT_TARGETS ${lib_name} + BASE v${CMAKE_PROJECT_VERSION} XPDIFF "intro" + WEB "https://github.com/nodejs/node-addon-api" UPSTREAM "github.com/nodejs/node-addon-api" + DESC "Module for using N-API from C++" + LICENSE "[MIT](https://github.com/nodejs/node-addon-api/blob/v8.5.0/LICENSE.md 'MIT License')" + ) +elseif(NOT DEFINED CMAKE_INSTALL_CMAKEDIR) + set(CMAKE_INSTALL_CMAKEDIR ${CMAKE_INSTALL_LIBDIR}/cmake/${PROJECT_NAME}) +endif() +######################################## install(TARGETS ${lib_name} EXPORT ${targetsFile}) install(FILES ${libsrcs} DESTINATION ${CMAKE_INSTALL_INCLUDEDIR}/${PROJECT_NAME}) -install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} ${nameSpace}) +install(EXPORT ${targetsFile} DESTINATION ${CMAKE_INSTALL_CMAKEDIR} NAMESPACE ${PROJECT_NAME}::) install(FILES CHANGELOG.md LICENSE.md README.md DESTINATION ${CMAKE_INSTALL_DATADIR}) install(DIRECTORY doc DESTINATION ${CMAKE_INSTALL_DATADIR}) diff --git a/CMakePresetsBase.json b/CMakePresetsBase.json index 4489d79c3..c54ade998 100644 --- a/CMakePresetsBase.json +++ b/CMakePresetsBase.json @@ -6,7 +6,7 @@ "hidden": true, "binaryDir": "${sourceDir}/_bld-${presetName}", "cacheVariables": { - "XP_NAMESPACE": "xpro" + "CMAKE_EXPERIMENTAL_GENERATE_SBOM": "ca494ed3-b261-4205-a01f-603c95e4cae0" } } ], From 60a3e6dacae908f18e6d9e1aaf8b13bd072b7c76 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Aug 2026 04:27:30 +0000 Subject: [PATCH 2/6] externpro 26.01.4-13-g85a4aeb --- .devcontainer | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.devcontainer b/.devcontainer index 42cddb26e..85a4aeb52 160000 --- a/.devcontainer +++ b/.devcontainer @@ -1 +1 @@ -Subproject commit 42cddb26ef9a3cb34ab943beebc56719253f03eb +Subproject commit 85a4aeb52826b1666e1ee1e2b24a5ff104e87583 From 8a65da8e12d4d51ac2a6fde15dbf76008b580f69 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Aug 2026 04:27:30 +0000 Subject: [PATCH 3/6] sync GitHub Actions workflows --- .github/workflows/xpbuild.yml | 19 ++++++++++--------- .github/workflows/xprelease.yml | 2 +- .github/workflows/xptag.yml | 4 ++-- 3 files changed, 13 insertions(+), 12 deletions(-) diff --git a/.github/workflows/xpbuild.yml b/.github/workflows/xpbuild.yml index fd31fce02..6478b7825 100644 --- a/.github/workflows/xpbuild.yml +++ b/.github/workflows/xpbuild.yml @@ -14,17 +14,18 @@ jobs: contents: read pull-requests: write packages: write - uses: externpro/externpro/.github/workflows/build-linux.yml@25.07.6 + uses: externpro/externpro/.github/workflows/build-linux.yml@26.01.4 + secrets: + automation_token: ${{ secrets.GHCR_TOKEN }} with: - cmake-workflow-preset: LinuxRelease - secrets: inherit + cmake_workflow_preset_suffix: Release macos: - uses: externpro/externpro/.github/workflows/build-macos.yml@25.07.6 - with: - cmake-workflow-preset: DarwinRelease + uses: externpro/externpro/.github/workflows/build-macos.yml@26.01.4 secrets: inherit - windows: - uses: externpro/externpro/.github/workflows/build-windows.yml@25.07.6 with: - cmake-workflow-preset: WindowsRelease + cmake_workflow_preset_suffix: Release + windows: + uses: externpro/externpro/.github/workflows/build-windows.yml@26.01.4 secrets: inherit + with: + cmake_workflow_preset_suffix: Release diff --git a/.github/workflows/xprelease.yml b/.github/workflows/xprelease.yml index a2eb28224..bce26740a 100644 --- a/.github/workflows/xprelease.yml +++ b/.github/workflows/xprelease.yml @@ -34,7 +34,7 @@ jobs: # Upload build artifacts as release assets release-from-build: if: github.event_name == 'workflow_dispatch' - uses: externpro/externpro/.github/workflows/release-from-build.yml@25.07.6 + uses: externpro/externpro/.github/workflows/release-from-build.yml@26.01.4 with: workflow_run_url: ${{ github.event.inputs.workflow_run_url }} permissions: diff --git a/.github/workflows/xptag.yml b/.github/workflows/xptag.yml index b5ce9503a..dcd402107 100644 --- a/.github/workflows/xptag.yml +++ b/.github/workflows/xptag.yml @@ -8,9 +8,9 @@ on: jobs: tag: if: ${{ github.event.pull_request.merged == true && github.event.pull_request.base.ref == 'xpro' && contains(github.event.pull_request.labels.*.name, 'release:tag') }} - uses: externpro/externpro/.github/workflows/tag-release.yml@25.07.6 + uses: externpro/externpro/.github/workflows/tag-release.yml@26.01.4 with: merge_sha: ${{ github.event.pull_request.merge_commit_sha }} pr_number: ${{ github.event.pull_request.number }} secrets: - workflow_write_token: ${{ secrets.XPUPDATE_TOKEN }} + automation_token: ${{ secrets.XPRO_TOKEN }} From 1b63bb3663a9864104e8aad91c63845eb286458e Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Aug 2026 04:27:30 +0000 Subject: [PATCH 4/6] update .github/release-tag.json --- .github/release-tag.json | 4 ++++ 1 file changed, 4 insertions(+) create mode 100644 .github/release-tag.json diff --git a/.github/release-tag.json b/.github/release-tag.json new file mode 100644 index 000000000..0afc7d02a --- /dev/null +++ b/.github/release-tag.json @@ -0,0 +1,4 @@ +{ + "message": "xpro version 8.5.0.4 tag", + "tag": "xpv8.5.0.4" +} From 4ca260e6c804cad0f347d5a40eef4e0fb180959c Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Aug 2026 04:27:30 +0000 Subject: [PATCH 5/6] dependency updates --- xprodeps.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/xprodeps.md b/xprodeps.md index 32756f450..a2cc323dc 100644 --- a/xprodeps.md +++ b/xprodeps.md @@ -3,7 +3,7 @@ |project|license [^_l]|description [dependencies]|version|source|diff [^_d]| |-------|-------------|--------------------------|-------|------|----------| |[node-addon-api](https://github.com/nodejs/node-addon-api)|[MIT](https://github.com/nodejs/node-addon-api/blob/v8.5.0/LICENSE.md 'MIT License')|Module for using N-API from C++ [deps: _nodexp_]| |[upstream](https://github.com/nodejs/node-addon-api 'github.com/nodejs/node-addon-api')| [intro]| -|[nodexp](https://nodejs.org/en/blog/release/v22.19.0/)|[MIT](https://raw.githubusercontent.com/nodejs/node/v22.19.0/LICENSE 'MIT License')|node/npm development platform and runtime executable bundled as externpro devel package to build addons|[xpv22.19.0.3](https://github.com/externpro/nodexp/releases/tag/xpv22.19.0.3 'release')|[repo](https://github.com/externpro/nodexp 'github.com/externpro/nodexp')|[diff](https://github.com/externpro/nodexp/compare/v0...xpv22.19.0.3 'github.com/externpro/nodexp/compare/v0...xpv22.19.0.3') [bin]| +|[nodexp](https://nodejs.org/en/blog/release/v22.19.0/)|[MIT](https://raw.githubusercontent.com/nodejs/node/v22.19.0/LICENSE 'MIT License')|node/npm development platform and runtime executable bundled as externpro devel package to build addons|[xpv22.19.0.4](https://github.com/externpro/nodexp/releases/tag/xpv22.19.0.4 'release')|[repo](https://github.com/externpro/nodexp 'github.com/externpro/nodexp')|[diff](https://github.com/externpro/nodexp/compare/v0...xpv22.19.0.4 'github.com/externpro/nodexp/compare/v0...xpv22.19.0.4') [bin]| ![deps](xprodeps.svg 'dependencies') From 907a67e210a26f3d16cb5ae4016ab72ef4546c24 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Fri, 7 Aug 2026 04:27:30 +0000 Subject: [PATCH 6/6] externpro 26.01.4-13-g85a4aeb updates --- .github/release-tag.yml | 2 -- CMakePresets.json | 3 ++- 2 files changed, 2 insertions(+), 3 deletions(-) delete mode 100644 .github/release-tag.yml diff --git a/.github/release-tag.yml b/.github/release-tag.yml deleted file mode 100644 index 7427eefbc..000000000 --- a/.github/release-tag.yml +++ /dev/null @@ -1,2 +0,0 @@ -tag: xpv8.5.0.3 -message: "xpro version 8.5.0.3 tag" diff --git a/CMakePresets.json b/CMakePresets.json index f82cfdd2c..28efa3978 100644 --- a/CMakePresets.json +++ b/CMakePresets.json @@ -3,6 +3,7 @@ "include": [ ".devcontainer/cmake/presets/xpLinuxNinja.json", ".devcontainer/cmake/presets/xpDarwinNinja.json", - ".devcontainer/cmake/presets/xpWindowsVs2022.json" + ".devcontainer/cmake/presets/xpMswVs2022.json", + ".devcontainer/cmake/presets/xpMswVs2026.json" ] }