Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
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
2 changes: 1 addition & 1 deletion .github/copilot-instructions.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,7 @@
- **Lint**: `npm run lint` (uses custom ESLint rules from `eslint-rules/`)
- **Watch**: `npm run watch` (TypeScript in watch mode)
- **Symlink for local CLI**: `npm link` (after build)
- **Node version**: Must be 22 (see `scripts/check-version.js`)
- **Node version**: Must be 24 (see `scripts/check-version.js`)
- **Docs**: Docusaurus site in `docs/` (config: `docs/docusaurus.config.ts`)

## Project-Specific Notes
Expand Down
16 changes: 11 additions & 5 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: [22]
node: [24]

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

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

- 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 22
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24
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-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-24-${{ 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 22
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24
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-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-24-${{ 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: 22
node-version: 24

- 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 22
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24
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-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-24-${{ 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 22
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24
registry-url: 'https://registry.npmjs.org'
- name: Set up QEMU
uses: docker/setup-qemu-action@v3
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/release_next.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ jobs:
strategy:
matrix:
os: [macos-latest, windows-latest, ubuntu-latest]
node: [22]
node: [24]

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

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

- name: Cache node modules
id: cache
Expand Down Expand Up @@ -163,21 +169,21 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-ubuntu-latest-22
name: build-ubuntu-latest-24
- name: Unpack build artifact
run: tar -xvf build.tar && rm build.tar
- name: Use Node.js 22
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24
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-22-${{ hashFiles('**/npm-shrinkwrap.json') }}
key: node_modules-ubuntu-latest-24-${{ hashFiles('**/npm-shrinkwrap.json') }}
- name: Restore dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci
Expand All @@ -192,7 +198,7 @@ jobs:
- name: Upload build artifact
uses: actions/upload-artifact@v4
with:
name: build-ubuntu-latest-22
name: build-ubuntu-latest-24
path: build.tar
overwrite: true
deploy_docs:
Expand Down Expand Up @@ -220,13 +226,13 @@ jobs:
steps:
- uses: actions/download-artifact@v4
with:
name: build-ubuntu-latest-22
name: build-ubuntu-latest-24
- name: Unpack build artifact
run: tar -xvf build.tar && rm build.tar
- name: Use Node.js 22
- name: Use Node.js 24
uses: actions/setup-node@v4
with:
node-version: 22
node-version: 24
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 @@ -198,7 +198,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) `>= 22.0.0` installed.
To build and run this CLI locally, you will need [`node`](https://nodejs.org) `>= 24.0.0` installed.

```sh
# Clone this repository
Expand Down
2 changes: 1 addition & 1 deletion docs/docs/contribute/environment-setup.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ Setting up your local copy of the project for development and testing is essenti

:::info[Install prerequisites]

Before you start contributing to this project, you will need the latest LTS version of **Node.js** and **npm** installed.
Before you start contributing to this project, you will need the current active LTS version of **Node.js** and **npm** installed.

:::

Expand Down
16 changes: 8 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 @@ -310,7 +310,7 @@
"@types/json-schema": "^7.0.15",
"@types/json-to-ast": "^2.1.4",
"@types/mocha": "^10.0.10",
"@types/node": "^22.19.3",
"@types/node": "^24.10.4",
"@types/node-forge": "^1.3.14",
"@types/omelette": "^0.4.5",
"@types/semver": "^7.7.1",
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 !== "22") {
console.error("Node version must be 22");
if (nodeVersion !== "24") {
console.error("Node version must be 24");
process.exitCode = 1;
}
6 changes: 2 additions & 4 deletions src/AuthServer.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import http, { IncomingMessage, ServerResponse } from 'http';
import { AddressInfo } from 'net';
import { ParsedUrlQuery } from 'querystring';
import url from 'url';
import { Auth, InteractiveAuthorizationCodeResponse, InteractiveAuthorizationErrorResponse, Connection } from './Auth.js';
import { Logger } from './cli/Logger.js';
import { browserUtil } from './utils/browserUtil.js';
Expand Down Expand Up @@ -73,9 +72,8 @@ export class AuthServer {
await this.logger.logToStderr('');
}

// url.parse is deprecated but we can't move to URL, because it doesn't
// support server-relative URLs
const queryString: ParsedUrlQuery = url.parse(request.url as string, true).query;
const urlObj = new URL(request.url as string, 'http://localhost');
const queryString: ParsedUrlQuery = Object.fromEntries(urlObj.searchParams.entries());
const hasCode: boolean = queryString.code !== undefined;
const hasError: boolean = queryString.error !== undefined;

Expand Down