@ant-design/cli 6.3.5-beta.0 → 6.3.6

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.
Files changed (75) hide show
  1. package/README.md +67 -1
  2. package/README.zh-CN.md +67 -1
  3. package/data/v3.26.20.json.gz +0 -0
  4. package/data/v3.json.gz +0 -0
  5. package/data/v4.0.4.json.gz +0 -0
  6. package/data/v4.1.5.json.gz +0 -0
  7. package/data/v4.10.3.json.gz +0 -0
  8. package/data/v4.11.3.json.gz +0 -0
  9. package/data/v4.12.3.json.gz +0 -0
  10. package/data/v4.13.1.json.gz +0 -0
  11. package/data/v4.14.1.json.gz +0 -0
  12. package/data/v4.15.6.json.gz +0 -0
  13. package/data/v4.16.13.json.gz +0 -0
  14. package/data/v4.17.4.json.gz +0 -0
  15. package/data/v4.18.9.json.gz +0 -0
  16. package/data/v4.19.5.json.gz +0 -0
  17. package/data/v4.2.5.json.gz +0 -0
  18. package/data/v4.20.7.json.gz +0 -0
  19. package/data/v4.21.7.json.gz +0 -0
  20. package/data/v4.22.8.json.gz +0 -0
  21. package/data/v4.23.6.json.gz +0 -0
  22. package/data/v4.24.16.json.gz +0 -0
  23. package/data/v4.3.5.json.gz +0 -0
  24. package/data/v4.4.3.json.gz +0 -0
  25. package/data/v4.5.4.json.gz +0 -0
  26. package/data/v4.6.6.json.gz +0 -0
  27. package/data/v4.7.3.json.gz +0 -0
  28. package/data/v4.8.6.json.gz +0 -0
  29. package/data/v4.9.4.json.gz +0 -0
  30. package/data/v4.json.gz +0 -0
  31. package/data/v5.0.7.json.gz +0 -0
  32. package/data/v5.1.7.json.gz +0 -0
  33. package/data/v5.10.3.json.gz +0 -0
  34. package/data/v5.11.5.json.gz +0 -0
  35. package/data/v5.12.8.json.gz +0 -0
  36. package/data/v5.13.3.json.gz +0 -0
  37. package/data/v5.14.2.json.gz +0 -0
  38. package/data/v5.15.4.json.gz +0 -0
  39. package/data/v5.16.5.json.gz +0 -0
  40. package/data/v5.17.4.json.gz +0 -0
  41. package/data/v5.18.3.json.gz +0 -0
  42. package/data/v5.19.4.json.gz +0 -0
  43. package/data/v5.2.3.json.gz +0 -0
  44. package/data/v5.20.6.json.gz +0 -0
  45. package/data/v5.21.6.json.gz +0 -0
  46. package/data/v5.22.7.json.gz +0 -0
  47. package/data/v5.23.4.json.gz +0 -0
  48. package/data/v5.24.9.json.gz +0 -0
  49. package/data/v5.25.4.json.gz +0 -0
  50. package/data/v5.26.7.json.gz +0 -0
  51. package/data/v5.27.6.json.gz +0 -0
  52. package/data/v5.28.1.json.gz +0 -0
  53. package/data/v5.29.3.json.gz +0 -0
  54. package/data/v5.3.3.json.gz +0 -0
  55. package/data/v5.4.7.json.gz +0 -0
  56. package/data/v5.5.2.json.gz +0 -0
  57. package/data/v5.6.4.json.gz +0 -0
  58. package/data/v5.7.3.json.gz +0 -0
  59. package/data/v5.8.6.json.gz +0 -0
  60. package/data/v5.9.4.json.gz +0 -0
  61. package/data/v5.json.gz +0 -0
  62. package/data/v6.0.1.json.gz +0 -0
  63. package/data/v6.1.4.json.gz +0 -0
  64. package/data/v6.2.3.json.gz +0 -0
  65. package/data/v6.3.1.json.gz +0 -0
  66. package/data/v6.3.3.json.gz +0 -0
  67. package/data/v6.3.4.json.gz +0 -0
  68. package/data/v6.3.5.json.gz +0 -0
  69. package/data/v6.3.6.json.gz +0 -0
  70. package/data/v6.json.gz +0 -0
  71. package/data/versions.json +4 -1
  72. package/dist/index.js +31473 -2274
  73. package/package.json +9 -7
  74. package/skills/antd/SKILL.md +35 -23
  75. package/dist/index.js.map +0 -1
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ant-design/cli",
3
- "version": "6.3.5-beta.0",
3
+ "version": "6.3.6",
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,16 +43,18 @@
43
43
  "access": "public"
44
44
  },
45
45
  "dependencies": {
46
- "@modelcontextprotocol/sdk": "^1.27.1",
47
- "commander": "~13.1.0",
48
- "oxc-parser": "^0.121.0"
46
+ "oxc-parser": "^0.123.0"
49
47
  },
50
48
  "devDependencies": {
49
+ "@modelcontextprotocol/sdk": "^1.29.0",
51
50
  "@types/node": "^25.5.0",
51
+ "@vitest/coverage-v8": "^4.1.2",
52
+ "commander": "^14.0.3",
53
+ "envinfo": "^7.21.0",
52
54
  "gray-matter": "^4.0.3",
53
55
  "tsup": "^8.4.0",
54
56
  "tsx": "^4.19.0",
55
- "typescript": "^5.7.0",
56
- "vitest": "^3.0.0"
57
+ "typescript": "^5.9.3",
58
+ "vitest": "^4.1.2"
57
59
  }
58
60
  }
@@ -66,6 +66,9 @@ antd doc Table --lang zh # Chinese docs
66
66
  When code isn't working as expected or the user reports an antd bug:
67
67
 
68
68
  ```bash
69
+ # Collect full environment snapshot (system, deps, browsers, build tools)
70
+ antd env --format json
71
+
69
72
  # Check if the prop exists for the user's antd version
70
73
  antd info Select --version 5.12.0 --format json
71
74
 
@@ -76,7 +79,7 @@ antd lint ./src/components/MyForm.tsx --format json
76
79
  antd doctor --format json
77
80
  ```
78
81
 
79
- **Workflow:** `antd doctor` → check environment → `antd info --version X` → verify API against the user's exact version → `antd lint` → find deprecated or incorrect usage.
82
+ **Workflow:** `antd env` → capture full environment → `antd doctor` → check configuration → `antd info --version X` → verify API against the user's exact version → `antd lint` → find deprecated or incorrect usage.
80
83
 
81
84
  ### 4. Migrating between versions
82
85
 
@@ -142,11 +145,32 @@ antd list --format json
142
145
  antd list --version 5.0.0 --format json
143
146
  ```
144
147
 
145
- ### 8. Reporting antd bugs
148
+ ### 8. Collecting environment info
149
+
150
+ When you need to understand the project's antd setup, or prepare info for a bug report:
151
+
152
+ ```bash
153
+ # Full environment snapshot (text — paste into GitHub Issues)
154
+ antd env
155
+
156
+ # Structured JSON for programmatic use
157
+ antd env --format json
158
+
159
+ # Scan a specific project directory
160
+ antd env ./my-project --format json
161
+ ```
162
+
163
+ Collects: OS, Node, package managers (npm/pnpm/yarn/bun/utoo), npm registry, browsers, core deps (antd/react/dayjs), all `@ant-design/*` and `rc-*` packages, and build tools (umi/vite/webpack/typescript/etc.).
164
+
165
+ ### 9. Reporting antd bugs
146
166
 
147
- When you encounter a confirmed antd component bug that can't be resolved locally:
167
+ When the user asks you to report an antd bug:
148
168
 
149
169
  ```bash
170
+ # Step 0: Collect environment info for reference (optional — antd bug already embeds basic env)
171
+ # Use the output to cross-check versions or attach extra details to the bug report
172
+ antd env --format json
173
+
150
174
  # Step 1: Preview for user review
151
175
  antd bug --title "DatePicker crashes when selecting date" \
152
176
  --reproduction "https://codesandbox.io/s/xxx" \
@@ -166,23 +190,12 @@ antd bug --title "DatePicker crashes when selecting date" \
166
190
  --submit
167
191
  ```
168
192
 
169
- ### 9. Auto-reporting CLI issues
170
-
171
- **IMPORTANT: Whenever you use any `antd` CLI command and notice something wrong, you should proactively initiate a bug report using `antd bug-cli`.**
172
-
173
- Trigger conditions — report a CLI bug when you observe any of these:
174
- - A command **crashes or exits with an unexpected error**
175
- - A command **returns clearly incorrect data** (e.g. `antd info Button` shows wrong props, missing props, or props from the wrong version)
176
- - A command's **output doesn't match its documented behavior** (e.g. `--format json` returns non-JSON, `--version X` is ignored)
177
- - 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+)
178
- - **Inconsistencies between commands** (e.g. `antd list` shows a component but `antd info` says it doesn't exist)
193
+ ### 10. Reporting CLI issues
179
194
 
180
- **Workflow:**
181
- 1. You notice something wrong while using the CLI
182
- 2. Gather evidence: the exact command you ran, what was returned, and what you expected
183
- 3. Preview the bug report for the user:
195
+ When the user asks you to report a CLI bug, or explicitly requests help filing one:
184
196
 
185
197
  ```bash
198
+ # Preview the bug report for the user
186
199
  antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
187
200
  --description "When querying Button props for version 5.12.0, the output includes props that don't exist in that version" \
188
201
  --steps "1. Run: antd info Button --version 5.12.0 --format json" \
@@ -191,8 +204,7 @@ antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
191
204
  --format json
192
205
  ```
193
206
 
194
- 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?"
195
- 5. Submit after user confirms:
207
+ Show the report to the user and confirm before submitting:
196
208
 
197
209
  ```bash
198
210
  antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
@@ -203,9 +215,9 @@ antd bug-cli --title "antd info Button returns wrong props for v5.12.0" \
203
215
  --submit
204
216
  ```
205
217
 
206
- **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.
218
+ **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.
207
219
 
208
- ### 10. Using as MCP server
220
+ ### 11. Using as MCP server
209
221
 
210
222
  If working in an IDE that supports MCP (Claude Desktop, Cursor, etc.), the CLI can also run as an MCP server, exposing all knowledge-query tools directly:
211
223
 
@@ -238,5 +250,5 @@ This provides 7 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_
238
250
  3. **Use `--format json`** — Every command supports it. Parse the JSON output rather than regex-matching text output.
239
251
  4. **Check before suggesting migration** — Run `antd changelog <v1> <v2>` and `antd migrate` before advising on version upgrades.
240
252
  5. **Lint after changes** — After writing or modifying antd code, run `antd lint` on the changed files to catch deprecated or problematic usage.
241
- 6. **Report antd bugs** — When you encounter an antd component bug, use `antd bug` to report it. Always preview first, get user confirmation, then submit.
242
- 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.
253
+ 6. **Report antd bugs** — When the user asks to report an antd bug, use `antd bug`. Always preview first, get user confirmation, then submit.
254
+ 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.