Skip to content

chore: standardize repository config#708

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

chore: standardize repository config#708
afc163 wants to merge 12 commits into
masterfrom
codex/standardize-rc-config

Conversation

@afc163

@afc163 afc163 commented Jun 26, 2026

Copy link
Copy Markdown
Member

Summary

  • Redesign README with npm/bundlephobia badges, Ant Design brand context, installation, usage, API, development, and release sections.
  • Standardize repository config: package scripts, dumi/father/tsconfig, FUNDING, Dependabot, Vercel preview, Surge preview fallback, React Doctor, and CodeQL workflow.
  • Update docs demos to use the scoped package import style and move dumi config to TypeScript.

Test plan

  • npm run tsc
  • npm test -- --runInBand
  • npm run lint
  • npm run build
  • npx vercel build --yes

Refs ant-design/ant-design#58514

Summary by CodeRabbit

  • 新功能
    • 更新站点构建与预览配置,支持 GitHub Pages、Surge 预览和新的部署输出目录。
  • 文档
    • 全面重写英文文档,并新增完整中文文档,补充安装、示例、API 和开发说明。
  • Bug 修复
    • 调整示例与路径配置,提升文档站点在不同环境下的可用性。

@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 27, 2026 5:26am

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown

Review Change Stack

Warning

Review limit reached

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

More reviews will be available in 26 minutes and 34 seconds. Learn how PR review limits work.

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

⌛ How to resolve this issue?

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

🚦 How do rate 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.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 5771e5fc-8ec0-485c-a6e2-6dcd0c810797

📥 Commits

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

📒 Files selected for processing (3)
  • .github/workflows/surge-preview.yml
  • README.md
  • README.zh-CN.md

Walkthrough

对项目工具链进行全面更新:将文档站构建产物目录统一为 docs-dist,更新 dumirctsconfigvercel.jsonpackage.json 中的路径配置;新增 CodeQL、React Doctor、Surge Preview 三个 GitHub Actions 工作流;重写 README 并新增中文文档;清理示例文件中的冗余 React 导入。

Changes

构建工具链与 CI/CD 更新

Layer / File(s) Summary
文档站构建与输出路径配置
.dumirc.ts, tsconfig.json, vercel.json, package.json, .gitignore
dumirc 新增 basePath/publicPath(基于 GH_PAGES 环境变量)并设置 outputPath: 'docs-dist'tsconfig 更新路径别名与 include/exclude 范围;vercel.json 切换为 umijs 框架并将产物目录改为 docs-distpackage.json 新增 types 字段、重构 docs:* 脚本并升级 devDependencies.gitignore 新增 docs-dist.vercel、整体忽略 .dumi/ 等条目。
CI/CD 工作流新增与更新
.github/workflows/codeql.yml, .github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml, .github/workflows/react-component-ci.yml, .github/dependabot.yml, .github/FUNDING.yml
新增 CodeQL(JavaScript 矩阵分析)、React Doctor(PR 检查)、Surge Preview(PR 预览部署至 docs-dist)三个工作流;CI 工作流限定 master 分支触发并将可复用工作流引用更新为 test-utoo.yml;移除 Dependabot ignore 规则;启用 FUNDING 中的 GitHub Sponsors 与 Open Collective。
README 重写与示例代码清理
README.md, README.zh-CN.md, docs/index.md, docs/examples/*
用结构化格式重写英文 README(徽标、API 表格、Methods 表格)并新增完整中文文档;docs/index.md 修正标题引号;各示例文件删除 import React from 'react' 并为含 console 调用的文件添加 /* eslint no-console:0 */

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Possibly related PRs

  • react-component/upload#662:该 PR 同样对 .dumirc 中的 @rc-component/upload 别名配置进行了迁移,与本次 .dumirc.ts 的路径解析调整直接相关。

Suggested reviewers

  • zombieJ

🐇 跳跳兔提笔写小诗

docs-dist 成新家,路径别名焕新花,
CodeQL 守护代码安,Surge 预览 PR 无忧愁,
README 中英两相宜,React 导入轻轻去,
工具链齐,兔兔乐悠悠! 🎉

🚥 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 标题准确概括了本次以仓库配置标准化为主的变更,且简洁明确。
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.

@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
📝 Commit6f019d2
⏱️ Build time31.063s
📦 Size1.7 MB (+1.6 KB ⬆️) · 61 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ 6f019d2 · react-component-upload-preview-pr-708.surge.sh (open ↗) · 2026-06-27 18:10:10 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 6f019d2.

@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 (6f019d2).

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
Updatednpm/​@​types/​jest@​30.0.0 ⏵ 29.5.14100 +110077 +180100
Addednpm/​cross-env@​10.1.010010010082100
Addednpm/​@​testing-library/​react@​15.0.710010010087100

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