Skip to content

chore: standardize repository config#1072

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

chore: standardize repository config#1072
afc163 merged 36 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)
slider Ready Ready Preview, Comment Jun 29, 2026 6:37am

@github-actions

github-actions Bot commented Jun 26, 2026

Copy link
Copy Markdown

❌ Deploy failed

PR preview ❌ Failed ❌ Failed
🔗 Preview https://react-component-slider-preview-pr-1072.surge.sh (may be unavailable)
📝 Commit92e8649
🪵 LogsView logs
📋 Build log (last lines)
npm warn exec The following package was not found and will be installed: surge@0.27.4

   Running as afc163@gmail.com (Student)

        project: ./docs-dist
         domain: react-component-slider-preview-pr-1072.surge.sh
           size: 63 files, 1.8 MB

   Aborted - you do not have permission to publish to react-component-slider-preview-pr-1072.surge.sh

🤖 Powered by surge-preview

@coderabbitai

coderabbitai Bot commented Jun 26, 2026

Copy link
Copy Markdown
Contributor

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

更新了文档站点构建与部署路径,重写 README 和文档内容,并调整了 GitHub Actions、Dependabot、Funding 和 Vercel 配置。

Changes

文档站点与仓库自动化更新

Layer / File(s) Summary
构建输出与发布路径
.dumirc.ts, package.json, tsconfig.json, .gitignore, vercel.json, now.json, .github/workflows/surge-preview.yml
GH_PAGES 驱动的路径基准、docs-dist 输出、构建脚本、编译范围和预览部署配置一起改为新的站点流程。
文档正文重写
README.md, docs/index.md, docs/examples/slider.tsx
README 的品牌、示例、API 和发布章节重写,文档首页标题改为 @rc-component/slider,示例文件删去旧的注释代码。
工作流与维护配置
.github/FUNDING.yml, .github/dependabot.yml, .github/workflows/codeql.yml, .github/workflows/main.yml, .github/workflows/react-component-ci.yml, .github/workflows/react-doctor.yml
FUNDING 条目收窄,Dependabot 的 npm 规则重写,CodeQL 的 action 引用固定到提交哈希,并新增测试与诊断工作流配置。

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~25 minutes

Suggested reviewers

  • zombieJ

Possibly related PRs

  • react-component/slider#1065: Both PRs touch the same tooling/module-resolution layer by updating .dumirc.ts and tsconfig.json path/alias mappings to the @rc-component/slider namespace, so the main PR’s doc build aliasing changes are directly related to the retrieved PR’s namespace migration.

Poem

我是一只小兔,蹦进 docs-dist
路径和脚本一起换新衣。
预览、CI、首页都亮起,
GH_PAGES 下的月光更整齐,
胡萝卜香里,站点轻轻起。 🐰

🚥 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

React Doctor found no new issues. 🎉

Reviewed by React Doctor for commit 92e8649.

@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.67%. Comparing base (97bb0c7) to head (92e8649).

Additional details and impacted files
@@           Coverage Diff           @@
##           master    #1072   +/-   ##
=======================================
  Coverage   98.67%   98.67%           
=======================================
  Files          15       15           
  Lines         752      752           
  Branches      234      234           
=======================================
  Hits          742      742           
  Misses         10       10           

☔ 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
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 repository configuration, build scripts, and documentation for @rc-component/slider. Key changes include migrating documentation build paths to docs-dist, adding Vercel deployment configurations, updating TypeScript compiler options, and modernizing the README.md with updated API tables and examples. The review feedback focuses on improving cross-platform compatibility in package.json by using cross-env and fixing markdown formatting issues in the README.md API tables.

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 README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated
Comment thread README.md Outdated

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

Actionable comments posted: 4

🧹 Nitpick comments (1)
.github/workflows/codeql.yml (1)

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

建议在固定哈希后附带版本注释,便于维护。

将 action 固定到提交哈希是良好的安全实践。但裸哈希难以辨识对应版本,建议在每个引用后追加版本注释(例如 # v3.x.x),方便后续审计与升级。

♻️ 示例
-        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0
+        uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v4.x.x
🤖 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 26 - 43, The GitHub Actions
references are pinned to commit SHAs, but the entries in the workflow are
missing version comments, making maintenance and audits harder. Update the
existing action references in the codeQL workflow, especially the Checkout,
Initialize CodeQL, Autobuild, and Perform CodeQL Analysis steps, to include a
brief version annotation after each fixed hash so the pinned release can be
identified later without changing the security posture.
🤖 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 call is using a mutable ref and
inheriting all secrets, so update the workflow invocation to pin
react-component/rc-test/.github/workflows/test-utoo.yml to an immutable commit
SHA or tag instead of `@main`, and replace secrets: inherit with an explicit
secrets mapping that passes only the required credentials. Keep the fix in the
workflow job that calls the external workflow so the reference remains stable
and the secret surface is minimized.

In `@README.md`:
- Around line 68-69: The type description for ariaValueTextFormatterForHandle is
malformed because “Array function” is not a valid TypeScript type annotation.
Update the README entry for ariaValueTextFormatterForHandle so the type is
expressed consistently using a valid function signature, matching the intended
array-of-functions form referenced in the comment, and ensure the table text
clearly distinguishes a single formatter from an array of formatter functions.
- Around line 74-76: The README table entry for `dots` is inaccurate and implies
it only shows dots when `step` is greater than 1; update the description to
reflect the actual behavior of the `dots` prop. In the documentation table near
`disabled`, `dots`, and `dotStyle`, revise the `dots` text to say it shows dots
at each valid step position, keeping the wording aligned with how the prop is
used in the component API.

In `@tsconfig.json`:
- Around line 16-17: TypeScript 目前只解析了 `@rc-component/slider` 根入口,但文档示例还直接导入了
`@rc-component/slider/assets/index.css`,导致 `tsc --noEmit` 在检查 `docs/examples`
时找不到模块。请在 `tsconfig.json` 的 `paths` 中同步补齐 `@rc-component/slider/assets/*`
的映射,并确保它指向实际的 assets 物理路径;同时确认 `typings.d.ts` 里的 `declare module '*.css'`
仍然生效,以便 `README` 示例和 `docs/examples` 中的 CSS 导入都能通过类型检查。

---

Nitpick comments:
In @.github/workflows/codeql.yml:
- Around line 26-43: The GitHub Actions references are pinned to commit SHAs,
but the entries in the workflow are missing version comments, making maintenance
and audits harder. Update the existing action references in the codeQL workflow,
especially the Checkout, Initialize CodeQL, Autobuild, and Perform CodeQL
Analysis steps, to include a brief version annotation after each fixed hash so
the pinned release can be identified later without changing the security
posture.
🪄 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: 32e55e93-8b36-460e-be99-08905e91adea

📥 Commits

Reviewing files that changed from the base of the PR and between 97bb0c7 and d7181f7.

📒 Files selected for processing (16)
  • .dumirc.ts
  • .github/FUNDING.yml
  • .github/dependabot.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
  • docs/examples/slider.tsx
  • docs/index.md
  • now.json
  • package.json
  • tsconfig.json
  • vercel.json
💤 Files with no reviewable changes (3)
  • .github/workflows/main.yml
  • docs/examples/slider.tsx
  • now.json

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

@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

@socket-security

socket-security Bot commented Jun 27, 2026

Copy link
Copy Markdown

Warning

Review the following alerts detected in dependencies.

According to your organization's Security Policy, it is recommended to resolve "Warn" alerts. Learn more about Socket for GitHub.

Action Severity Alert  (click "▶" to expand/collapse)
Warn High
Obfuscated code: npm eslint-plugin-unicorn is 90.0% likely obfuscated

Confidence: 0.90

Location: Package overview

From: package.jsonnpm/eslint-plugin-unicorn@56.0.1

ℹ Read more on: This package | This alert | What is obfuscated code?

Next steps: Take a moment to review the security alert above. Review the linked package source code to understand the potential risk. Ensure the package is not malicious before proceeding. If you're unsure how to proceed, reach out to your security team or ask the Socket team for help at support@socket.dev.

Suggestion: Packages should not obfuscate their code. Consider not using packages with obfuscated code.

Mark the package as acceptable risk. To ignore this alert only in this pull request, reply with the comment @SocketSecurity ignore npm/eslint-plugin-unicorn@56.0.1. You can also ignore all packages with @SocketSecurity ignore-all. To ignore an alert for all future pull requests, use Socket's Dashboard to change the triage state of this alert.

View full report

@afc163 afc163 merged commit aaf9d2f into master Jun 29, 2026
14 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