Skip to content

Commit ac40ad6

Browse files
Jwaegebaertmartinlingstuyl
authored andcommitted
Switches to Node@22. Closes #6604
1 parent 4fc7075 commit ac40ad6

File tree

7 files changed

+48
-46
lines changed

7 files changed

+48
-46
lines changed

.github/workflows/check_pr.yml

+7-7
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ jobs:
99
strategy:
1010
matrix:
1111
os: [macos-latest, windows-latest, ubuntu-latest]
12-
node: [20]
12+
node: [22]
1313

1414
steps:
1515
- uses: actions/checkout@v4
@@ -49,16 +49,16 @@ jobs:
4949
matrix:
5050
os: [macos-latest, windows-latest, ubuntu-latest]
5151
# node versions to run tests on
52-
nodeRun: [20]
52+
nodeRun: [22]
5353
# node version on which code was built and should be tested
54-
nodeBuild: [20]
54+
nodeBuild: [22]
5555
include:
5656
- os: ubuntu-latest
5757
nodeRun: 18
58-
nodeBuild: 20
58+
nodeBuild: 22
5959
- os: ubuntu-latest
60-
nodeRun: 22
61-
nodeBuild: 20
60+
nodeRun: 20
61+
nodeBuild: 22
6262

6363
steps:
6464
- name: Configure pagefile
@@ -128,7 +128,7 @@ jobs:
128128
- uses: actions/checkout@v4
129129
- uses: actions/setup-node@v4
130130
with:
131-
node-version: 20
131+
node-version: 22
132132

133133
- name: Cache node modules
134134
id: cache

.github/workflows/release.yml

+12-12
Original file line numberDiff line numberDiff line change
@@ -14,18 +14,18 @@ jobs:
1414

1515
steps:
1616
- uses: actions/checkout@v4
17-
- name: Use Node.js 20
17+
- name: Use Node.js 22
1818
uses: actions/setup-node@v4
1919
with:
20-
node-version: 20
20+
node-version: 22
2121
registry-url: 'https://registry.npmjs.org'
2222
- name: Cache node modules
2323
id: cache
2424
uses: actions/cache@v4
2525
with:
2626
path: |
2727
**/node_modules
28-
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
28+
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
2929
- name: Restore dependencies
3030
if: steps.cache.outputs.cache-hit != 'true'
3131
run: npm ci
@@ -49,18 +49,18 @@ jobs:
4949
name: build
5050
- name: Unpack build artifact
5151
run: tar -xvf build.tar && rm build.tar
52-
- name: Use Node.js 20
52+
- name: Use Node.js 22
5353
uses: actions/setup-node@v4
5454
with:
55-
node-version: 20
55+
node-version: 22
5656
registry-url: 'https://registry.npmjs.org'
5757
- name: Cache node modules
5858
id: cache
5959
uses: actions/cache@v4
6060
with:
6161
path: |
6262
**/node_modules
63-
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
63+
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
6464
- name: Restore dependencies
6565
if: steps.cache.outputs.cache-hit != 'true'
6666
run: npm ci
@@ -91,7 +91,7 @@ jobs:
9191
- uses: actions/checkout@v4
9292
- uses: actions/setup-node@v4
9393
with:
94-
node-version: 20
94+
node-version: 22
9595

9696
- name: Cache node modules
9797
id: cache
@@ -123,18 +123,18 @@ jobs:
123123
name: build
124124
- name: Unpack build artifact
125125
run: tar -xvf build.tar && rm build.tar
126-
- name: Use Node.js 20
126+
- name: Use Node.js 22
127127
uses: actions/setup-node@v4
128128
with:
129-
node-version: 20
129+
node-version: 22
130130
registry-url: 'https://registry.npmjs.org'
131131
- name: Cache node modules
132132
id: cache
133133
uses: actions/cache@v4
134134
with:
135135
path: |
136136
**/node_modules
137-
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
137+
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
138138
- name: Restore dependencies
139139
if: steps.cache.outputs.cache-hit != 'true'
140140
run: npm ci
@@ -153,10 +153,10 @@ jobs:
153153
name: build
154154
- name: Unpack build artifact
155155
run: tar -xvf build.tar && rm build.tar
156-
- name: Use Node.js 20
156+
- name: Use Node.js 22
157157
uses: actions/setup-node@v4
158158
with:
159-
node-version: 20
159+
node-version: 22
160160
registry-url: 'https://registry.npmjs.org'
161161
- name: Set up QEMU
162162
uses: docker/setup-qemu-action@v3

.github/workflows/release_next.yml

+15-15
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ jobs:
1111
strategy:
1212
matrix:
1313
os: [macos-latest, windows-latest, ubuntu-latest]
14-
node: [20]
14+
node: [22]
1515

1616
steps:
1717
- uses: actions/checkout@v4
@@ -51,16 +51,16 @@ jobs:
5151
matrix:
5252
os: [macos-latest, windows-latest, ubuntu-latest]
5353
# node versions to run tests on
54-
nodeRun: [20]
54+
nodeRun: [22]
5555
# node version on which code was built and should be tested
56-
nodeBuild: [20]
56+
nodeBuild: [22]
5757
include:
5858
- os: ubuntu-latest
5959
nodeRun: 18
60-
nodeBuild: 20
60+
nodeBuild: 22
6161
- os: ubuntu-latest
62-
nodeRun: 22
63-
nodeBuild: 20
62+
nodeRun: 20
63+
nodeBuild: 22
6464

6565
steps:
6666
- name: Configure pagefile
@@ -133,7 +133,7 @@ jobs:
133133
fetch-depth: 0
134134
- uses: actions/setup-node@v4
135135
with:
136-
node-version: 20
136+
node-version: 22
137137

138138
- name: Cache node modules
139139
id: cache
@@ -167,21 +167,21 @@ jobs:
167167
steps:
168168
- uses: actions/download-artifact@v4
169169
with:
170-
name: build-ubuntu-latest-20
170+
name: build-ubuntu-latest-22
171171
- name: Unpack build artifact
172172
run: tar -xvf build.tar && rm build.tar
173-
- name: Use Node.js 20
173+
- name: Use Node.js 22
174174
uses: actions/setup-node@v4
175175
with:
176-
node-version: 20
176+
node-version: 22
177177
registry-url: 'https://registry.npmjs.org'
178178
- name: Cache node modules
179179
id: cache
180180
uses: actions/cache@v4
181181
with:
182182
path: |
183183
**/node_modules
184-
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
184+
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
185185
- name: Restore dependencies
186186
if: steps.cache.outputs.cache-hit != 'true'
187187
run: npm ci
@@ -196,7 +196,7 @@ jobs:
196196
- name: Upload build artifact
197197
uses: actions/upload-artifact@v4
198198
with:
199-
name: build-ubuntu-latest-20
199+
name: build-ubuntu-latest-22
200200
path: build.tar
201201
overwrite: true
202202
deploy_docs:
@@ -224,13 +224,13 @@ jobs:
224224
steps:
225225
- uses: actions/download-artifact@v4
226226
with:
227-
name: build-ubuntu-latest-20
227+
name: build-ubuntu-latest-22
228228
- name: Unpack build artifact
229229
run: tar -xvf build.tar && rm build.tar
230-
- name: Use Node.js 20
230+
- name: Use Node.js 22
231231
uses: actions/setup-node@v4
232232
with:
233-
node-version: 20
233+
node-version: 22
234234
registry-url: 'https://registry.npmjs.org'
235235
- name: Set up QEMU
236236
uses: docker/setup-qemu-action@v3

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -196,7 +196,7 @@ m365 spo site get --url https://contoso.sharepoint.com --output text
196196
197197
## Build
198198

199-
To build and run this CLI locally, you will need [`node`](https://nodejs.org) `>= 20.0.0` installed.
199+
To build and run this CLI locally, you will need [`node`](https://nodejs.org) `>= 22.0.0` installed.
200200

201201
```sh
202202
# Clone this repository

npm-shrinkwrap.json

+10-8
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -293,7 +293,7 @@
293293
"@types/json-schema": "^7.0.15",
294294
"@types/json-to-ast": "^2.1.4",
295295
"@types/mocha": "^10.0.10",
296-
"@types/node": "^20.17.16",
296+
"@types/node": "^22.13.4",
297297
"@types/node-forge": "^1.3.11",
298298
"@types/omelette": "^0.4.4",
299299
"@types/semver": "^7.5.8",

scripts/check-version.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
const nodeVersion = process.versions.node.split('.')[0];
22

3-
if (nodeVersion !== "20") {
4-
console.error("Node version must be 20");
3+
if (nodeVersion !== "22") {
4+
console.error("Node version must be 22");
55
process.exitCode = 1;
66
}

0 commit comments

Comments
 (0)