Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switches to Node@22. Closes #6604 #6607

Closed
wants to merge 2 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 7 additions & 7 deletions .github/workflows/check_pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node: [20]
node: [22]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -49,16 +49,16 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
# node versions to run tests on
nodeRun: [20]
nodeRun: [22]
# node version on which code was built and should be tested
nodeBuild: [20]
nodeBuild: [22]
include:
- os: ubuntu-latest
nodeRun: 18
nodeBuild: 20
nodeRun: 20
nodeBuild: 22
- os: ubuntu-latest
nodeRun: 22
nodeBuild: 20
nodeBuild: 22

steps:
- name: Configure pagefile
Expand Down Expand Up @@ -128,7 +128,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Cache node modules
id: cache
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,18 +14,18 @@ jobs:

steps:
- uses: actions/checkout@v4
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Cache node modules
id: cache
uses: actions/cache@v4
with:
path: |
**/node_modules
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
Expand All @@ -49,18 +49,18 @@ jobs:
name: build
- name: Unpack build artifact
run: tar -xvf build.tar && rm build.tar
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Cache node modules
id: cache
uses: actions/cache@v4
with:
path: |
**/node_modules
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
Expand Down Expand Up @@ -91,7 +91,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Cache node modules
id: cache
Expand Down Expand Up @@ -123,18 +123,18 @@ jobs:
name: build
- name: Unpack build artifact
run: tar -xvf build.tar && rm build.tar
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Cache node modules
id: cache
uses: actions/cache@v4
with:
path: |
**/node_modules
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
Expand All @@ -153,10 +153,10 @@ jobs:
name: build
- name: Unpack build artifact
run: tar -xvf build.tar && rm build.tar
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
30 changes: 15 additions & 15 deletions .github/workflows/release_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node: [20]
node: [22]

steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -51,16 +51,16 @@ jobs:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
# node versions to run tests on
nodeRun: [20]
nodeRun: [22]
# node version on which code was built and should be tested
nodeBuild: [20]
nodeBuild: [22]
include:
- os: ubuntu-latest
nodeRun: 18
nodeBuild: 20
nodeRun: 20
nodeBuild: 22
- os: ubuntu-latest
nodeRun: 22
nodeBuild: 20
nodeBuild: 22

steps:
- name: Configure pagefile
Expand Down Expand Up @@ -133,7 +133,7 @@ jobs:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22

- name: Cache node modules
id: cache
Expand Down Expand Up @@ -167,21 +167,21 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-ubuntu-latest-20
name: build-ubuntu-latest-22
- name: Unpack build artifact
run: tar -xvf build.tar && rm build.tar
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Cache node modules
id: cache
uses: actions/cache@v4
with:
path: |
**/node_modules
key: node_modules-ubuntu-latest-20-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
Expand All @@ -196,7 +196,7 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-ubuntu-latest-20
name: build-ubuntu-latest-22
path: build.tar
overwrite: true
deploy_docs:
Expand Down Expand Up @@ -224,13 +224,13 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-ubuntu-latest-20
name: build-ubuntu-latest-22
- name: Unpack build artifact
run: tar -xvf build.tar && rm build.tar
- name: Use Node.js 20
- name: Use Node.js 22
uses: actions/setup-node@v4
with:
node-version: 20
node-version: 22
registry-url: 'https://registry.npmjs.org'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -196,7 +196,7 @@ m365 spo site get --url https://contoso.sharepoint.com --output text

## Build

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

```sh
# Clone this repository
Expand Down
18 changes: 10 additions & 8 deletions npm-shrinkwrap.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -293,7 +293,7 @@
"@types/json-schema": "^7.0.15",
"@types/json-to-ast": "^2.1.4",
"@types/mocha": "^10.0.10",
"@types/node": "^20.17.16",
"@types/node": "^22.13.4",
"@types/node-forge": "^1.3.11",
"@types/omelette": "^0.4.4",
"@types/semver": "^7.5.8",
Expand Down
4 changes: 2 additions & 2 deletions scripts/check-version.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
const nodeVersion = process.versions.node.split('.')[0];

if (nodeVersion !== "20") {
console.error("Node version must be 20");
if (nodeVersion !== "22") {
console.error("Node version must be 22");
process.exitCode = 1;
}
Loading