@ant-design/cli 6.3.5 → 6.3.7
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +20 -3
- package/README.zh-CN.md +20 -3
- package/data/v3.26.20.json.gz +0 -0
- package/data/v3.json.gz +0 -0
- package/data/v6.3.6.json.gz +0 -0
- package/data/v6.3.7.json.gz +0 -0
- package/data/v6.json.gz +0 -0
- package/data/versions.json +4 -1
- package/dist/index.js +741 -208
- package/package.json +8 -8
- package/skills/antd/SKILL.md +13 -24
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ant-design/cli",
|
|
3
|
-
"version": "6.3.
|
|
3
|
+
"version": "6.3.7",
|
|
4
4
|
"description": "CLI tool for querying antd knowledge and analyzing antd usage in projects",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"bin": {
|
|
@@ -24,7 +24,7 @@
|
|
|
24
24
|
"postpack": "tsx scripts/compress-data.ts --undo"
|
|
25
25
|
},
|
|
26
26
|
"engines": {
|
|
27
|
-
"node": ">=
|
|
27
|
+
"node": ">=20.0.0"
|
|
28
28
|
},
|
|
29
29
|
"keywords": [
|
|
30
30
|
"ant-design",
|
|
@@ -43,18 +43,18 @@
|
|
|
43
43
|
"access": "public"
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"oxc-parser": "^0.
|
|
46
|
+
"oxc-parser": "^0.123.0"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|
|
49
|
-
"@modelcontextprotocol/sdk": "^1.
|
|
49
|
+
"@modelcontextprotocol/sdk": "^1.29.0",
|
|
50
50
|
"@types/node": "^25.5.0",
|
|
51
|
-
"@vitest/coverage-v8": "^
|
|
52
|
-
"commander": "
|
|
51
|
+
"@vitest/coverage-v8": "^4.1.2",
|
|
52
|
+
"commander": "^14.0.3",
|
|
53
53
|
"envinfo": "^7.21.0",
|
|
54
54
|
"gray-matter": "^4.0.3",
|
|
55
55
|
"tsup": "^8.4.0",
|
|
56
56
|
"tsx": "^4.19.0",
|
|
57
|
-
"typescript": "^5.
|
|
58
|
-
"vitest": "^
|
|
57
|
+
"typescript": "^5.9.3",
|
|
58
|
+
"vitest": "^4.1.2"
|
|
59
59
|
}
|
|
60
60
|
}
|
package/skills/antd/SKILL.md
CHANGED
|
@@ -15,7 +15,7 @@ allowed-tools:
|
|
|
15
15
|
|
|
16
16
|
# Ant Design CLI
|
|
17
17
|
|
|
18
|
-
You have access to `@ant-design/cli` — a local CLI tool with bundled antd metadata for v4/v5/v6. Use it to query component knowledge, analyze projects, and guide migrations. All data is offline, no network needed.
|
|
18
|
+
You have access to `@ant-design/cli` — a local CLI tool with bundled antd metadata for v3/v4/v5/v6. Use it to query component knowledge, analyze projects, and guide migrations. All data is offline, no network needed.
|
|
19
19
|
|
|
20
20
|
## Setup
|
|
21
21
|
|
|
@@ -83,11 +83,12 @@ antd doctor --format json
|
|
|
83
83
|
|
|
84
84
|
### 4. Migrating between versions
|
|
85
85
|
|
|
86
|
-
When the user wants to upgrade antd (e.g., v4 → v5):
|
|
86
|
+
When the user wants to upgrade antd (e.g., v3 → v4 or v4 → v5):
|
|
87
87
|
|
|
88
88
|
```bash
|
|
89
89
|
# Get full migration checklist
|
|
90
|
-
antd migrate 4
|
|
90
|
+
antd migrate 3 4 --format json # v3 → v4
|
|
91
|
+
antd migrate 4 5 --format json # v4 → v5
|
|
91
92
|
|
|
92
93
|
# Check migration for a specific component
|
|
93
94
|
antd migrate 4 5 --component Select --format json
|
|
@@ -164,7 +165,7 @@ Collects: OS, Node, package managers (npm/pnpm/yarn/bun/utoo), npm registry, bro
|
|
|
164
165
|
|
|
165
166
|
### 9. Reporting antd bugs
|
|
166
167
|
|
|
167
|
-
When you
|
|
168
|
+
When the user asks you to report an antd bug:
|
|
168
169
|
|
|
169
170
|
```bash
|
|
170
171
|
# Step 0: Collect environment info for reference (optional — antd bug already embeds basic env)
|
|
@@ -190,23 +191,12 @@ antd bug --title "DatePicker crashes when selecting date" \
|
|
|
190
191
|
--submit
|
|
191
192
|
```
|
|
192
193
|
|
|
193
|
-
### 10.
|
|
194
|
+
### 10. Reporting CLI issues
|
|
194
195
|
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
Trigger conditions — report a CLI bug when you observe any of these:
|
|
198
|
-
- A command **crashes or exits with an unexpected error**
|
|
199
|
-
- A command **returns clearly incorrect data** (e.g. `antd info Button` shows wrong props, missing props, or props from the wrong version)
|
|
200
|
-
- A command's **output doesn't match its documented behavior** (e.g. `--format json` returns non-JSON, `--version X` is ignored)
|
|
201
|
-
- A command **returns empty or missing data** when it shouldn't (e.g. `antd demo Button` returns no demos, `antd token Button` returns no tokens for v5+)
|
|
202
|
-
- **Inconsistencies between commands** (e.g. `antd list` shows a component but `antd info` says it doesn't exist)
|
|
203
|
-
|
|
204
|
-
**Workflow:**
|
|
205
|
-
1. You notice something wrong while using the CLI
|
|
206
|
-
2. Gather evidence: the exact command you ran, what was returned, and what you expected
|
|
207
|
-
3. Preview the bug report for the user:
|
|
196
|
+
When the user asks you to report a CLI bug, or explicitly requests help filing one:
|
|
208
197
|
|
|
209
198
|
```bash
|
|
199
|
+
# Preview the bug report for the user
|
|
210
200
|
antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
|
|
211
201
|
--description "When querying Button props for version 5.12.0, the output includes props that don't exist in that version" \
|
|
212
202
|
--steps "1. Run: antd info Button --version 5.12.0 --format json" \
|
|
@@ -215,8 +205,7 @@ antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
|
|
|
215
205
|
--format json
|
|
216
206
|
```
|
|
217
207
|
|
|
218
|
-
|
|
219
|
-
5. Submit after user confirms:
|
|
208
|
+
Show the report to the user and confirm before submitting:
|
|
220
209
|
|
|
221
210
|
```bash
|
|
222
211
|
antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
|
|
@@ -227,7 +216,7 @@ antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
|
|
|
227
216
|
--submit
|
|
228
217
|
```
|
|
229
218
|
|
|
230
|
-
**
|
|
219
|
+
**Opt-out:** If the environment variable `ANTD_NO_AUTO_REPORT=1` is set, skip all bug-reporting suggestions entirely — do not suggest `antd bug` or `antd bug-cli` unless the user directly asks.
|
|
231
220
|
|
|
232
221
|
### 11. Using as MCP server
|
|
233
222
|
|
|
@@ -258,9 +247,9 @@ This provides 7 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_
|
|
|
258
247
|
## Key Rules
|
|
259
248
|
|
|
260
249
|
1. **Always query before writing** — Don't guess antd APIs from memory. Run `antd info` first.
|
|
261
|
-
2. **Match the user's version** — If the project uses antd 4.x, pass `--version 4.24.0`. The CLI auto-detects from `node_modules` if no flag is given.
|
|
250
|
+
2. **Match the user's version** — If the project uses antd 3.x or 4.x, pass `--version 3.26.0` or `--version 4.24.0`. The CLI auto-detects from `node_modules` if no flag is given.
|
|
262
251
|
3. **Use `--format json`** — Every command supports it. Parse the JSON output rather than regex-matching text output.
|
|
263
252
|
4. **Check before suggesting migration** — Run `antd changelog <v1> <v2>` and `antd migrate` before advising on version upgrades.
|
|
264
253
|
5. **Lint after changes** — After writing or modifying antd code, run `antd lint` on the changed files to catch deprecated or problematic usage.
|
|
265
|
-
6. **Report antd bugs** —
|
|
266
|
-
7. **
|
|
254
|
+
6. **Report antd bugs** — When the user asks to report an antd bug, use `antd bug`. Always preview first, get user confirmation, then submit.
|
|
255
|
+
7. **Report CLI issues** — When the user asks about a CLI problem, use `antd bug-cli` to help them file a report. Always preview first, get user confirmation, then submit.
|