diff --git a/.github/workflows/build.yml b/.github/workflows/build.yml index 24ce7d7b3..0fe4534a7 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 8206bab8e..38e36c19c 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/setup-node@v2.4.0 + 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 f1c07860b..59c0cfb46 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 209e3ef4b..2bd5a0a98 100644 --- a/.nvmrc +++ b/.nvmrc @@ -1 +1 @@ -20 +22 diff --git a/README.md b/README.md index b3bc4e14f..1ed3ad63f 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 fb53077c4..493883298 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%",