chore: standardize repository setup#1491
Conversation
|
The latest updates on your projects. Learn more about Vercel for GitHub.
|
Walkthrough更新了构建输出目录、路径别名和忽略规则,示例导入切换到新的表格包,并同步调整 README、首页文案、package 脚本/依赖以及 GitHub 自动化配置。 Changes构建、示例与文档迁移
仓库自动化
Estimated code review effort🎯 4 (Complex) | ⏱️ ~60 minutes Suggested reviewers
Poem
🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches📝 Generate docstrings
🧪 Generate unit tests (beta)
Warning There were issues while running some tools. Please review the errors and either fix the tool's configuration or disable the tool if it's a critical failure. 🔧 ESLint
.dumirc.tsESLint skipped: missing config or dependency (missing-dependency). The ESLint configuration references a package that is not available in the sandbox. docs/examples/animation.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox. docs/examples/aria.tsxESLint skipped: the ESLint configuration for this file references a package that is not available in the sandbox.
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 |
|
Review the following changes in direct dependencies. Learn more about Socket for GitHub.
|
✅ Preview is ready!
↩️ Previous: ⚡️ 🤖 Powered by surge-preview |
|||||||||||||||
There was a problem hiding this comment.
Code Review
This pull request migrates the repository and its examples from the legacy rc-table and related rc- packages to the scoped @rc-component/table, @rc-component/menu, @rc-component/dropdown, and @rc-component/tooltip packages. It also updates configuration files (such as .dumirc.ts, tsconfig.json, package.json, and vercel.json) to support the new build and documentation output directory (docs-dist). The reviewer recommends using __dirname with path.resolve in .dumirc.ts to ensure robust path resolution across different execution environments.
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.
| '@rc-component/table$': path.resolve('src'), | ||
| '@rc-component/table/es': path.resolve('src'), | ||
| '@rc-component/dropdown/assets': path.resolve('node_modules/@rc-component/dropdown/assets'), | ||
| '@rc-component/menu/assets': path.resolve('node_modules/@rc-component/menu/assets'), | ||
| '@rc-component/tooltip/assets': path.resolve('node_modules/@rc-component/tooltip/assets'), | ||
| 'rc-table$': path.resolve('src'), | ||
| 'rc-table/es': path.resolve('src'), |
There was a problem hiding this comment.
Using path.resolve with relative paths depends on the current working directory (process.cwd()), which can lead to resolution failures if the dumi commands are executed from a different directory (for example, in a monorepo root). It is safer and more robust to use __dirname to ensure paths are resolved relative to the configuration file's location.
| '@rc-component/table$': path.resolve('src'), | |
| '@rc-component/table/es': path.resolve('src'), | |
| '@rc-component/dropdown/assets': path.resolve('node_modules/@rc-component/dropdown/assets'), | |
| '@rc-component/menu/assets': path.resolve('node_modules/@rc-component/menu/assets'), | |
| '@rc-component/tooltip/assets': path.resolve('node_modules/@rc-component/tooltip/assets'), | |
| 'rc-table$': path.resolve('src'), | |
| 'rc-table/es': path.resolve('src'), | |
| '@rc-component/table$': path.resolve(__dirname, 'src'), | |
| '@rc-component/table/es': path.resolve(__dirname, 'src'), | |
| '@rc-component/dropdown/assets': path.resolve(__dirname, 'node_modules/@rc-component/dropdown/assets'), | |
| '@rc-component/menu/assets': path.resolve(__dirname, 'node_modules/@rc-component/menu/assets'), | |
| '@rc-component/tooltip/assets': path.resolve(__dirname, 'node_modules/@rc-component/tooltip/assets'), | |
| 'rc-table$': path.resolve(__dirname, 'src'), | |
| 'rc-table/es': path.resolve(__dirname, 'src'), |
|
React Doctor found 27 issues in 23 files · 1 error & 26 warnings · score 48 / 100 (Critical) · vs Errors
26 warnings
Reviewed by React Doctor for commit |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## master #1491 +/- ##
==========================================
+ Coverage 96.10% 99.21% +3.11%
==========================================
Files 57 49 -8
Lines 3442 3325 -117
Branches 639 630 -9
==========================================
- Hits 3308 3299 -9
+ Misses 129 26 -103
+ Partials 5 0 -5 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Actionable comments posted: 2
🤖 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/codeql.yml:
- Around line 27-43: The CodeQL workflow is pinned to an older fixed commit for
github/codeql-action in Initialize CodeQL, Autobuild, and Perform CodeQL
Analysis; update those action references to the latest stable v4 release and
keep them pinned to the corresponding official commit SHA. Use the
github/codeql-action entries in the workflow as the places to change, and make
sure all three steps stay on the same updated SHA for consistency.
In `@docs/examples/stickyHeaderAndSummary.tsx`:
- Line 3: 示例里的默认导入 Table 上没有挂载 Summary,导致 Table.Summary、Table.Summary.Row 和
Table.Summary.Cell 运行时为 undefined;请在 stickyHeaderAndSummary.tsx 中改用命名导入的
Summary(以及需要的话 Column/ColumnGroup),并把所有 Table.Summary
相关引用替换为该命名成员,或者如果要保留默认导入用法,则在 src/index.ts 中把 Summary 显式挂到默认导出的 Table 对象上。
🪄 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: 8ffe63fb-b76a-408e-b18c-57dc3b7d2eee
📒 Files selected for processing (63)
.dumirc.ts.github/FUNDING.yml.github/dependabot.yml.github/workflows/codeql.yml.github/workflows/main.yml.github/workflows/react-doctor.yml.github/workflows/surge-preview.yml.gitignoreREADME.mddocs/examples/animation.tsxdocs/examples/aria.tsxdocs/examples/caption.tsxdocs/examples/childrenIndent.tsxdocs/examples/className.tsxdocs/examples/click-summary-row.tsxdocs/examples/colspan-rowspan-legacy.tsxdocs/examples/colspan-rowspan.tsxdocs/examples/column-hidden.tsxdocs/examples/column-resize.tsxdocs/examples/components.tsxdocs/examples/dropdown.tsxdocs/examples/ellipsis-custom-tooltip.tsxdocs/examples/ellipsis.tsxdocs/examples/expandIcon.tsxdocs/examples/expandedRowClassName.tsxdocs/examples/expandedRowRender.tsxdocs/examples/expandedSticky.tsxdocs/examples/fixedColumns-auto-height.tsxdocs/examples/fixedColumns-resize.tsxdocs/examples/fixedColumns.tsxdocs/examples/fixedColumnsAndHeader.tsxdocs/examples/fixedColumnsAndHeaderRtl.tsxdocs/examples/grouping-columns-hidden.tsxdocs/examples/grouping-columns.tsxdocs/examples/hide-header.tsxdocs/examples/hover-perf.tsxdocs/examples/jsx.tsxdocs/examples/key.tsxdocs/examples/measureRowRender.tsxdocs/examples/nested.tsxdocs/examples/no-data.tsxdocs/examples/react-dnd.tsxdocs/examples/row-hoverable.tsxdocs/examples/rowAndCellClick.tsxdocs/examples/scopeCol.tsxdocs/examples/scopeRow.tsxdocs/examples/scrollX.tsxdocs/examples/scrollXY.tsxdocs/examples/scrollY.tsxdocs/examples/shadow.tsxdocs/examples/simple.tsxdocs/examples/stickyHeader.tsxdocs/examples/stickyHeaderAndSummary.tsxdocs/examples/styled-components.tsxdocs/examples/subTable.tsxdocs/examples/title-and-footer.tsxdocs/examples/virtual-list-grid.tsxdocs/examples/virtual-list.tsxdocs/index.mdpackage.jsontsconfig.jsonvercel.jsonvitest.config.mts
| uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 | ||
| with: | ||
| persist-credentials: false | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@v2 | ||
| uses: github/codeql-action/init@411bbbe57033eedfc1a82d68c01345aa96c737d7 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| queries: +security-and-quality | ||
|
|
||
| - name: Autobuild | ||
| uses: github/codeql-action/autobuild@v2 | ||
| uses: github/codeql-action/autobuild@411bbbe57033eedfc1a82d68c01345aa96c737d7 | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@v2 | ||
| uses: github/codeql-action/analyze@411bbbe57033eedfc1a82d68c01345aa96c737d7 | ||
| with: | ||
| category: "/language:${{ matrix.language }}" | ||
| category: '/language:${{ matrix.language }}' |
There was a problem hiding this comment.
🔒 Security & Privacy | 🟡 Minor
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# 验证固定的 action SHA 对应的标签/发布
for repo in actions/checkout github/codeql-action; do
echo "== $repo =="
done
gh api repos/actions/checkout/commits/9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 --jq '.commit.message' 2>/dev/null
gh api "repos/actions/checkout/git/refs/tags" --jq '.[] | select(.object.sha=="9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0") | .ref' 2>/dev/null
gh api repos/github/codeql-action/commits/411bbbe57033eedfc1a82d68c01345aa96c737d7 --jq '.commit.message' 2>/dev/nullRepository: react-component/table
Length of output: 442
🏁 Script executed:
#!/bin/bash
# 查询 github/codeql-action 的 tags 并查找匹配前缀 411bbbe 的引用
gh api "repos/github/codeql-action/git/refs/tags" --jq '.[] | select(.ref | contains("v")) | {tag: .ref, sha: .object.sha}' | \
grep "411bbbe57033eedfc1a82d68c01345aa96c737d7" || echo "No tag found matching that SHA"
# 同时列出 codeql-action 的最近 5 个 tag 和对应 SHA,便于人工核对
gh api "repos/github/codeql-action/releases" --jq '.[:5] | .[] | {tag_name: .tag_name, commit_sha: .commit.sha, name: .name}'Repository: react-component/table
Length of output: 549
更新 CodeQL Action 至最新稳定版本并保持 SHA 固定。
已确认 actions/checkout 的 SHA 9c091bb... 对应官方发布标签 v7,github/codeql-action 的 SHA 411bbbe... 对应标签 v4,两者均为正式发布版本,供应链安全实践正确。然而,github/codeql-action 当前固定在 v4 初始版本,建议升级至最新稳定版(如 v4.36.x)以获取最新安全规则和修复。请使用最新稳定版的 commit SHA 并固定,例如参考 GitHub 官方仓库最新 release 确定的 SHA。
🤖 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 27 - 43, The CodeQL workflow is
pinned to an older fixed commit for github/codeql-action in Initialize CodeQL,
Autobuild, and Perform CodeQL Analysis; update those action references to the
latest stable v4 release and keep them pinned to the corresponding official
commit SHA. Use the github/codeql-action entries in the workflow as the places
to change, and make sure all three steps stay on the same updated SHA for
consistency.
| /* eslint-disable no-console,func-names,react/no-multi-comp, no-nested-ternary */ | ||
| import React from 'react'; | ||
| import Table from 'rc-table'; | ||
| import Table from '@rc-component/table'; |
There was a problem hiding this comment.
🩺 Stability & Availability | 🔴 Critical
🧩 Analysis chain
🏁 Script executed:
#!/bin/bash
# 验证默认导出是否附带 Summary/Summary.Row/Summary.Cell 静态成员
rg -nP '\bTable\.(Summary|EXPAND_COLUMN|Column|ColumnGroup)\b' node_modules/@rc-component/table 2>/dev/null | head
rg -nP 'Summary(\.Row|\.Cell|\s*=)' node_modules/@rc-component/table/lib/index* node_modules/@rc-component/table/es/index* 2>/dev/null | headRepository: react-component/table
Length of output: 159
🏁 Script executed:
#!/bin/bash
# Confirm repo structure and find source entry point
ls -la
find . -maxdepth 2 -name "index.ts" -o -name "index.tsx" -o -name "index.js" | head -20Repository: react-component/table
Length of output: 2113
🏁 Script executed:
#!/bin/bash
# Inspect the main entry point to see how Table and Summary are exported
cat -n src/index.tsRepository: react-component/table
Length of output: 1639
🏁 Script executed:
#!/bin/bash
# Check the example file to confirm the usage pattern that fails
cat -n docs/examples/stickyHeaderAndSummary.tsx | head -110Repository: react-component/table
Length of output: 4080
示例代码中的 Table.Summary 等静态成员在运行时将为 undefined。
当前 src/index.ts 仅将 Summary 作为命名导出(named export),并未将其挂载到默认导出的 Table 对象上。
示例文件 docs/examples/stickyHeaderAndSummary.tsx (第 3 行) 使用默认导入 import Table from '@rc-component/table',随后在第 92-105 行调用 Table.Summary、Table.Summary.Row 和 Table.Summary.Cell。
由于 Table 对象上不存在 Summary 属性,此代码在运行时会报错。
建议修复方案二选一:
- 修改示例导入(推荐):改为使用命名导入,例如
import { default as Table, Summary } from '@rc-component/table';并在代码中将Table.Summary替换为Summary等。 - 修改库导出:若库设计意图是支持静态成员访问,需在
src/index.ts中显式添加Table.Summary = Summary;(以及Column,ColumnGroup等) 后再导出默认值。
🤖 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 `@docs/examples/stickyHeaderAndSummary.tsx` at line 3, 示例里的默认导入 Table 上没有挂载
Summary,导致 Table.Summary、Table.Summary.Row 和 Table.Summary.Cell 运行时为
undefined;请在 stickyHeaderAndSummary.tsx 中改用命名导入的 Summary(以及需要的话
Column/ColumnGroup),并把所有 Table.Summary 相关引用替换为该命名成员,或者如果要保留默认导入用法,则在
src/index.ts 中把 Summary 显式挂到默认导出的 Table 对象上。

Summary
rc-*packages to@rc-component/*packages without changing component runtime behavior.Verification
npm install --ignore-scripts --no-audit --loglevel=warnnpm run tscnpm run lint(passes with existing warnings)npm testnpm run buildnpm run compile(passes with existing warnings)npx vercel build --yesRefs ant-design/ant-design#58514
Summary by CodeRabbit