From 0bb9b5ff4241f53ddc127b66b26e56f9af224b8b Mon Sep 17 00:00:00 2001 From: Karsten Hassel Date: Mon, 6 Jul 2026 23:06:06 +0200 Subject: [PATCH] add test if install works for minimal node version (#4197) and update minimal node version to `v22.22.2` Background: The latest release requires node `v22.22.2` because this version is required by a dev dependency, see https://forum.magicmirror.builders/post/131522 I added a new test for this (I didn't want to add another version to the test matrix ...) so that we see needed minimum node version upgrades earlier on develop (and not after release). --- .github/workflows/automated-tests.yaml | 19 +++++++++++++++++++ package-lock.json | 2 +- package.json | 2 +- 3 files changed, 21 insertions(+), 2 deletions(-) diff --git a/.github/workflows/automated-tests.yaml b/.github/workflows/automated-tests.yaml index dd01a36a..d77e964a 100644 --- a/.github/workflows/automated-tests.yaml +++ b/.github/workflows/automated-tests.yaml @@ -34,6 +34,25 @@ jobs: - name: "Run linter tests" run: | node --run test:lint + min-node-version-install: + runs-on: ubuntu-slim + timeout-minutes: 15 + steps: + - name: "Checkout code" + uses: actions/checkout@v7 + - name: "Get minimum node version" + id: get-version + run: | + NODE_VERSION="$(cat package.json | sed -rn 's|.*"node": ">=([0-9]+\.[0-9]+\.[0-9]+).*|\1|p')" + echo "Minimal node version is $NODE_VERSION" + echo "version=$NODE_VERSION" >> $GITHUB_OUTPUT + - name: Set up Node.js + uses: actions/setup-node@v6 + with: + node-version: ${{ steps.get-version.outputs.version }} + - name: "Install dependencies" + run: | + node --run install-mm:dev test: runs-on: ubuntu-24.04 timeout-minutes: 30 diff --git a/package-lock.json b/package-lock.json index 1a3fe4ce..b49066c8 100644 --- a/package-lock.json +++ b/package-lock.json @@ -58,7 +58,7 @@ "vitest": "^4.1.9" }, "engines": { - "node": ">=22.21.1 <23 || >=24" + "node": ">=22.22.2 <23 || >=24" }, "optionalDependencies": { "electron": "^43.0.0" diff --git a/package.json b/package.json index 6ff55ae7..48d821d0 100644 --- a/package.json +++ b/package.json @@ -132,6 +132,6 @@ "electron": "^43.0.0" }, "engines": { - "node": ">=22.21.1 <23 || >=24" + "node": ">=22.22.2 <23 || >=24" } }