Skip to content

chore: standardize repository config#228

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

chore: standardize repository config#228
afc163 merged 33 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)
resize-observer Ready Ready Preview, Comment Jun 29, 2026 6:35am

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

✅ Preview is ready!

PR preview ✅ Ready ✅ Ready
🔗 Preview https://react-component-resize-observer-preview-pr-228.surge.sh
📝 Commitbd31c40
⏱️ Build time21.925s
📦 Size1.5 MB (no change) · 40 files
🪵 LogsView logs
📱 MobileScan to open preview on mobile

↩️ Previous: ⚡️ bd31c40 · react-component-resize-observer-preview-pr-228.surge.sh (open ↗) · 2026-06-29 06:30:34 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: a6d3bef0-bb2a-4fa1-93a2-8b9ab45f099b

📥 Commits

Reviewing files that changed from the base of the PR and between ec71c1e and bd31c40.

📒 Files selected for processing (14)
  • .dumirc.ts
  • .fatherrc.ts
  • .github/dependabot.yml
  • .github/workflows/codeql.yml
  • .github/workflows/react-component-ci.yml
  • .github/workflows/react-doctor.yml
  • .github/workflows/surge-preview.yml
  • .husky/pre-commit
  • .prettierignore
  • LICENSE
  • README.md
  • README.zh-CN.md
  • package.json
  • tsconfig.json

Walkthrough

更新了包名与文档站点配置,调整 README、示例和首页标题,并同步改写构建、发布、Vercel、GitHub Actions、Dependabot 和资助配置。

Changes

包名与文档站点

Layer / File(s) Summary
Dumi 配置与别名
\.dumirc.ts, tsconfig.json
Dumi 配置增加了别名、GitHub Pages 的 base/publicPath、输出目录和主题名称,TypeScript 路径映射同步切换到新的包名。
构建与发布脚本
package.json, .gitignore, vercel.json
构建脚本、文档发布命令、忽略规则和 Vercel 部署配置都改为围绕 docs-dist 产物运行。
README 与示例
README.md, docs/index.md, examples/*.tsx
README、首页和示例改用新的包名,并更新了安装、用法和 API 文档。

GitHub 自动化

Layer / File(s) Summary
CodeQL 与测试工作流
.github/workflows/codeql.yml, .github/workflows/react-component-ci.yml
CodeQL 触发器和 action 版本被更新,测试复用工作流改为只读权限并切到新的下游定义。
预览与诊断工作流
.github/workflows/react-doctor.yml, .github/workflows/surge-preview.yml
新增 React Doctor 和 Surge Preview 工作流,配置了 PR/master 触发、并发取消、权限和执行步骤。
Dependabot 与资助配置
.github/dependabot.yml, .github/FUNDING.yml
Dependabot 更新规则移除了 ignore 列表,资助配置新增了 GitHub 和 Open Collective 渠道。

Estimated code review effort

🎯 4 (Complex) | ⏱️ ~45 minutes

Suggested reviewers

  • zombieJ

Poem

我是一只小兔兔,
跳进新的文档屋。
预览灯亮,胡萝卜香,
代码和页面一起咕噜转。
啾~发布完成啦 🐇

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed 标题准确概括了此次对仓库配置、CI、部署和文档相关设置的标准化更新。
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

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit bd31c40.

@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 94.28%. Comparing base (81f5707) to head (bd31c40).

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #228   +/-   ##
=======================================
  Coverage   94.28%   94.28%           
=======================================
  Files           6        6           
  Lines         140      140           
  Branches       41       41           
=======================================
  Hits          132      132           
  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 repository to use the scoped package name @rc-component/resize-observer. It modernizes the documentation, updates example imports, refactors build and deployment scripts (including adding Vercel configuration), and updates dependency management. Feedback is provided to improve cross-platform compatibility in the gh-pages script using cross-env and to align TypeScript path mappings with bundler aliases in tsconfig.json.

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

🧹 Nitpick comments (2)
.github/workflows/react-component-ci.yml (1)

7-8: 🔒 Security & Privacy | 🔵 Trivial

复用工作流引用与 secrets 传递方式可收紧(可选)。

经核查下游工作流 test-utoo.yml,其仅在 Codecov 步骤显式使用 CODECOV_TOKEN。建议:

  • secrets: inherit 改为显式映射 CODECOV_TOKEN,遵循最小权限原则。
  • 引用 test-utoo.yml@main 属组织内常见做法,固定至 Commit SHA 可进一步增强供应链安全,视团队策略而定。

示例:

    uses: react-component/rc-test/.github/workflows/test-utoo.yml@main
    secrets:
      CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
🤖 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/react-component-ci.yml around lines 7 - 8, The reusable
workflow invocation in the CI workflow currently passes all secrets via inherit,
but the downstream test-utoo.yml only needs CODECOV_TOKEN. Update the workflow
call to map CODECOV_TOKEN explicitly instead of inheriting all secrets, and keep
the uses reference to
react-component/rc-test/.github/workflows/test-utoo.yml@main unless your team
decides to pin it to a specific commit SHA for stricter supply-chain control.

Source: Linters/SAST tools

tsconfig.json (1)

13-16: 📐 Maintainability & Code Quality | 🔵 Trivial

补齐 /es 子路径的 TypeScript 映射以对齐构建配置

.dumirc.ts 已为 @rc-component/resize-observer/es 配置了运行时别名,但 tsconfig.json 仅映射了裸包名。当前代码库虽未使用该子路径导入,但补齐映射可防止未来引入 /es 导入时导致编辑器类型解析失败或 tsc --noEmit 报错。

建议修改
   "paths": {
     "`@/`*": ["src/*"],
     "@@/*": [".dumi/tmp/*"],
     "`@rc-component/resize-observer`": ["src/index.tsx"],
+    "`@rc-component/resize-observer/es`": ["src/index.tsx"],
+    "`@rc-component/resize-observer/es/`*": ["src/*"]
   }
🤖 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 `@tsconfig.json` around lines 13 - 16, The TypeScript path mapping in
tsconfig.json only covers the bare `@rc-component/resize-observer` package, while
the build alias also supports the /es subpath. Update the paths configuration
alongside the existing `@rc-component/resize-observer` entry so
`@rc-component/resize-observer/es` resolves to the same source target, keeping
TypeScript resolution aligned with the runtime alias setup.
🤖 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.

Nitpick comments:
In @.github/workflows/react-component-ci.yml:
- Around line 7-8: The reusable workflow invocation in the CI workflow currently
passes all secrets via inherit, but the downstream test-utoo.yml only needs
CODECOV_TOKEN. Update the workflow call to map CODECOV_TOKEN explicitly instead
of inheriting all secrets, and keep the uses reference to
react-component/rc-test/.github/workflows/test-utoo.yml@main unless your team
decides to pin it to a specific commit SHA for stricter supply-chain control.

In `@tsconfig.json`:
- Around line 13-16: The TypeScript path mapping in tsconfig.json only covers
the bare `@rc-component/resize-observer` package, while the build alias also
supports the /es subpath. Update the paths configuration alongside the existing
`@rc-component/resize-observer` entry so `@rc-component/resize-observer/es` resolves
to the same source target, keeping TypeScript resolution aligned with the
runtime alias setup.

ℹ️ Review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 4208fed4-9e6c-40e4-b49f-20d0123f10d8

📥 Commits

Reviewing files that changed from the base of the PR and between 81f5707 and ec71c1e.

📒 Files selected for processing (17)
  • .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
  • docs/index.md
  • examples/basic.tsx
  • examples/collection.tsx
  • examples/debug.tsx
  • examples/renderProps.tsx
  • package.json
  • tsconfig.json
  • vercel.json

@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

@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

@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/​node@​24.13.2 ⏵ 26.0.11001008196100
Addednpm/​glob@​13.0.6961009985100

View full report

@afc163
afc163 merged commit 00cb0e6 into master Jun 29, 2026
12 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