From 67e1d554f10f8696e73651a8e67baf8a77206f37 Mon Sep 17 00:00:00 2001 From: Anna Sas Date: Wed, 16 Sep 2026 09:45:33 +0200 Subject: [PATCH 1/2] Require Node.js 24.15+ for frontend builds This change enforces a minimum Node.js 24.15.0 requirement for frontend builds by checking the runtime in the JS build script and declaring the engine requirement in package metadata. It also improves the NativeBridge CMake failure message to guide users to restore NuGet dependencies before configuring, and updates the docs to mention the Node.js requirement and the WebView2 restore step. --- README.md | 2 +- scripts/js-buildfrontend.mjs | 6 ++++++ src/InfiniFrame.Js/package-lock.json | 3 +++ src/InfiniFrame.Js/package.json | 3 +++ .../Native/.cmake/NativeDependencies.cmake | 5 ++++- src/InfiniFrame.NativeBridge/Native/README.md | 8 ++++++++ 6 files changed, 25 insertions(+), 2 deletions(-) diff --git a/README.md b/README.md index 62f93b7b3..23f147a2e 100644 --- a/README.md +++ b/README.md @@ -171,7 +171,7 @@ dotnet publish src/MyApp/MyApp.csproj -t:InfiniFrameSingleFile -r win-x64 -c Rel Requirements: -- `Node.js`/`npm` (required) +- `Node.js` 24.15+ and `npm` Run: diff --git a/scripts/js-buildfrontend.mjs b/scripts/js-buildfrontend.mjs index 2ac010909..01e2daf19 100644 --- a/scripts/js-buildfrontend.mjs +++ b/scripts/js-buildfrontend.mjs @@ -32,6 +32,12 @@ if (!appDirectoryArg || !stampFileArg || outputFileArgs.length === 0) { process.exit(1); } +const [nodeMajor, nodeMinor, nodePatch] = process.versions.node.split('.').map(Number); +if (nodeMajor < 24 || (nodeMajor === 24 && (nodeMinor < 15 || (nodeMinor === 15 && nodePatch < 0)))) { + console.error(`InfiniFrame frontend builds require Node.js 24.15.0 or newer; found ${process.versions.node}.`); + process.exit(1); +} + const appDirectory = path.resolve(appDirectoryArg); const stampFile = path.resolve(stampFileArg); const outputFiles = outputFileArgs.map(outputFileArg => path.resolve(outputFileArg)); diff --git a/src/InfiniFrame.Js/package-lock.json b/src/InfiniFrame.Js/package-lock.json index c7fc2707f..f5a5af422 100644 --- a/src/InfiniFrame.Js/package-lock.json +++ b/src/InfiniFrame.Js/package-lock.json @@ -8,6 +8,9 @@ "name": "infinilore.infiniframe.js-build", "version": "0.1.0", "license": "GNUv3", + "engines": { + "node": ">=24.15.0" + }, "devDependencies": { "@types/node": "^26.2.0", "@vitest/coverage-v8": "^4.1.11", diff --git a/src/InfiniFrame.Js/package.json b/src/InfiniFrame.Js/package.json index 438c0c86f..07703d88c 100644 --- a/src/InfiniFrame.Js/package.json +++ b/src/InfiniFrame.Js/package.json @@ -5,6 +5,9 @@ "author": "InfiniLore", "license": "Apache-2.0", "keywords": ["infiniframe", "blazor", "interop", "webview", "desktop"], + "engines": { + "node": ">=24.15.0" + }, "scripts": { "typecheck": "tsc --noEmit", "build": "npm run typecheck && vite build --config vite.config.prod.ts && vite build --config vite.config.dev.ts", diff --git a/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake b/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake index 7c49a77a6..4db732dd8 100644 --- a/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake +++ b/src/InfiniFrame.NativeBridge/Native/.cmake/NativeDependencies.cmake @@ -192,7 +192,10 @@ function(infiniframe_resolve_webview2_base_dir webview2_version out_var) endforeach () _infiniframe_resolve_base_dir(_base_dir "include/WebView2.h" ${_candidates}) if (NOT _base_dir) - message(FATAL_ERROR "WebView2 headers not found") + message(FATAL_ERROR + "WebView2 headers not found for version ${webview2_version}. " + "Run 'dotnet restore src/InfiniFrame.NativeBridge/InfiniFrame.NativeBridge.csproj' " + "before configuring CMake, or set NUGET_PACKAGES/INFINIFRAME_NUGET_PACKAGES_ROOT to the NuGet cache.") endif () set(${out_var} "${_base_dir}" PARENT_SCOPE) endfunction() diff --git a/src/InfiniFrame.NativeBridge/Native/README.md b/src/InfiniFrame.NativeBridge/Native/README.md index 896725ce6..9fabf5ef2 100644 --- a/src/InfiniFrame.NativeBridge/Native/README.md +++ b/src/InfiniFrame.NativeBridge/Native/README.md @@ -77,8 +77,16 @@ See [BUILDING.md](BUILDING.md) for build performance tips. - CMake 4.0+ - C++23 compiler (MSVC 17+ on Windows, GCC 13+ on Linux, Clang 17+ on macOS) +- Node.js 24.15+ and npm - Platform SDKs: WebView2 (Windows), WebKit2GTK 4.1 (Linux), macOS SDK (macOS) +On Windows, restore the NativeBridge project before configuring CMake. The C++ build consumes the WebView2 and WIL +headers from the NuGet global package cache: + +```powershell +dotnet restore src/InfiniFrame.NativeBridge/InfiniFrame.NativeBridge.csproj +``` + ### Build ```bash From 0150f84b9787537340e6b190033df34e5aee4d10 Mon Sep 17 00:00:00 2001 From: "github-actions[bot]" Date: Wed, 16 Sep 2026 08:14:13 +0000 Subject: [PATCH 2/2] ci: update coverage badges --- badges/python-coverage.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/badges/python-coverage.json b/badges/python-coverage.json index 68b92aeee..8853d2739 100644 --- a/badges/python-coverage.json +++ b/badges/python-coverage.json @@ -1,6 +1,6 @@ { "schemaVersion": 1, "label": "Python coverage", - "message": "88.8%", + "message": "87.2%", "color": "brightgreen" }