chore: standardize repository setup#435
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
|
Note Reviews pausedIt 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 Use the following commands to manage reviews:
Use the checkboxes below for quick actions:
Walkthrough本 PR 更新了工作流与自动化、站点与构建配置,并重写中英文 README,同步调整脚本、依赖、资助信息和许可证。 ChangesCI/CD、部署与文档脚本更新
Estimated code review effort🎯 3 (Moderate) | ⏱️ ~25 minutes Possibly related PRs
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
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. Comment |
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #435 +/- ##
=======================================
Coverage 99.24% 99.24%
=======================================
Files 5 5
Lines 132 132
Branches 47 47
=======================================
Hits 131 131
Misses 1 1 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Code Review
This pull request updates the repository's configuration files, including build scripts, Vercel deployment settings, and documentation. Key changes include updating the prettier script, adding a tsc script, and refining the production site detection logic in .dumirc.ts. Feedback highlights two main issues: first, the updated prettier script uses a wildcard . which causes lint-staged to format the entire repository on every commit; second, the logic for determining isProdSite in .dumirc.ts can break local production previews, and should instead rely on checking GITHUB_ACTIONS.
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.
|
AI review follow-up:
|
|
Deployment failed with the following error: Learn More: https://vercel.com/react-component?upgradeToPro=build-rate-limit |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
|
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.
|
There was a problem hiding this comment.
Actionable comments posted: 1
🤖 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 `@package.json`:
- Line 35: The docs deployment command is missing the GH_PAGES build flag, so
`docs:build` runs with the wrong public path when invoked through `docs:deploy`.
Update the `docs:deploy` script in `package.json` to set `GH_PAGES` for the `npm
run docs:build` step before publishing with `gh-pages`, so `.dumirc.ts` switches
`base/publicPath` to `/collapse/` during deployment.
🪄 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: 1be4d3a9-8e95-4c6b-aa85-bdb1cee51828
📒 Files selected for processing (8)
.dumirc.ts.github/workflows/site-deploy.yml.github/workflows/surge-preview.ymlREADME.mdREADME.zh-CN.mdpackage.jsontsconfig.jsonvercel.json
✅ Files skipped from review due to trivial changes (3)
- tsconfig.json
- README.zh-CN.md
- README.md
🚧 Files skipped from review as they are similar to previous changes (3)
- vercel.json
- .dumirc.ts
- .github/workflows/surge-preview.yml
There was a problem hiding this comment.
Caution
Some comments are outside the diff and can’t be posted inline due to platform limitations.
⚠️ Outside diff range comments (1)
.github/workflows/surge-preview.yml (1)
34-38: 🩺 Stability & Availability | 🟠 Major | ⚡ Quick win让预览构建与
site-deploy.yml保持同一安装链路。这里直接跑
npm install,但.github/workflows/site-deploy.yml用的是固定 Node 20 +package-lock-only+npm ci。两边的运行时和依赖解析结果会漂移,导致 Surge 预览与实际站点部署不一致。建议修改
+ - name: setup node + uses: actions/setup-node@v6 + with: + node-version: 20 + - name: Build preview if: ${{ steps.surge-token.outputs.enabled == 'true' }} run: | - npm install + npm i --package-lock-only --ignore-scripts + npm ci npm run build🤖 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/surge-preview.yml around lines 34 - 38, The Build preview step in surge-preview should use the same Node and dependency installation flow as site-deploy to avoid drift between preview and production. Update the workflow around the Build preview job to match the fixed Node 20 setup and switch the install step from npm install to the same lockfile-based npm ci chain used by site-deploy, so the build uses identical dependency resolution before running npm run build.
🤖 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.
Outside diff comments:
In @.github/workflows/surge-preview.yml:
- Around line 34-38: The Build preview step in surge-preview should use the same
Node and dependency installation flow as site-deploy to avoid drift between
preview and production. Update the workflow around the Build preview job to
match the fixed Node 20 setup and switch the install step from npm install to
the same lockfile-based npm ci chain used by site-deploy, so the build uses
identical dependency resolution before running npm run build.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro
Run ID: e0547e0c-16be-4730-8753-ea362309fd04
📒 Files selected for processing (3)
.github/dependabot.yml.github/workflows/surge-preview.yml.prettierignore
✅ Files skipped from review due to trivial changes (1)
- .prettierignore

Summary
Standardize this rc-component repository as part of the Ant Design rc-component maintenance sweep.
Tracking issue: ant-design/ant-design#58514
Scope
types: "./es/index.d.ts", publishConfig, and release flow through@rc-component/np.react-component/rc-test/.github/workflows/test-utoo.yml@mainworkflow, React Doctor, Codecov, CodeQL, updated GitHub Actions versions, and guarded Surge preview fallback.docs-distoutput and remove legacynow-build/ Cloudflare Pages residue.Notes
secrets: inheritis kept untilreact-component/rc-test#176is merged, then it can be narrowed to explicitCODECOV_TOKENforwarding.