Skip to content

chore: standardize repository maintenance#81

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

chore: standardize repository maintenance#81
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.

Summary by CodeRabbit

  • New Features

    • 更新了站点与预览发布配置,支持新的构建输出目录,并可根据部署环境自动切换访问前缀。
    • 新增中文文档,补充安装、使用示例和完整 API 说明。
  • Bug Fixes

    • 调整了相关脚本与路径配置,减少部署和预览时的构建差异。
  • Documentation

    • 重写并扩展了英文 README,补充亮点、示例、开发与发布说明。
  • Chores

    • 新增代码检查、依赖更新和自动化工作流配置。

@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)
motion Ready Ready Preview, Comment Jun 29, 2026 6:29am

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-motion-preview-pr-81.surge.sh
📝 Commit237a85c
⏱️ Build time18.666s
📦 Size1.6 MB (no change) · 49 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 237a85c · react-component-motion-preview-pr-81.surge.sh (open ↗) · 2026-06-29 06:31:10 UTC

🤖 Powered by surge-preview

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

@afc163, you've reached your PR review limit, so we couldn't start this review.

Next review available in: 58 minutes

Your organization has used up its prepaid credits, and credit purchases are no longer available. Enable usage-based reviews in Billing to keep reviews running — you're only billed for reviews past your plan's rate limits ($0.25/file).

How can I continue?

After more reviews become available, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

To avoid repeated limits, reduce automatic review volume by pausing incremental auto-reviews earlier, using label-based review opt-in, excluding WIP or generated PR titles, or requesting reviews manually when the PR is ready. If your team needs uninterrupted high-volume reviews, an organization admin can enable usage-based reviews.

How do review limits work?

CodeRabbit enforces per-developer PR review limits for each organization. Most developers receive the normal plan review availability.

For paid Pro and Pro+ PR reviews, CodeRabbit uses adaptive limits for sustained high-volume activity. When a developer's recent PR review activity reaches the 95th percentile or higher among CodeRabbit users, additional reviews become available more gradually as earlier reviews age out of the rolling window.

Please see our Fair Usage Limits Policy for further information, and refer to the rate limits docs for additional details.

Review details
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 04b8cc7b-b021-40af-bb8a-40a9bc4211be

📥 Commits

Reviewing files that changed from the base of the PR and between e1e4655 and 237a85c.

📒 Files selected for processing (1)
  • .github/workflows/react-component-ci.yml

Walkthrough

此 PR 将文档站点输出目录从 .doc 统一改为 docs-dist,引入基于 GH_PAGES 环境变量的路径切换,新增多个 GitHub Actions 工作流(测试、CodeQL、React Doctor、Surge 预览),并全面更新 README(含新增中文版)、仓库元数据与工具链配置。

Changes

文档站点与仓库自动化

Layer / File(s) Summary
站点路径、构建输出与类型映射
.dumirc.ts, tsconfig.json, vercel.json, .gitignore
basePath/publicPath 根据 GH_PAGES/motion// 之间切换,outputPath 改为 docs-dist;TypeScript 路径映射新增 @rc-component/motion@@/* 改指 .dumi/tmp/*vercel.json 新增 umijs 框架配置;.gitignore 补充 docs-dist/.vercel
发布脚本与工具链配置
package.json, .husky/pre-commit, .prettierignore
docs:deploy 目标改为 docs-dist,新增 gh-pages 脚本与 postpublish 调整,升级 devDependencies,新增 publishConfigtypes 字段;pre-commit 新增 npx lint-staged.prettierignore 补充常见忽略规则。
CI 测试、诊断与依赖更新工作流
.github/workflows/react-component-ci.yml, .github/workflows/react-doctor.yml, .github/workflows/codeql.yml, .github/dependabot.yml, .github/workflows/main.yml
新增复用测试模板工作流;新增 React Doctor 工作流(含权限与并发控制);新增 CodeQL 安全扫描工作流;新增 Dependabot 每周自动依赖更新配置;移除旧 main.yml 测试工作流。
Surge PR 预览部署工作流
.github/workflows/surge-preview.yml
新增 surge-preview.yml:配置并发控制、最小权限、Surge token 检测、npm install + npm run build 构建步骤,以及 afc163/surge-preview 调用(dist: docs-dist)。
README、中文文档与仓库元数据
README.md, README.zh-CN.md, LICENSE, .github/FUNDING.yml
README.md 重构为安装、用法、API(CSSMotion/CSSMotionList/Ref)、开发与发布章节;新增完整 README.zh-CN.md 中文文档;补充 MIT LICENSEFUNDING.yml 精简为 githubopen_collective 两个有效条目。

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~15 minutes

Suggested reviewers

  • zombieJ

Poem

🐇 小兔跳跳改路径,
docs-dist 取代旧 .doc
CI 工作流齐登场,
CodeQL 扫描保安全,
中英 README 双双亮,
仓库焕新迎春光! 🌸

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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.
✨ 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.

@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 98.09%. Comparing base (de9bede) to head (237a85c).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #81   +/-   ##
=======================================
  Coverage   98.09%   98.09%           
=======================================
  Files          11       11           
  Lines         421      421           
  Branches      121      119    -2     
=======================================
  Hits          413      413           
  Misses          7        7           
  Partials        1        1           

☔ 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.

@gemini-code-assist gemini-code-assist 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.

Code Review

This pull request updates the project's build, documentation, and deployment configurations, including transitioning the documentation output directory to docs-dist, adding a Vercel configuration, and modernizing the README. It also updates the TypeScript path mappings for the dumi temporary directory. The feedback points out that excluding the .dumi directory in tsconfig.json will prevent TypeScript from resolving the generated type definitions under .dumi/tmp/*, and suggests removing it from the exclusion list.

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 tsconfig.json Outdated

@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: 2

🧹 Nitpick comments (2)
.github/workflows/cloudflare-pages-preview.yml (1)

26-41: 📐 Maintainability & Code Quality | 🔵 Trivial | 💤 Low value

重复的密钥校验条件可合并为作业级 guard。

Install dependenciesBuild siteDeploy preview 三步重复了完全相同的三元条件表达式,Skip 步骤则是其取反。后续若新增配置项(如再加一个变量),需要同步修改 4 处,易遗漏。建议在 job 级别用 outputs 或单独的判断步骤集中处理,例如:

♻️ 建议的重构方向
   preview:
     runs-on: ubuntu-latest
     env:
       CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
       CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
       CLOUDFLARE_PAGES_PROJECT: ${{ vars.CLOUDFLARE_PAGES_PROJECT }}
       PREVIEW: true
     steps:
       - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
         with:
           persist-credentials: false
+      - name: Check configuration
+        id: cfg
+        run: |
+          if [ -n "$CLOUDFLARE_API_TOKEN" ] && [ -n "$CLOUDFLARE_ACCOUNT_ID" ] && [ -n "$CLOUDFLARE_PAGES_PROJECT" ]; then
+            echo "enabled=true" >> "$GITHUB_OUTPUT"
+          else
+            echo "Cloudflare Pages preview is not configured; skip deployment."
+            echo "enabled=false" >> "$GITHUB_OUTPUT"
+          fi
       - name: Install dependencies
-        if: ${{ env.CLOUDFLARE_API_TOKEN != '' && env.CLOUDFLARE_ACCOUNT_ID != '' && env.CLOUDFLARE_PAGES_PROJECT != '' }}
+        if: ${{ steps.cfg.outputs.enabled == 'true' }}
         run: npm install
🤖 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/cloudflare-pages-preview.yml around lines 26 - 41, The
Cloudflare Pages preview workflow repeats the same secret-check condition across
multiple steps, while the skip step uses the inverse, making the logic hard to
maintain. Consolidate the configuration check into a single job-level guard or
one dedicated condition step in cloudflare-pages-preview.yml, then have Install
dependencies, Build site, and Deploy preview reuse that shared result instead of
duplicating the expression.
.github/workflows/codeql.yml (1)

3-9: 🚀 Performance & Scalability | 🔵 Trivial | 💤 Low value

建议补充并发控制以取消过期运行。

本 PR 为其它诊断工作流(如 react-doctor.yml)添加了 concurrency 控制,但 CodeQL 工作流缺少同样配置。在频繁推送时会并行跑多次分析,浪费 runner 资源。建议添加:

♻️ 建议补充
 on:
   push:
     branches: ['master']
   pull_request:
     branches: ['master']
   schedule:
     - cron: '24 18 * * 1'
+
+concurrency:
+  group: codeql-${{ github.event.pull_request.number || github.ref }}
+  cancel-in-progress: true
🤖 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/codeql.yml around lines 3 - 9, CodeQL workflow is missing
the same concurrency cancellation behavior used elsewhere, so repeated pushes
can leave stale runs executing in parallel. Update the workflow definition in
the CodeQL configuration to add a concurrency group that keys off the
workflow/ref context and enables cancellation of in-progress older runs, using
the existing workflow structure near the trigger configuration.
🤖 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-component-ci.yml:
- Around line 7-8: The reusable workflow invocation in react-component-ci is
over-sharing secrets and should be tightened. In the workflow call that uses
test-utoo.yml, remove secrets: inherit and pass only the CODECOV_TOKEN
explicitly, since that is the only secret the downstream workflow needs. Also
update the workflow reference from `@main` to a specific commit SHA if possible to
reduce supply-chain risk; if SHA pinning is not available yet, still ensure the
secret scope is limited in the call site.

In `@README.md`:
- Around line 130-150: The Release section in README is inaccurate: `npm run
prepublishOnly` is only a pre-publish hook and does not perform the actual
release with `@rc-component/np`. Update the release instructions to point to the
real publish/release command used by the project (such as the
`release`/`publish` script or invoking `@rc-component/np` directly) and keep the
Development command list unchanged.

---

Nitpick comments:
In @.github/workflows/cloudflare-pages-preview.yml:
- Around line 26-41: The Cloudflare Pages preview workflow repeats the same
secret-check condition across multiple steps, while the skip step uses the
inverse, making the logic hard to maintain. Consolidate the configuration check
into a single job-level guard or one dedicated condition step in
cloudflare-pages-preview.yml, then have Install dependencies, Build site, and
Deploy preview reuse that shared result instead of duplicating the expression.

In @.github/workflows/codeql.yml:
- Around line 3-9: CodeQL workflow is missing the same concurrency cancellation
behavior used elsewhere, so repeated pushes can leave stale runs executing in
parallel. Update the workflow definition in the CodeQL configuration to add a
concurrency group that keys off the workflow/ref context and enables
cancellation of in-progress older runs, using the existing workflow structure
near the trigger configuration.
🪄 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: 3d81783f-fdee-4a12-b328-620c6fc25aaf

📥 Commits

Reviewing files that changed from the base of the PR and between de9bede and 409bb9b.

📒 Files selected for processing (14)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/workflows/cloudflare-pages-preview.yml
  • .github/workflows/codeql.yml
  • .github/workflows/main.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • now.json
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (2)
  • now.json
  • .github/workflows/main.yml

Comment thread .github/workflows/react-component-ci.yml Outdated
Comment thread README.md
@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/afc163s-projects?upgradeToPro=build-rate-limit

@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

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

Review the following changes in direct dependencies. Learn more about Socket for GitHub.

Diff Package Supply Chain
Security
Vulnerability Quality Maintenance License
Addednpm/​husky@​9.1.71001006280100
Updatednpm/​@​types/​jest@​30.0.0 ⏵ 29.5.14100 +110077 +180100
Addednpm/​cross-env@​10.1.010010010082100
Addednpm/​@​testing-library/​jest-dom@​6.9.110010010089100
Addednpm/​lint-staged@​16.4.010010010097100
Addednpm/​prettier@​3.9.1991009798100

View full report

@afc163 afc163 merged commit 4c0ecd9 into master Jun 29, 2026
15 checks passed
@afc163 afc163 deleted the codex/standardize-rc-config branch June 29, 2026 07:02
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