Commit Graph

59 Commits

Author SHA1 Message Date
afc163 738c9d29ab fix: keep version flag for antd target 2026-06-29 10:02:11 +08:00
afc163 07d2fb02f5 fix: show cli version in root help 2026-06-28 01:49:05 +08:00
afc163 614660de61 fix: authenticate sync release checks (#180) 2026-06-22 12:03:03 +08:00
afc163 0939df814e fix: recover missing publish release artifacts (#179) 2026-06-22 11:48:42 +08:00
afc163 0ac194df9d fix: harden sync publish recovery (#178)
* fix: harden sync publish recovery

* test: cover publish recovery step order
2026-06-22 11:32:36 +08:00
afc163 25162503fe fix: recover failed sync publish releases (#177) 2026-06-22 11:07:21 +08:00
afc163 1934accbae fix: fail sync on missing indexed snapshots (#176) 2026-06-22 11:05:53 +08:00
afc163 01ec7a26fb docs: align sync schedule spec 2026-06-22 00:09:14 +08:00
afc163 7639bd726f fix: commit data-only sync changes 2026-06-22 00:07:36 +08:00
afc163 d16b142aa4 fix: validate synced data in workflow 2026-06-22 00:05:48 +08:00
afc163 64b3a19d48 fix: parse latest antd version for sync check 2026-06-22 00:03:34 +08:00
afc163 fd0a336a01 fix: refresh token metadata per synced tag 2026-06-22 00:01:30 +08:00
afc163 f214f4be03 fix: fail closed on corrupted versions index 2026-06-21 23:59:47 +08:00
afc163 c28553b5f5 fix: fail sync when release tags are unavailable 2026-06-21 23:56:07 +08:00
afc163 e64eb8e11a feat: 新增 antd setup 初始化命令 (#165) 2026-06-21 22:58:16 +08:00
afc163 d94780abc1 fix: avoid stack traces for invalid global options (#162) 2026-06-20 22:52:48 +08:00
afc163 b28de139b8 fix: keep doctor bug checks offline (#164) 2026-06-20 21:42:50 +08:00
afc163 acc8105bb4 fix: count antd subpath default imports in usage (#163) 2026-06-20 21:04:19 +08:00
afc163 70aa189bd2 feat(migrate): scan directory to generate targeted migration prompts (#159)
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-18 13:38:26 +08:00
afc163 1d6803c505 fix: resolve auto-detection fallback version dynamically from latest bundled major (#150)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 19:39:01 +08:00
二货爱吃白萝卜 9e4e358e0f feat: add design.md command and antd_design_md MCP tool (#147)
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
2026-06-09 17:45:43 +08:00
afc163 c91cc630d4 feat(info): add common props note for className/style/rootClassName (#139)
Co-authored-by: Claude Opus 4.8 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-06-03 10:29:52 +08:00
afc163 3fa014764e feat: add antd upgrade command for self-updating the CLI (#123)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-27 10:22:00 +08:00
afc163 a70f9a4eee chore: remove stale v6 snapshots and prevent re-accumulation (#107)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-15 00:27:58 +08:00
Alex Zhu b67271269f fix: exclude locale paths from lint performance rule default import check (#104)
* fix: exclude locale paths from lint performance rule default import check

The performance rule was incorrectly flagging default imports from
antd locale paths (e.g. `import enUS from 'antd/locale/en_US'`) as
wildcard imports, and suggesting nonsensical fixes like
`import { Button } from 'antd/locale/en_US'`. Locale modules only
export a default, so this is the documented import pattern.

- Split `ImportDefaultSpecifier` from `ImportNamespaceSpecifier` checks
- Add `isLocalePath()` to exclude `antd/locale/*`, `antd/es/locale/*`,
  `antd/lib/locale/*` from default import warnings
- Improve error message for default imports vs wildcard imports

Fixes #99, Fixes #101

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: suggest actual used members instead of hardcoded Button in lint performance rule

Instead of always suggesting `import { Button }`, the performance rule
now tracks which members are actually accessed from the namespace import
(e.g. `<Antd.Button />`, `<Antd.Select />`) and uses those in the
suggestion message. Falls back to a generic example only when no member
usage is detectable.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* refactor: deduplicate performance rule specifier handling and suggestion logic

Collapse two near-identical specifier blocks into a single conditional,
and factor out shared suggestion construction in post-visit processing.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: remove hardcoded Button from lint performance rule fallback suggestion

When no actual member usage is detected, use a generic "Use named
imports instead" instead of suggesting a nonexistent \`import { Button }\`.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

* fix: also exclude locale paths from wildcard import check

Locale files only export a default, so `import * as X from
'antd/locale/en_US'` has no tree-shaking penalty just like the default
import form. Exclude locale paths from both namespace and default
import checks for consistency.

Also correct spec.md wording: the rule flags all default imports
(except locale), not just subpath defaults.

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-05-13 15:58:41 +08:00
Alex Zhu 152ce250ea fix: track JSX ancestry to avoid lint false positives in Checkbox.Group/Radio.Group (#93)
Co-authored-by: Claude Opus 4.7 <noreply@anthropic.com>
2026-04-28 14:19:22 +08:00
afc163 eca9f6165e fix: opt-out auto bug reporting in SKILL.md and MCP prompt (#85)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-17 19:19:29 +08:00
高艳兵 13e6448541 feat: support configurable lint import sources (#81)
* feat: support configurable lint import sources

Allow `antd lint` to recognize additional wrapper import roots via `--import-source` while keeping the default antd-only behavior unchanged.

* fix: preserve lint wildcard import checks for import-source subpaths

* fix: align lint import-source wildcard checks

* refactor: rename lint import-source option to antd-alias

* docs: document antd-alias in README files
2026-04-13 16:36:53 +08:00
afc163 90a525ee65 feat(mcp): add tool annotations for better IDE integration (#79)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-03 19:46:55 +08:00
afc163 aad2fc0738 feat: add antd v3 support (#77)
* docs: add antd v3 support design spec

Design for adding antd 3.x support to enable migration assistance
and legacy project queries. Covers data extraction, command support
matrix, and enhanced v3→v4 migration knowledge.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* feat: add antd v3 support

- Add v3 data extraction with demo format compatibility
- Generate v3.json and v3.26.20.json data files
- Add v3-to-v4 migration knowledge module
- Return UNSUPPORTED_VERSION_FEATURE for token/semantic on v3
- Update spec.md with v3 support documentation

Closes #66

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address PR review comments

- Fix regex \Z anchor to $ for JS compatibility in demo extractor
- Fix v3 theming docs URL (3x.ant.design)
- Remove redundant Tree filterTreeNode migration entry
- Correct Table render description (signature unchanged)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update design spec for v3 support

- Add language tag to code block
- Fix v3 theming docs URL to 3x.ant.design
- Update migration module path to match implementation
- Correct BackTop and Less variables migration notes

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* fix: address remaining PR review comments

- Fix enMatch regex to use lookahead for zh-CN section
- Make JSX code block regex more flexible (jsx or js)
- Correct ConfigProvider migration description (introduced in v4)
- Update design doc with correct module path and migration notes
- Update snapshot for v3 Watermark component

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* test: add comprehensive v3 test coverage

- Add e2e tests for `antd migrate 3 4` command
- Add v3 error tests for token and semantic commands
- Add v3 version detection tests
- Add v3 data loading tests (components, snapshots)
- Add tests for v3-specific components (Mention, Icon, LocaleProvider)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 18:54:02 +08:00
afc163 0a3b0e3b5f chore: upgrade dependencies (#76)
* chore: upgrade dependencies

- @modelcontextprotocol/sdk: 1.27.1 → 1.29.0
- @vitest/coverage-v8: 3.2.4 → 4.1.2
- commander: 13.1.0 → 14.0.3
- oxc-parser: 0.121.0 → 0.123.0
- typescript: 5.7.0 → 5.9.3 (keep v5 for stability)
- vitest: 3.0.0 → 4.1.2

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: update Quick Start with more commands

Add list, doc, env, usage commands to Quick Start examples.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* chore: require Node >= 20 for Commander v14 compatibility

- Update engines.node from >=18.0.0 to >=20.0.0
- Update tsup build target from node18 to node20
- Update documentation (spec.md, CLAUDE.md)

Commander v14 requires Node >= 20.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-04-02 17:53:59 +08:00
afc163 210243b1f9 fix: remove utoo from package manager and build tool lists
utoo is not a recognized package manager or build tool framework.
Also improve version regex to handle pre-release version strings.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-27 14:07:22 +08:00
afc163 65896953c6 docs: fix markdown lint issues and add missing format examples 2026-03-27 14:07:22 +08:00
afc163 413e48a48b feat: expand build tools list with more frameworks and bundlers 2026-03-27 14:07:22 +08:00
afc163 d07b91f192 docs: add env command to spec.md 2026-03-27 14:07:22 +08:00
afc163 6fdfae6fe8 refactor(lint): rewrite all rules with oxc-parser AST analysis (#40) 2026-03-25 17:36:21 +08:00
afc163 700b1846ad fix: address CI failure and PR review feedback
CI fix:
- Fix TS error: avoid passing interface type to Record<string, unknown> param

Review feedback addressed:
- toMcpResult: check error === true instead of just 'error' in data
- antd_changelog: reject partial v1/v2 with INVALID_ARGUMENT error
- list.ts: output [] for JSON when no components; keep category in JSON output
- prompts: add missing antd_changelog to tool workflow section
- semantic test: use Affix instead of duplicate Button test
- Add cross-version diff test and version-order validation test
- Add antd_semantic success test and partial v1/v2 test for MCP
- spec.md: "dedup" → "avoid duplicate calls"
- README: add note about --version flag for MCP server

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 12:23:43 +08:00
afc163 3d312bc463 docs: update spec.md with antd mcp command
Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-25 11:03:34 +08:00
afc163 f1554dd0ab fix(lint): avoid false positives for deprecated prop rule on unrelated components (#36)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 23:38:11 +08:00
afc163 d8d582b052 docs: fix command count and update agent list in README and spec
Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 19:40:24 +08:00
afc163 95767651c7 feat: add ecosystem peerDeps compatibility check to antd doctor (#30)
Co-authored-by: gemini-code-assist[bot] <176961590+gemini-code-assist[bot]@users.noreply.github.com>
2026-03-24 15:40:57 +08:00
afc163 39a142c13b fix: improve lint rules accuracy and add usage category (#29)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-24 15:39:34 +08:00
afc163 617d0a2e1a perf: gzip data files at pack time to reduce npm package size by 81% (#28)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 14:36:35 +08:00
afc163 46e9f19ae9 chore: remove dead code and update spec docs (#22)
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-24 10:50:35 +08:00
afc163 b3f4958235 docs: update spec.md with bug and bug-cli commands (14 commands) 2026-03-23 19:15:53 -07:00
afc163 e2f81c0624 docs: add agent skill file and installation guides (#19)
* docs: add bug fixes round 2 plan

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* docs: add agent skill file and update README with installation guides

Add docs/skill.md — a scenario-driven skill file that teaches code agents
when and how to use each @ant-design/cli command. Update both READMEs with
installation instructions for Claude Code, Cursor, Codex, and Gemini CLI.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: add Claude Code skill frontmatter and improve agent install guides

- Add YAML frontmatter to docs/skill.md (name, description, allowed-tools)
  so it works as a proper Claude Code skill when copied to .claude/skills/
- Update README install instructions: Claude Code uses skill directory,
  Cursor uses .mdc rule, Codex/Gemini append to their config files
- Remove redundant "When to Use" section (covered by frontmatter description)

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: restructure skill to skills/ directory and simplify install guide

- Move docs/skill.md to skills/antd/SKILL.md (follows skills standard)
- Rename src/commands/diff.ts to changelog.ts (matches actual command name)
- Replace per-agent install guides with `npx skills add`
- Fix incorrect `antd changelog diff` and `antd diff` references
- Update package.json files field to include skills/

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

* docs: restore CLI install instructions in README

Keep npm/pnpm/bun global install as the primary installation method,
with skill-based install as a supplementary option.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-03-23 14:59:39 +08:00
afc163 ec69a6ac8f docs: update spec for type import exclusion, sub-component detection, deprecated messages, and extraction fix 2026-03-20 15:26:36 +08:00
afc163 7ead21a053 fix(round-1): normalize v prefix in migrate, fix cssinjs-compat message, update spec 2026-03-20 15:23:29 +08:00
afc163 02b5cded76 feat(usage): add --filter / -f option to filter by component name 2026-03-19 18:45:05 +08:00
afc163 2743ff0401 docs: add doc command to spec/README and add missing tests (#16)
Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Co-authored-by: Claude Opus 4.6 <noreply@anthropic.com>
2026-03-19 18:23:04 +08:00