@ant-design/cli 6.4.2 → 6.4.3

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.4.2",
3
+ "version": "6.4.3",
4
4
  "description": "CLI tool for querying antd knowledge and analyzing antd usage in projects",
5
5
  "type": "module",
6
6
  "bin": {
@@ -48,11 +48,17 @@
48
48
  "ip-address": "^10.1.1"
49
49
  },
50
50
  "dependencies": {
51
- "oxc-parser": "^0.130.0"
51
+ "fast-glob": "^3.3.3",
52
+ "fast-levenshtein": "^3.0.0",
53
+ "oxc-parser": "^0.130.0",
54
+ "semver": "^7.8.0",
55
+ "string-width": "^8.2.1"
52
56
  },
53
57
  "devDependencies": {
54
58
  "@modelcontextprotocol/sdk": "^1.29.0",
59
+ "@types/fast-levenshtein": "^0.0.4",
55
60
  "@types/node": "^25.5.0",
61
+ "@types/semver": "^7.7.1",
56
62
  "@vitest/coverage-v8": "^4.1.2",
57
63
  "commander": "^14.0.3",
58
64
  "conf": "^15.1.0",
@@ -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 v3/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 v4/v5/v6 (plus migration guides for v3 → v4, v4 → v5, 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
 
@@ -93,6 +93,9 @@ antd migrate 4 5 --format json # v4 → v5
93
93
  # Check migration for a specific component
94
94
  antd migrate 4 5 --component Select --format json
95
95
 
96
+ # Generate agent-friendly auto-migration prompt (does not modify files)
97
+ antd migrate 4 5 --apply ./src --format json
98
+
96
99
  # See what changed between two versions
97
100
  antd changelog 4.24.0 5.0.0 --format json
98
101
 
@@ -239,15 +242,16 @@ This provides 7 tools (`antd_list`, `antd_info`, `antd_doc`, `antd_demo`, `antd_
239
242
 
240
243
  | Flag | Purpose |
241
244
  |---|---|
242
- | `--format json` | Structured output — always use this |
245
+ | `--format <format>` | Output format: `json`, `text`, or `markdown` (agents should prefer `json`) |
243
246
  | `--version <v>` | Target a specific antd version (e.g. `5.20.0`) |
244
247
  | `--lang zh` | Chinese output (default: `en`) |
245
248
  | `--detail` | Include extra fields (description, since, deprecated, FAQ) |
249
+ | `-V, --cli-version` | Print CLI version and exit |
246
250
 
247
251
  ## Key Rules
248
252
 
249
253
  1. **Always query before writing** — Don't guess antd APIs from memory. Run `antd info` first.
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.
254
+ 2. **Match the user's version** — Knowledge queries (`list/info/doc/demo/token/semantic/changelog`) support antd v4+. If the project uses antd 4.x/5.x/6.x, pass `--version 4.24.0` / `5.24.0` / `6.x`. For antd v3 projects, use `antd migrate 3 4` first.
251
255
  3. **Use `--format json`** — Every command supports it. Parse the JSON output rather than regex-matching text output.
252
256
  4. **Check before suggesting migration** — Run `antd changelog <v1> <v2>` and `antd migrate` before advising on version upgrades.
253
257
  5. **Lint after changes** — After writing or modifying antd code, run `antd lint` on the changed files to catch deprecated or problematic usage.
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file
Binary file