diff --git a/esbuild.config.js b/esbuild.config.js index e84b6223b..c7aafb463 100644 --- a/esbuild.config.js +++ b/esbuild.config.js @@ -79,7 +79,7 @@ esbuild outfile: 'dist/cli.js', platform: 'node', format: 'esm', - target: 'node20', + target: 'node22', external, packages: 'bundle', inject: [path.resolve(__dirname, 'scripts/esbuild-shims.js')], diff --git a/packages/cli/src/utils/doctorChecks.test.ts b/packages/cli/src/utils/doctorChecks.test.ts index 262fa63fc..391cbf0ae 100644 --- a/packages/cli/src/utils/doctorChecks.test.ts +++ b/packages/cli/src/utils/doctorChecks.test.ts @@ -75,7 +75,7 @@ describe('runDoctorChecks', () => { expect(categories).toContain('Git'); }); - it('should pass Node.js version check for v20+', async () => { + it('should pass Node.js version check for v22+', async () => { const results = await runDoctorChecks(mockContext); const nodeCheck = results.find((r) => r.name === 'Node.js version'); expect(nodeCheck).toBeDefined(); diff --git a/packages/cli/src/utils/doctorChecks.ts b/packages/cli/src/utils/doctorChecks.ts index 6422bb5c1..8ac408746 100644 --- a/packages/cli/src/utils/doctorChecks.ts +++ b/packages/cli/src/utils/doctorChecks.ts @@ -17,7 +17,7 @@ import { } from '@qwen-code/qwen-code-core'; import { t } from '../i18n/index.js'; -const MIN_NODE_MAJOR = 20; +const MIN_NODE_MAJOR = 22; function checkNodeVersion(): DoctorCheckResult { const version = process.version; diff --git a/packages/sdk-typescript/package.json b/packages/sdk-typescript/package.json index 584eb37c3..2d123d487 100644 --- a/packages/sdk-typescript/package.json +++ b/packages/sdk-typescript/package.json @@ -43,7 +43,7 @@ "author": "Qwen Team", "license": "Apache-2.0", "engines": { - "node": ">=18.0.0" + "node": ">=22.0.0" }, "dependencies": { "@modelcontextprotocol/sdk": "^1.25.1", diff --git a/packages/sdk-typescript/scripts/build.js b/packages/sdk-typescript/scripts/build.js index beda8b0e7..90c6f4277 100755 --- a/packages/sdk-typescript/scripts/build.js +++ b/packages/sdk-typescript/scripts/build.js @@ -50,7 +50,7 @@ await esbuild.build({ bundle: true, format: 'esm', platform: 'node', - target: 'node18', + target: 'node22', outfile: join(rootDir, 'dist', 'index.mjs'), external: ['@modelcontextprotocol/sdk'], sourcemap: false, @@ -68,7 +68,7 @@ await esbuild.build({ bundle: true, format: 'cjs', platform: 'node', - target: 'node18', + target: 'node22', outfile: join(rootDir, 'dist', 'index.cjs'), external: ['@modelcontextprotocol/sdk'], sourcemap: false, diff --git a/packages/web-templates/package.json b/packages/web-templates/package.json index 08980ef78..fb6c75426 100644 --- a/packages/web-templates/package.json +++ b/packages/web-templates/package.json @@ -34,6 +34,6 @@ "vite": "^5.0.0" }, "engines": { - "node": ">=20" + "node": ">=22" } }