This is an automated email from the ASF dual-hosted git repository.

dengliming pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/shenyu-dashboard.git


The following commit(s) were added to refs/heads/master by this push:
     new b2586eac Raise minimum Node.js to 22 LTS and modernise the CI 
workflows (#721)
b2586eac is described below

commit b2586eac8ef16e5ceb2e0995554eaa49c5c40828
Author: Mario Del Corvo <[email protected]>
AuthorDate: Fri Oct 16 07:45:50 2026 +0200

    Raise minimum Node.js to 22 LTS and modernise the CI workflows (#721)
    
    Node 18 and 20 are both end-of-life, while package.json still declared
    "node": ">=8.0.0" and the workflows pinned Node 16/20 on deprecated action
    versions.
    
    - package.json: engines.node >= 22.12.0, the floor commander@15 requires
    - .nvmrc: 22
    - README: Node 22 LTS or newer, 24 recommended
    - build.yml: matrix [22.x, 24.x], checkout@v4, setup-node@v4 with npm cache
    - deploy.yml: checkout@v4, setup-node@v4, build on Node 24
    - sync-to-main.yml: build on Node 24 instead of 16
    
    Two details the matrix change would otherwise have broken silently:
    
    - the lint step was gated on matrix.node-version == '20.x' and would have
      stopped running; it now runs on 22.x
    - the coverage artifact had a fixed name, which actions/upload-artifact@v4
      rejects when two matrix jobs upload it; the name now carries the version
    
    Verified locally on Node v24.21.0 (Windows): npm ci, npm run build (compiled
    successfully with no NODE_OPTIONS), npm run test:coverage (56 suites / 281
    tests) and npm run lint all pass.
---
 .github/workflows/build.yml        | 11 ++++++-----
 .github/workflows/deploy.yml       |  6 +++---
 .github/workflows/sync-to-main.yml |  2 +-
 .nvmrc                             |  2 +-
 README.md                          |  2 +-
 package.json                       |  2 +-
 6 files changed, 13 insertions(+), 12 deletions(-)

diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml
index 24ce7d7b..0fe4534a 100644
--- a/.github/workflows/build.yml
+++ b/.github/workflows/build.yml
@@ -13,13 +13,14 @@ jobs:
     runs-on: ubuntu-latest
     strategy:
       matrix:
-        node-version: [20.x]
+        node-version: [22.x, 24.x]
     steps:
-      - uses: actions/checkout@v2
+      - uses: actions/checkout@v4
       - name: Use Node.js ${{ matrix.node-version }}
-        uses: actions/setup-node@v1
+        uses: actions/setup-node@v4
         with:
           node-version: ${{ matrix.node-version }}
+          cache: npm
       - run: npm ci
       - name: Unit tests and coverage
         run: npm run test:coverage
@@ -27,9 +28,9 @@ jobs:
         if: ${{ !cancelled() }}
         uses: actions/upload-artifact@v4
         with:
-          name: unit-test-coverage
+          name: unit-test-coverage-${{ matrix.node-version }}
           path: coverage/
           retention-days: 7
       - run: npm run lint
-        if: matrix.node-version == '20.x'
+        if: matrix.node-version == '22.x'
       - run: npm run build --if-present
diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml
index 8206bab8..38e36c19 100644
--- a/.github/workflows/deploy.yml
+++ b/.github/workflows/deploy.yml
@@ -13,14 +13,14 @@ jobs:
     steps:
       -
         name: Checkout Code
-        uses: actions/checkout@v2
+        uses: actions/checkout@v4
         with:
           submodules: recursive
       -
         name: Setup Node
-        uses: actions/[email protected]
+        uses: actions/setup-node@v4
         with:
-          node-version: "20"
+          node-version: "24"
       -
         name: Setup Dependencies
         run: npm ci
diff --git a/.github/workflows/sync-to-main.yml 
b/.github/workflows/sync-to-main.yml
index f1c07860..59c0cfb4 100644
--- a/.github/workflows/sync-to-main.yml
+++ b/.github/workflows/sync-to-main.yml
@@ -20,7 +20,7 @@ jobs:
       - name: Setup Node.js
         uses: actions/setup-node@v4
         with:
-          node-version: '16'
+          node-version: '24'
           cache: 'npm'
           cache-dependency-path: 'package-lock.json'
 
diff --git a/.nvmrc b/.nvmrc
index 209e3ef4..2bd5a0a9 100644
--- a/.nvmrc
+++ b/.nvmrc
@@ -1 +1 @@
-20
+22
diff --git a/README.md b/README.md
index b3bc4e14..1ed3ad63 100644
--- a/README.md
+++ b/README.md
@@ -8,7 +8,7 @@
 Apache ShenYu Dashboard is frontend of a management background for [Apache 
ShenYu](https://github.com/apache/shenyu). The API interface is in the [Apache 
Shenyu Admin](https://github.com/apache/shenyu/tree/master/shenyu-admin) module.
                                                                                
                    
 ## Prerequisite
-- Node.js 20.x and npm 10.x (the test and build CI baseline). Run `nvm use`
+- Node.js 22 LTS or newer (24 recommended; CI builds on both). Run `nvm use`
   if you manage Node.js with nvm; the version is recorded in `.nvmrc`.
 
 ## How to Build
diff --git a/package.json b/package.json
index fb53077c..49388329 100644
--- a/package.json
+++ b/package.json
@@ -102,7 +102,7 @@
     "**/*.less": "stylelint --syntax less"
   },
   "engines": {
-    "node": ">=8.0.0"
+    "node": ">=22.12.0"
   },
   "browserslist": [
     "> 1%",

Reply via email to