feat: node engines limit change

This commit is contained in:
rendianmeng
2026-07-21 13:55:38 +08:00
parent 1f91fa42fa
commit 3b779a708d
18 changed files with 46 additions and 44 deletions
+1 -1
View File
@@ -39,7 +39,7 @@ body:
attributes:
label: Node version
description: "Output of node --version"
placeholder: "v22.12.0"
placeholder: "v18.17.0"
validations:
required: true
+2 -1
View File
@@ -6,7 +6,8 @@ Developer guide for `bailian-cli` — the official CLI for Aliyun Model Studio (
## Prerequisites
- Node.js ≥ 22.12
- Node.js ≥ 22.12 (required for developing this repo)
- End users installing the published CLI only need Node.js >= 18.17
- pnpm 10.33.2 (`npm i -g pnpm@10.33.2`)
- A DashScope API key for running e2e tests
+3 -2
View File
@@ -6,8 +6,9 @@
## 环境要求
- Node.js ≥ 22.12
- pnpm 10.33.2(`npm i -g pnpm@10.33.2`)
- 参与本仓库开发:Node.js ≥ 22.12
- 仅安装/使用已发布的 CLI:Node.js >= 18.17
- pnpm 10.33.2(`npm i -g pnpm@10.33.2`)
- 跑 e2e 需要一个百炼 API Key
## 仓库结构
+2 -2
View File
@@ -7,7 +7,7 @@
**原则**:先执行检查;若 **Node / 包管理器 / 网络** 任一不满足下文要求,Agent 应 **在本机终端内主动完成安装或配置**(例如升级 Node、切换镜像、配置 `npm` 代理等),再继续 `bailian-cli` 安装。仅在无权限或环境无法自动化时,再向用户说明原因并请其配合。
1. **Node.js**
- 要求 **≥ 22.12.0**,执行 `node -v` 确认。
- 要求 **≥ 18.17.0**,执行 `node -v` 确认。
- 未安装或版本不足:由 Agent 自行安装或升级 Node。
2. **npm**(**唯一**允许的包管理器)
@@ -119,7 +119,7 @@ bl auth status --output json
| 现象 | 可能原因 | 建议动作 |
| ----------------------- | -------------------- | --------------------------------------------------------------- |
| `bl: command not found` | 全局 bin 不在 PATH | 检查 `npm prefix -g` 与 PATH |
| 安装报错 engines | Node 版本过低 | 升级到 ≥ 22.12 |
| 安装报错 engines | Node 版本过低 | 升级到 ≥ 18.17 |
| 401 / 鉴权失败 | 未 login 或 Key 无效 | 按 Key 类型重新执行普通或 Token Plan 登录命令 |
| 企业网络无法访问 npm | 代理 / 镜像 | 配置 registry 或代理后再装 |
| 本机只有 pnpm、没有 npm | Agent 误用 pnpm 安装 | 先装/修好 **npm**,再用 `npm install -g bailian-cli`;勿用 pnpm |
+2 -2
View File
@@ -5,7 +5,7 @@
**The official command-line interface for Aliyun Model Studio (DashScope) AI Platform**
[![npm version](https://img.shields.io/npm/v/bailian-cli?color=0969da&label=npm)](https://www.npmjs.com/package/bailian-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
@@ -81,7 +81,7 @@ npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g
```
> Requires Node.js >= 22.12.
> Requires Node.js >= 18.17.
## Quick Start
+1 -1
View File
@@ -12,7 +12,7 @@
### A. 版本一致性
- [ ] `package.json` 的 `engines.node` 与 README 的 Node.js 徽章一致
- [ ] 发布包(`cli` 等)的 `engines.node` 与 README 的 Node.js 徽章一致;根/e2e 开发要求(`>=22.12`)与 CONTRIBUTING 一致
- [ ] `pnpm-lock.yaml` 同步生成(运行 `pnpm install`)
- [ ] 各源码包 `tsconfig.json`(根 + core + runtime + commands + cli + kscli)的 target / module 设置一致
+12 -12
View File
@@ -93,15 +93,15 @@ node tools/release/publish-channel.mjs --channel test --knowledge --dry-run
## 常见漏点(基于历史踩坑)
| 漏点 | 后果 |
| -------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| 只升部分包,漏升 runtime/commands/kscli | 当前 check.mjs 按所选发布集合校验,但未选择 `knowledge-studio-cli` 时不会覆盖 kscli |
| 新增发布包但没加 `tools/release/lib/packages.mjs` | CI 不会 bump/publish/校验该包 |
| cli 升版号但 core 没升 | check.mjs 会拦下 |
| 发版漏更 CHANGELOG,或分类写成规范外的 `优化`/`Improved` | 用户看不到本次变更,分类与历史不一致 |
| `1.0.0` 当 beta 直接发 | 占了 `latest` tag,所有用户被强升,撤回成本极高 |
| README 写的 bin 名实际 `package.json.bin` 没注册 | 用户复制命令报 `command not found` |
| Node 徽章 `>=18`、engines `>=22.12` 不一致 | 用户在 Node 18 上 `npm i` 被 engine 警告或直接失败 |
| npm Trusted Publisher 的 workflow filename 改了没同步 | OIDC 匹配不上,publish 报 404 |
| CI 用 Node 22(npm 10)跑 publish | npm 10 不支持 OIDC token 交换,publish 报 404 |
| stable 发布前没有升级版本号 | 所选发布集合的版本已全部存在于 npm,CI 明确报错并要求先升级版本号 |
| 漏点 | 后果 |
| ------------------------------------------------------------------- | ---------------------------------------------------------------------------------- |
| 只升部分包,漏升 runtime/commands/kscli | 当前 check.mjs 按所选发布集合校验,但未选择 `knowledge-studio-cli` 时不会覆盖 kscli |
| 新增发布包但没加 `tools/release/lib/packages.mjs` | CI 不会 bump/publish/校验该包 |
| cli 升版号但 core 没升 | check.mjs 会拦下 |
| 发版漏更 CHANGELOG,或分类写成规范外的 `优化`/`Improved` | 用户看不到本次变更,分类与历史不一致 |
| `1.0.0` 当 beta 直接发 | 占了 `latest` tag,所有用户被强升,撤回成本极高 |
| README 写的 bin 名实际 `package.json.bin` 没注册 | 用户复制命令报 `command not found` |
| Node 徽章与 `cli/package.json.engines` 不一致(当前应为 `>=18.17`) | 用户在声明外的 Node 上 `npm i` 被 engine 警告或直接失败 |
| npm Trusted Publisher 的 workflow filename 改了没同步 | OIDC 匹配不上,publish 报 404 |
| CI 用 Node 22(npm 10)跑 publish | npm 10 不支持 OIDC token 交换,publish 报 404 |
| stable 发布前没有升级版本号 | 所选发布集合的版本已全部存在于 npm,CI 明确报错并要求先升级版本号 |
+2 -2
View File
@@ -5,7 +5,7 @@
**The official command-line interface for Aliyun Model Studio (DashScope) AI Platform**
[![npm version](https://img.shields.io/npm/v/bailian-cli?color=0969da&label=npm)](https://www.npmjs.com/package/bailian-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
@@ -81,7 +81,7 @@ npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g
```
> Requires Node.js >= 22.12.
> Requires Node.js >= 18.17.
## Quick Start
+2 -2
View File
@@ -5,7 +5,7 @@
**阿里云百炼 (DashScope) AI 平台命令行工具**
[![npm version](https://img.shields.io/npm/v/bailian-cli?color=0969da&label=npm)](https://www.npmjs.com/package/bailian-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
@@ -79,7 +79,7 @@ npm install -g bailian-cli
npx skills add modelstudioai/cli --all -g
```
> 需要预先安装 Node.js >= 22.12。
> 需要预先安装 Node.js >= 18.17。
## 快速开始
+1 -1
View File
@@ -66,6 +66,6 @@
"yaml": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
+1 -1
View File
@@ -55,6 +55,6 @@
"vite-plus": "0.1.22"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
+1 -1
View File
@@ -51,6 +51,6 @@
"vite-plus": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
+2 -2
View File
@@ -5,7 +5,7 @@
**Lightweight RAG CLI for Aliyun Model Studio — focused on knowledge-base retrieval.**
[![npm version](https://img.shields.io/npm/v/knowledge-studio-cli?color=0969da&label=npm)](https://www.npmjs.com/package/knowledge-studio-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
@@ -23,7 +23,7 @@
npm install -g knowledge-studio-cli
```
> Requires Node.js >= 22.12.
> Requires Node.js >= 18.17.
## Quick Start
+2 -2
View File
@@ -5,7 +5,7 @@
**阿里云 Model Studio 轻量级 RAG 命令行工具 — 专注知识库检索。**
[![npm version](https://img.shields.io/npm/v/knowledge-studio-cli?color=0969da&label=npm)](https://www.npmjs.com/package/knowledge-studio-cli)
[![Node.js](https://img.shields.io/badge/node-%3E%3D22.12-brightgreen)](https://nodejs.org)
[![Node.js](https://img.shields.io/badge/node-%3E%3D18.17-brightgreen)](https://nodejs.org)
[![TypeScript](https://img.shields.io/badge/TypeScript-strict-3178c6)](https://www.typescriptlang.org)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue)](LICENSE)
@@ -23,7 +23,7 @@
npm install -g knowledge-studio-cli
```
> 需要 Node.js >= 22.12。
> 需要 Node.js >= 18.17。
## 快速开始
+1 -1
View File
@@ -66,6 +66,6 @@
"yaml": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
}
}
+1 -1
View File
@@ -56,7 +56,7 @@
"yaml": "catalog:"
},
"engines": {
"node": ">=22.12.0"
"node": ">=18.17.0"
},
"inlinedDependencies": {
"ajv": "8.20.0",
+9 -9
View File
@@ -28,8 +28,8 @@ catalogs:
specifier: ^4.23.0
version: 4.23.0
undici:
specifier: ^8.4.1
version: 8.4.1
specifier: ^6.27.0
version: 6.27.0
vite-plus:
specifier: latest
version: 0.1.22
@@ -93,7 +93,7 @@ importers:
version: 6.0.3
undici:
specifier: 'catalog:'
version: 8.4.1
version: 6.27.0
vite-plus:
specifier: 0.1.22
version: 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
@@ -217,7 +217,7 @@ importers:
version: 6.0.3
undici:
specifier: 'catalog:'
version: 8.4.1
version: 6.27.0
vite-plus:
specifier: 0.1.22
version: 0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3)
@@ -238,7 +238,7 @@ importers:
version: 5.6.2
undici:
specifier: 'catalog:'
version: 8.4.1
version: 6.27.0
devDependencies:
'@clack/prompts':
specifier: ^0.7.0
@@ -1344,9 +1344,9 @@ packages:
undici-types@7.19.2:
resolution: {integrity: sha512-qYVnV5OEm2AW8cJMCpdV20CDyaN3g0AjDlOGf1OW4iaDEx8MwdtChUp4zu4H0VP3nDRF/8RKWH+IPp9uW0YGZg==}
undici@8.4.1:
resolution: {integrity: sha512-RNHlB4fxZK0IrkhBsxhlbx7s8kFWwr7rzzOqj5nvZugw3ig3RsB7KW3zVlV0eu8POl+rx5d1hmL7rRg0z1owow==}
engines: {node: '>=22.19.0'}
undici@6.27.0:
resolution: {integrity: sha512-YmfV3YnEDzXRC5lZ2jWtWWHKGUm1zIt8AhesR1tens+HTNv+YZlN/dp6G727LOvMJ8xjP9Be7Y2Sdr96LDm+pg==}
engines: {node: '>=18.17'}
vite-plus@0.1.22:
resolution: {integrity: sha512-fCCmEKjI+Hv74PdL/MKcrBkdYPHFNcqD5568KxwN0sa4SGxtcbs55i/577LxKs0w5zIjuLRZZ0zQPu9MO+9itg==}
@@ -2232,7 +2232,7 @@ snapshots:
undici-types@7.19.2: {}
undici@8.4.1: {}
undici@6.27.0: {}
vite-plus@0.1.22(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(typescript@6.0.3)(vite@8.0.10(@types/node@24.12.2)(esbuild@0.28.1)(jiti@2.6.1)(tsx@4.23.0)(yaml@2.8.3))(yaml@2.8.3):
dependencies:
+1 -1
View File
@@ -11,7 +11,7 @@ catalog:
smol-toml: ^1.4.2
tsx: ^4.23.0
typescript: ^5
undici: ^8.4.1
undici: ^6.27.0
vite: npm:@voidzero-dev/vite-plus-core@latest
vite-plus: latest
vitest: npm:@voidzero-dev/vite-plus-test@latest