Skip to content

chore: standardize repository tooling#640

Merged
afc163 merged 34 commits into
masterfrom
codex/standardize-rc-config
Jun 29, 2026
Merged

chore: standardize repository tooling#640
afc163 merged 34 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.

Tracking issue: ant-design/ant-design#58514

Scope

  • Redesign README.md and README.zh-CN.md with centered title, Ant Design ecosystem branding, aligned badges, scoped Bundlephobia badge, install command, Usage, Development, Release, and License sections.
  • Standardize package metadata, GitHub repo metadata, npm package name, package entry fields, types: "./es/index.d.ts", publishConfig, and release flow through @rc-component/np.
  • Align shared dependencies and scripts for React, testing-library, Jest/Vitest where existing, TypeScript, ESLint, Prettier, Less, dumi, father, Husky, lint-staged, and Dependabot.
  • Use the shared react-component/rc-test/.github/workflows/test-utoo.yml@main workflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.
  • Keep Vercel preview configuration compatible with docs-dist output and remove legacy now-build / Cloudflare Pages residue.
  • Keep API docs, demos, tests, TypeScript checks, funding metadata, and npm package files aligned with the repository standardization matrix.

Notes

  • No breaking runtime behavior is intended.
  • React peer dependency ranges are preserved when narrowing them would be a breaking change.
  • secrets: inherit is kept until react-component/rc-test#176 is merged, then it can be narrowed to explicit CODECOV_TOKEN forwarding.

@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
cascader Ready Ready Preview, Comment Jun 29, 2026 6:25am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Note

Reviews paused

It looks like this branch is under active development. To avoid overwhelming you with review comments due to an influx of new commits, CodeRabbit has automatically paused this review. You can configure this behavior by changing the reviews.auto_review.auto_pause_after_reviewed_commits setting.

Use the following commands to manage reviews:

  • @coderabbitai resume to resume automatic reviews.
  • @coderabbitai review to trigger a single review.

Use the checkboxes below for quick actions:

  • ▶️ Resume reviews
  • 🔍 Trigger review

Walkthrough

新增多个 CI/预览工作流与 Vercel 配置;重写 README 的安装、用法、API、开发和发布内容;并调整 package.json 脚本、开发依赖与资金配置。

Changes

CI 与预览自动化

Layer / File(s) Summary
React Doctor 工作流
.github/workflows/react-doctor.yml
新增 react-doctor 工作流的触发条件、权限、并发控制以及固定版本的检查和执行步骤。
CodeQL 与测试复用切换
.github/workflows/codeql.yml, .github/workflows/main.yml
CodeQL 工作流改为固定 commit 版本,测试工作流切换到新的可复用 test-utoo.yml
预览发布配置
.github/workflows/surge-preview.yml, vercel.json
新增 Surge 预览工作流,并补充 Vercel 构建配置。

文档与工具配置

Layer / File(s) Summary
README 概览
README.md
README 的介绍、安装、用法和示例内容被重组,顶部增加标题、徽标和 Highlights。
README API 与发布
README.md
README 的 API、开发、发布和许可内容被重写,并移除了旧的扩展章节。
脚本、依赖与资金配置
package.json, .github/FUNDING.yml
package.json 的脚本和开发依赖被更新,.github/FUNDING.yml 只保留了两个资助入口。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

Possibly related PRs

Suggested reviewers

  • zombieJ

Poem

(_/)
(•_•) 兔子跳过 CI 小径,
/ >🥕 预览和文档一起更新。
工作流闪闪,脚步轻轻,
代码安稳,胡萝卜也开心。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题简洁且与本次仓库工具链和 CI/工作流标准化的主要变更相关。
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch codex/standardize-rc-config

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands.

@gemini-code-assist gemini-code-assist Bot left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Code Review

This pull request updates the README.md with modern React usage examples, an updated API table, and updated development commands. It also fixes a typo in the lint script, adds a prettier script, and updates ESLint-related dependencies in package.json. The review feedback suggests simplifying the usage example in the README to avoid redundant state management that conflicts with the component's internal value handling.

Important

The consumer version of Gemini Code Assist on GitHub is being sunset. Starting June 18, 2026, new organization installations will be blocked, and all code review activity will officially cease on July 17, 2026.
For more details on the timeline and next steps, please review the Help Documentation.

Comment thread README.md Outdated
@codecov

codecov Bot commented Jun 26, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.39%. Comparing base (e98fa3b) to head (10bf0d3).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #640   +/-   ##
=======================================
  Coverage   99.39%   99.39%           
=======================================
  Files          22       22           
  Lines         661      661           
  Branches      204      204           
=======================================
  Hits          657      657           
  Misses          4        4           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
package.json (1)

41-41: 🧹 Nitpick | 🔵 Trivial

补充 .prettierignore

仓库已有 .prettierrc,但没有 .prettierignoreprettier --write --ignore-unknown . 会遍历整个仓库,建议补上忽略规则,避免误处理构建产物、依赖或产出目录。

🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In `@package.json` at line 41, Add a .prettierignore to complement the existing
Prettier setup so the prettier --write --ignore-unknown . script in package.json
does not traverse and format generated or third-party files. Update the ignore
rules to cover build outputs, dependency folders, and other generated artifacts,
and verify the ignore file is picked up by the existing Prettier workflow.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/react-doctor.yml:
- Around line 22-25: Pin the mutable workflow actions in
.github/workflows/react-doctor.yml by replacing actions/checkout@v5 and
millionco/react-doctor@v2 with their full commit SHAs, and update the checkout
step to disable credential persistence by setting persist-credentials to false.
Use the existing checkout and react-doctor steps as the targets for the change.

---

Nitpick comments:
In `@package.json`:
- Line 41: Add a .prettierignore to complement the existing Prettier setup so
the prettier --write --ignore-unknown . script in package.json does not traverse
and format generated or third-party files. Update the ignore rules to cover
build outputs, dependency folders, and other generated artifacts, and verify the
ignore file is picked up by the existing Prettier workflow.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 7caa662b-7a8f-4ffb-937d-61a9d1d87af8

📥 Commits

Reviewing files that changed from the base of the PR and between e98fa3b and 4063c7a.

📒 Files selected for processing (3)
  • .github/workflows/react-doctor.yml
  • README.md
  • package.json

Comment thread .github/workflows/react-doctor.yml Outdated
@afc163 afc163 force-pushed the codex/standardize-rc-config branch from 4063c7a to c232fba Compare June 26, 2026 03:36
@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-cascader-preview-pr-640.surge.sh
📝 Commit10bf0d3
⏱️ Build time22.416s
📦 Size2.1 MB · 112 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 10bf0d3 · react-component-cascader-preview-pr-640.surge.sh (open ↗) · 2026-06-29 06:25:57 UTC

🤖 Powered by surge-preview

@coderabbitai coderabbitai Bot left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 1

🧹 Nitpick comments (1)
.github/workflows/surge-preview.yml (1)

11-33: 🩺 Stability & Availability | 🔵 Trivial | ⚡ Quick win

给预览任务加并发分组,避免旧提交覆盖新预览。

同一个 PR 连续 push 时,这个 workflow 会并行保留多个 preview 运行;较早的 run 如果后完成,可能把较新的预览结果覆盖掉。

♻️ 建议修改
 jobs:
   preview:
+    concurrency:
+      group: surge-preview-${{ github.event.pull_request.number }}
+      cancel-in-progress: true
     runs-on: ubuntu-latest
🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

In @.github/workflows/surge-preview.yml around lines 11 - 33, The preview
workflow can run multiple `preview` jobs in parallel for successive pushes on
the same PR, allowing older runs to overwrite newer Surge previews. Add a
workflow-level concurrency group to the `preview` job in `surge-preview.yml` so
only the latest run for a given PR/branch stays active, and cancel any
in-progress older run when a new commit arrives. Use the existing `preview` job
as the target and key the group off the PR or ref context so the behavior
remains isolated per PR.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.

Inline comments:
In @.github/workflows/main.yml:
- Around line 5-6: Workflow reuse is currently pinned to an external branch ref,
which makes the dependency mutable and keeps inherited secrets exposed to future
upstream changes. Update the reusable workflow reference in the main workflow to
use a specific commit SHA for
react-component/rc-test/.github/workflows/test-utoo.yml, and then review the
secrets: inherit usage to narrow it if possible so only required secrets are
passed through.

---

Nitpick comments:
In @.github/workflows/surge-preview.yml:
- Around line 11-33: The preview workflow can run multiple `preview` jobs in
parallel for successive pushes on the same PR, allowing older runs to overwrite
newer Surge previews. Add a workflow-level concurrency group to the `preview`
job in `surge-preview.yml` so only the latest run for a given PR/branch stays
active, and cancel any in-progress older run when a new commit arrives. Use the
existing `preview` job as the target and key the group off the PR or ref context
so the behavior remains isolated per PR.
🪄 Autofix (Beta)

Fix all unresolved CodeRabbit comments on this PR:

  • Push a commit to this branch (recommended)
  • Create a new PR with the fixes

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: a6dd78fb-7fac-4043-95c9-0d4ff8e4a409

📥 Commits

Reviewing files that changed from the base of the PR and between 4063c7a and 2e384d7.

📒 Files selected for processing (8)
  • .github/FUNDING.yml
  • .github/workflows/codeql.yml
  • .github/workflows/main.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • README.md
  • package.json
  • vercel.json
✅ Files skipped from review due to trivial changes (3)
  • .github/FUNDING.yml
  • vercel.json
  • README.md
🚧 Files skipped from review as they are similar to previous changes (1)
  • .github/workflows/react-doctor.yml

Comment thread .github/workflows/main.yml Outdated
@vercel

vercel Bot commented Jun 26, 2026

Copy link
Copy Markdown

Deployment failed with the following error:

Resource is limited - try again in 24 hours (more than 100, code: "api-deployments-free-per-day").

Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit

@afc163 afc163 merged commit b7492d2 into master Jun 29, 2026
13 checks passed
@afc163 afc163 deleted the codex/standardize-rc-config branch June 29, 2026 07:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant