From 47dc16d243d7a7fb82f52ad5028d2c0692b8e333 Mon Sep 17 00:00:00 2001 From: matt korwel Date: Sat, 5 Jul 2025 07:55:15 -0700 Subject: [PATCH] feat: Update minimum Node.js version to 20 (#3277) --- .github/workflows/ci.yml | 6 +++--- CONTRIBUTING.md | 6 ++++-- docs/cli/configuration.md | 2 +- package-lock.json | 6 +++--- package.json | 2 +- packages/cli/package.json | 2 +- packages/core/package.json | 2 +- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1d112e10..40ce6985 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -17,7 +17,7 @@ jobs: contents: read # For checkout strategy: matrix: - node-version: [20.x] + node-version: [20.x, 22.x, 24.x] steps: - name: Checkout repository uses: actions/checkout@v4 @@ -62,7 +62,7 @@ jobs: pull-requests: write strategy: matrix: - node-version: [20.x] # Should match the build job's matrix + node-version: [20.x, 22.x, 24.x] # Should match the build job's matrix steps: - name: Checkout repository uses: actions/checkout@v4 @@ -124,7 +124,7 @@ jobs: pull-requests: write # For commenting strategy: matrix: - node-version: [20.x] # Should match the test job's matrix + node-version: [20.x, 22.x, 24.x] # Should match the test job's matrix steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 2a5e70a6..cb623565 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -88,8 +88,10 @@ This section guides contributors on how to build, modify, and understand the dev **Prerequisites:** -1. Install [Node 18+](https://nodejs.org/en/download) -2. Git +1. **Node.js**: + - **Development:** Please use Node.js `~20.19.0`. This specific version is required due to an upstream development dependency issue. You can use a tool like [nvm](https://github.com/nvm-sh/nvm) to manage Node.js versions. + - **Production:** For running the CLI in a production environment, any version of Node.js `>=20` is acceptable. +2. **Git** ### Build Process diff --git a/docs/cli/configuration.md b/docs/cli/configuration.md index 450d6ce8..77d91b59 100644 --- a/docs/cli/configuration.md +++ b/docs/cli/configuration.md @@ -332,7 +332,7 @@ Here's a conceptual example of what a context file at the root of a TypeScript p - When generating new TypeScript code, please follow the existing coding style. - Ensure all new functions and classes have JSDoc comments. - Prefer functional programming paradigms where appropriate. -- All code should be compatible with TypeScript 5.0 and Node.js 18+. +- All code should be compatible with TypeScript 5.0 and Node.js 20+. ## Coding Style: diff --git a/package-lock.json b/package-lock.json index 7a081599..e4b63506 100644 --- a/package-lock.json +++ b/package-lock.json @@ -38,7 +38,7 @@ "yargs": "^17.7.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@alcalzone/ansi-tokenize": { @@ -11252,7 +11252,7 @@ "vitest": "^3.1.1" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "packages/cli/node_modules/@testing-library/dom": { @@ -11416,7 +11416,7 @@ "vitest": "^3.1.1" }, "engines": { - "node": ">=18" + "node": ">=20" } }, "packages/core/node_modules/ignore": { diff --git a/package.json b/package.json index 57d57b68..0b64f85b 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,7 @@ "name": "@google/gemini-cli", "version": "0.1.9", "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" }, "type": "module", "workspaces": [ diff --git a/packages/cli/package.json b/packages/cli/package.json index 57dec99e..70cf6b1a 100644 --- a/packages/cli/package.json +++ b/packages/cli/package.json @@ -75,6 +75,6 @@ "vitest": "^3.1.1" }, "engines": { - "node": ">=18" + "node": ">=20" } } diff --git a/packages/core/package.json b/packages/core/package.json index 8a95d704..b29320af 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -55,6 +55,6 @@ "vitest": "^3.1.1" }, "engines": { - "node": ">=18" + "node": ">=20" } }