From 5267070756331d366f8f18401cafd075c6143a76 Mon Sep 17 00:00:00 2001 From: Bharat Dandu Date: Thu, 5 Sep 2024 16:39:46 -0400 Subject: [PATCH 1/2] Update to node v20 for ZAP - Update all workflows to use node v20 - Update documentation about using node v20 - JIRA: ZAPP-1494 --- .github/workflows/matter.yml | 6 +++--- .github/workflows/release.yml | 10 +++++----- .github/workflows/unify.yml | 2 +- .github/workflows/zigbee.yml | 2 +- docs/ZAP-on-Windows.md | 2 +- docs/development-instructions.md | 2 +- src-electron/util/env.js | 2 +- 7 files changed, 13 insertions(+), 13 deletions(-) diff --git a/.github/workflows/matter.yml b/.github/workflows/matter.yml index a747febc9d..3160a465f7 100644 --- a/.github/workflows/matter.yml +++ b/.github/workflows/matter.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-22.04] steps: @@ -67,7 +67,7 @@ jobs: - name: Install Node.js, NPM and Yarn uses: actions/setup-node@v3.0.0 with: - node-version: 18.x + node-version: 20.x cache: 'npm' - name: Prepare Linux build environment @@ -188,7 +188,7 @@ jobs: runs-on: ubuntu-22.04 strategy: matrix: - node-version: [18.x] + node-version: [20.x] # CHIP container required because clang-format version needs to match container: diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index f8122adc21..c441dbb444 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-22.04] steps: @@ -52,7 +52,7 @@ jobs: runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-22.04] steps: @@ -81,7 +81,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-22.04] steps: @@ -120,7 +120,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-22.04] steps: @@ -158,7 +158,7 @@ jobs: - name: Install Node.js, NPM and Yarn uses: actions/setup-node@v3.0.0 with: - node-version: 18.x + node-version: 20.x cache: 'npm' - name: pip run: pip install setuptools diff --git a/.github/workflows/unify.yml b/.github/workflows/unify.yml index f2a00d98b8..8d065791d0 100644 --- a/.github/workflows/unify.yml +++ b/.github/workflows/unify.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-22.04] steps: diff --git a/.github/workflows/zigbee.yml b/.github/workflows/zigbee.yml index 2a1da3f94a..ac3cdc1edd 100644 --- a/.github/workflows/zigbee.yml +++ b/.github/workflows/zigbee.yml @@ -24,7 +24,7 @@ jobs: strategy: matrix: - node-version: [18.x] + node-version: [20.x] os: [ubuntu-22.04] steps: diff --git a/docs/ZAP-on-Windows.md b/docs/ZAP-on-Windows.md index 1f1bbca51f..bf03db2e61 100644 --- a/docs/ZAP-on-Windows.md +++ b/docs/ZAP-on-Windows.md @@ -82,6 +82,6 @@ npm run build ### 4. Other -Check if node version is v18, and try to install it with Chocolatey +Check if node version is v20, and try to install it with Chocolatey Also, you can check the faq doc for other known issues: https://github.com/project-chip/zap/blob/master/docs/faq.md diff --git a/docs/development-instructions.md b/docs/development-instructions.md index 681d8b641a..6e0683b527 100644 --- a/docs/development-instructions.md +++ b/docs/development-instructions.md @@ -2,7 +2,7 @@ This section lists instructions for various things you might need to do in this repo. -This is a node.js application, so you need node environment installed. The best way is to simply download latest install of [node](https://nodejs.org/en/download/) and you will get node and npm. If you have an older version of node installed on your workstation, it may give you trouble, particularly if it's very old. So make sure you have latest node v16.x version, with the npm that comes with it available. Run `node --version` to check what version is picked up. v18.x is recommended. +This is a node.js application, so you need node environment installed. The best way is to simply download latest install of [node](https://nodejs.org/en/download/) and you will get node and npm. If you have an older version of node installed on your workstation, it may give you trouble, particularly if it's very old. So make sure you have latest node v16.x or v18.x version, with the npm that comes with it available. Run `node --version` to check what version is picked up. v20.x is recommended. Once you have a desired version of node, you can run: diff --git a/src-electron/util/env.js b/src-electron/util/env.js index d3443d4971..83a9de52ef 100644 --- a/src-electron/util/env.js +++ b/src-electron/util/env.js @@ -556,7 +556,7 @@ export function isMatchingVersion(versionsArray, providedVersion) { * @returns true or false, depending on match */ export function versionsCheck() { - let expectedNodeVersion = ['v14.x.x', 'v16.x.x', 'v18.x.x'] + let expectedNodeVersion = ['v14.x.x', 'v16.x.x', 'v18.x.x', 'v20.x.x'] let expectedElectronVersion = [ '17.4.x', '18.x.x', From b6030c076d27c23788408beac6a6781b45cbe83a Mon Sep 17 00:00:00 2001 From: Bharat Dandu Date: Fri, 6 Sep 2024 10:18:15 -0400 Subject: [PATCH 2/2] Minor cleanup --- docs/development-instructions.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/development-instructions.md b/docs/development-instructions.md index 6e0683b527..82354dbdfa 100644 --- a/docs/development-instructions.md +++ b/docs/development-instructions.md @@ -2,7 +2,7 @@ This section lists instructions for various things you might need to do in this repo. -This is a node.js application, so you need node environment installed. The best way is to simply download latest install of [node](https://nodejs.org/en/download/) and you will get node and npm. If you have an older version of node installed on your workstation, it may give you trouble, particularly if it's very old. So make sure you have latest node v16.x or v18.x version, with the npm that comes with it available. Run `node --version` to check what version is picked up. v20.x is recommended. +This is a node.js application, so you need node environment installed. The best way is to simply download latest install of [node](https://nodejs.org/en/download/) and you will get node and npm. If you have an older version of node installed on your workstation, it may give you trouble, particularly if it's very old. So make sure you have latest node v16.x, v18.x or v20.x version, with the npm that comes with it available. Run `node --version` to check what version is picked up. v20.x is recommended. Once you have a desired version of node, you can run: