@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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/cli",
3
- "version": "6.3.5",
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": ">=18.0.0"
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.121.0"
46
+ "oxc-parser": "^0.123.0"
47
47
  },
48
48
  "devDependencies": {
49
- "@modelcontextprotocol/sdk": "^1.27.1",
49
+ "@modelcontextprotocol/sdk": "^1.29.0",
50
50
  "@types/node": "^25.5.0",
51
- "@vitest/coverage-v8": "^3.2.4",
52
- "commander": "~13.1.0",
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.7.0",
58
- "vitest": "^3.0.0"
57
+ "typescript": "^5.9.3",
58
+ "vitest": "^4.1.2"
59
59
  }
60
60
  }
@@ -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 5 --format json
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 encounter a confirmed antd component bug that can't be resolved locally:
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. Auto-reporting CLI issues
194
+ ### 10. Reporting CLI issues
194
195
 
195
- **IMPORTANT: Whenever you use any `antd` CLI command and notice something wrong, you should proactively initiate a bug report using `antd bug-cli`.**
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
- 4. Show the report to the user: "I noticed an issue with the CLI while working. Here's a bug report — shall I submit it?"
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
- **Key principle:** You are a quality feedback loop for the CLI. Don't silently work around CLI issues — report them so they get fixed. Always confirm with the user before submitting.
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** — First run `antd env` to capture the full environment, then use `antd bug` to report. Always preview first, get user confirmation, then submit.
266
- 7. **Auto-report CLI issues** — If any `antd` command crashes, returns wrong data, or behaves inconsistently, proactively use `antd bug-cli` to report it. You are the quality feedback loop for the CLI — don't silently work around issues.
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.