Skip to content

Commit

Permalink
Update to node v20 for ZAP (#1419)
Browse files Browse the repository at this point in the history
* Update to node v20 for ZAP
- Update all workflows to use node v20
- Update documentation about using node v20
- JIRA: ZAPP-1494

* Minor cleanup
  • Loading branch information
brdandu committed Sep 6, 2024
1 parent 6f8c18a commit 5cb3169
Show file tree
Hide file tree
Showing 7 changed files with 13 additions and 13 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/matter.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-22.04]

steps:
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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:
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-22.04]

steps:
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
runs-on: ${{ matrix.os }}
strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-22.04]

steps:
Expand Down Expand Up @@ -81,7 +81,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-22.04]

steps:
Expand Down Expand Up @@ -120,7 +120,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-22.04]

steps:
Expand Down Expand Up @@ -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
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/unify.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-22.04]

steps:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/zigbee.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ jobs:

strategy:
matrix:
node-version: [18.x]
node-version: [20.x]
os: [ubuntu-22.04]

steps:
Expand Down
2 changes: 1 addition & 1 deletion docs/ZAP-on-Windows.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
2 changes: 1 addition & 1 deletion docs/development-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -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, 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:

Expand Down
2 changes: 1 addition & 1 deletion src-electron/util/env.js
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down

0 comments on commit 5cb3169

Please sign in to comment.