Skip to content

chore: standardize repository config#708

Open
afc163 wants to merge 28 commits into
masterfrom
codex/standardize-rc-config
Open

chore: standardize repository config#708
afc163 wants to merge 28 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)
upload Ready Ready Preview, Comment Jun 28, 2026 4:39am

@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

更新了文档站构建与部署配置,新增和调整了 GitHub Actions 工作流,重写了英文与中文 README,并清理了示例文件中的 React 默认导入与部分 lint 配置。

Changes

构建工具链、CI/CD 与文档更新

Layer / File(s) Summary
构建与输出路径
.dumirc.ts, tsconfig.json, vercel.json, .gitignore, .prettierignore
basepublicPath 根据 GH_PAGES 切换;TypeScript 路径映射、include/exclude 范围和部署输出目录改为围绕 docs-dist;忽略规则同步加入相关构建产物、临时目录和格式化排除项。
包元信息与脚本
package.json
更新包描述、HTTPS 仓库地址、types 声明、构建/发布脚本、依赖版本和 publishConfig.access
CI 工作流与仓库配置
.github/FUNDING.yml, .github/dependabot.yml, .github/workflows/codeql.yml, .github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml, .github/workflows/react-component-ci.yml
调整 funding 和 Dependabot 配置;新增 CodeQL、React Doctor、Surge Preview 工作流;并更新现有 CI 工作流的触发条件与可复用测试工作流引用。
README 与示例文档
README.md, README.zh-CN.md, docs/index.md, docs/examples/*.tsx
重写英文和中文 README,调整 docs 页面标题,并清理多个示例文件中的 React 默认导入与 console lint 配置。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Possibly related PRs

Suggested reviewers

  • zombieJ

Poem

🐇 我蹦进 docs-dist,把新家收拾亮,
CodeQL 眨眨眼,工作流跑得忙。
README 换新装,中英都清爽,
小兔一笑:上传小站,今天真开朗。

🚥 Pre-merge checks | ✅ 5
✅ Passed checks (5 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了本次对仓库配置、文档与工作流的标准化调整。
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.

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-upload-preview-pr-708.surge.sh
📝 Commit0fdcc9d
⏱️ Build time31.229s
📦 Size1.7 MB · 61 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 0fdcc9d · react-component-upload-preview-pr-708.surge.sh (open ↗) · 2026-06-28 17:49:12 UTC

🤖 Powered by surge-preview

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 0fdcc9d.

@github-advanced-security

Copy link
Copy Markdown

You are seeing this message because GitHub Code Scanning has recently been set up for this repository, or this pull request contains the workflow file for the Code Scanning tool.

What Enabling Code Scanning Means:

  • The 'Security' tab will display more code scanning analysis results (e.g., for the default branch).
  • Depending on your configuration and choice of analysis tool, future pull requests will be annotated with code scanning analysis results.
  • You will be able to see the analysis results for the pull request's branch on this overview once the scans have completed and the checks have passed.

For more information about GitHub Code Scanning, check out the documentation.

@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 repository configuration, documentation, and build scripts to support modern Dumi-based documentation deployment. Key changes include updating .dumirc.ts, .gitignore, tsconfig.json, and package.json scripts, as well as rewriting the README.md and removing redundant React imports from examples. Feedback on these changes highlights two issues: first, the gh-pages script in package.json fails to propagate the GH_PAGES=1 environment variable to subsequent commands, which can be resolved by using a combined build script; second, the wildcard alias added in .dumirc.ts is invalid and redundant as Webpack/Rspack alias resolution does not support wildcards.

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 package.json Outdated
Comment thread .dumirc.ts 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 89.58%. Comparing base (d53036d) to head (0fdcc9d).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #708   +/-   ##
=======================================
  Coverage   89.58%   89.58%           
=======================================
  Files           6        6           
  Lines         317      317           
  Branches       90       94    +4     
=======================================
  Hits          284      284           
  Misses         33       33           

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

@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/​react@​15.0.710010010087100
Addednpm/​prettier@​3.9.1961009497100
Addednpm/​lint-staged@​16.4.010010010097100

View full report

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

🤖 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 10-12: The workflow job in react-component-ci currently references
react-component/rc-test test-utoo.yml with `@main` and uses secrets: inherit, so
update the uses target to a fixed commit SHA and replace inherited secrets with
an explicit secrets mapping containing only the required values. Keep the change
focused on the test job configuration in
.github/workflows/react-component-ci.yml.

In @.github/workflows/surge-preview.yml:
- Around line 25-42: In the surge preview workflow, the step-level conditionals
are reading secrets directly, which should be avoided; move SURGE_TOKEN into a
job-level env in the workflow and update the Build preview,
afc163/surge-preview, and Skip Surge preview steps to branch on env.SURGE_TOKEN
instead of secrets. Keep the existing behavior the same while using the job env
consistently across these steps.

In `@README.md`:
- Around line 99-104: The documented `abort` signature is out of sync with the
actual `Upload` API in `Upload.tsx`: README marks `abort(file?: RcFile)` as
optional, but the `Upload` ref method currently requires a `RcFile`. Update the
`Upload` component’s `abort` method signature (and any related `UploadRef` type)
to accept an optional `file`, matching `AjaxUploader.abort`, or else change the
README to match the real TypeScript contract; keep the symbols `Upload`,
`UploadRef`, and `abort` aligned.
🪄 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: 360642e1-fc2c-40f0-bd9e-bf413861dcf0

📥 Commits

Reviewing files that changed from the base of the PR and between d53036d and febbe36.

📒 Files selected for processing (21)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .gitignore
  • README.md
  • README.zh-CN.md
  • docs/examples/asyncAction.tsx
  • docs/examples/customRequest.tsx
  • docs/examples/directoryUpload.tsx
  • docs/examples/drag.tsx
  • docs/examples/dragDirectory.tsx
  • docs/examples/paste.tsx
  • docs/examples/pasteDirectory.tsx
  • docs/index.md
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (6)
  • docs/examples/directoryUpload.tsx
  • docs/examples/paste.tsx
  • docs/examples/dragDirectory.tsx
  • docs/examples/pasteDirectory.tsx
  • docs/examples/drag.tsx
  • docs/examples/asyncAction.tsx

Comment thread .github/workflows/react-component-ci.yml
Comment thread .github/workflows/surge-preview.yml
Comment thread README.md
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.

2 participants