Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: update dependencies and import paths #473

Merged
merged 1 commit into from
Feb 26, 2025

Conversation

aojunhao123
Copy link
Contributor

@aojunhao123 aojunhao123 commented Feb 26, 2025

Summary by CodeRabbit

  • Refactor
    • 统一更新了部分组件的引用及属性名称,提升了界面一致性。
  • Documentation
    • 更新了多个示例文件,确保文档展示与最新组件库保持一致。
  • Chores
    • 调整了依赖项版本并添加了新的构建脚本,优化开发流程。
  • Tests
    • 同步更新了测试文件中的组件引用,确保测试准确性。

Copy link

vercel bot commented Feb 26, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
dialog ❌ Failed (Inspect) Feb 26, 2025 11:41am

Copy link

coderabbitai bot commented Feb 26, 2025

Walkthrough

此次更新主要针对多个示例和配置文件中的组件引用和依赖管理进行了调整。修改内容包括将原先的导入路径从 rc- 前缀更改为 @rc-component/ 前缀,修改部分组件属性名称(例如由 dropdownStyle 改为 popupStyle),以及在 package.jsontsconfig.json 中更新依赖和路径映射。这些调整反映了组件库组织结构或版本的升级,但组件的整体逻辑保持不变。

Changes

文件 修改摘要
docs/examples/ant-design.tsx, docs/examples/bootstrap.tsx, docs/examples/draggable.tsx, docs/examples/multiple-Portal.tsx, docs/examples/pure.tsx 更新组件导入路径(由 rc-... 改为 @rc-component/...);在 ant-design 文件中将 dropdownStyle 替换为 popupStyle;对部分文件进行格式调整
package.json, tsconfig.json, tests/portal.spec.tsx 更新依赖与脚本:在 package.json 中新增 "tsc": "bunx tsc --noEmit" 脚本、升级 @rc-component/portal 版本并添加新依赖,移除旧依赖;tsconfig.json 更新路径映射

Possibly related PRs

Suggested reviewers

  • zombieJ
  • thinkasany

Poem

我是一只跳跃的小兔子,
在代码森林里轻声奔跑,
新的包名铺就希望之路,
旧依赖悄然离场换新潮,
升级已至,欢欣共庆更新到位🐰
快乐代码,跃动心跳!

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

If the error stems from missing dependencies, add them to the package.json file. For unrecoverable errors (e.g., due to private dependencies), disable the tool in the CodeRabbit configuration.

docs/examples/ant-design.tsx

Oops! Something went wrong! :(

ESLint: 7.32.0

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The config "prettier" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

docs/examples/bootstrap.tsx

Oops! Something went wrong! :(

ESLint: 7.32.0

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The config "prettier" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

docs/examples/draggable.tsx

Oops! Something went wrong! :(

ESLint: 7.32.0

ESLint couldn't find the config "prettier" to extend from. Please check that the name of the config is correct.

The config "prettier" was referenced from the config file in "/.eslintrc.js".

If you still have problems, please stop by https://eslint.org/chat/help to chat with the team.

  • 3 others

Tip

CodeRabbit's docstrings feature is now available as part of our Pro Plan! Simply use the command @coderabbitai generate docstrings to have CodeRabbit automatically generate docstrings for your pull request. We would love to hear your feedback on Discord.


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL
Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between a3fcb93 and 887f52a.

📒 Files selected for processing (8)
  • docs/examples/ant-design.tsx (2 hunks)
  • docs/examples/bootstrap.tsx (1 hunks)
  • docs/examples/draggable.tsx (2 hunks)
  • docs/examples/multiple-Portal.tsx (1 hunks)
  • docs/examples/pure.tsx (1 hunks)
  • package.json (2 hunks)
  • tests/portal.spec.tsx (1 hunks)
  • tsconfig.json (1 hunks)
✅ Files skipped from review due to trivial changes (4)
  • docs/examples/bootstrap.tsx
  • docs/examples/multiple-Portal.tsx
  • docs/examples/pure.tsx
  • docs/examples/draggable.tsx
🔇 Additional comments (7)
tests/portal.spec.tsx (1)

3-3: 导入路径更新符合项目规范

导入路径从 rc-select 更改为 @rc-component/select,这与整个项目的依赖结构更新保持一致。

tsconfig.json (1)

17-17: 路径映射更新符合新的包命名约定

路径映射由 "rc-dialog" 更改为 "@rc-component/dialog",与组件库的命名约定更新保持一致。

docs/examples/ant-design.tsx (2)

3-5: 导入路径更新符合新的包命名约定

导入路径已更新,符合组件库的新命名约定:

  • rc-select@rc-component/select
  • rc-dialog@rc-component/dialog

同时正确引入了相应的样式文件。


131-131: 组件属性名称更新

属性名从 dropdownStyle 更改为 popupStyle,符合新版本组件的 API 变更。

package.json (3)

43-44: 脚本配置更新

添加了新的 tsc 脚本,使用 bunx tsc --noEmit 进行类型检查,这是一个很好的增强,可以在不生成输出文件的情况下验证 TypeScript 类型。


53-56: 依赖版本更新

@rc-component/portal 版本从 ^1.0.0-8 更新到 ^2.0.0,这是一个主要版本更新。请确认此更新不会引入破坏性变更,或者已经适当处理了这些变更。

如果尚未验证兼容性,建议检查 @rc-component/portal v2 的更新日志来了解可能的破坏性变更。


59-60: 开发依赖更新符合导入路径变更

添加了新的开发依赖项 @rc-component/drawer@rc-component/select,替换了之前的 rc-drawerrc-select,与导入路径的更新保持一致。

✨ Finishing Touches
  • 📝 Generate Docstrings

Thank you for using CodeRabbit. We offer it for free to the OSS community and would appreciate your support in helping us grow. If you find it useful, would you consider giving us a shout-out on your favorite social media?

❤️ Share
🪧 Tips

Chat

There are 3 ways to chat with CodeRabbit:

  • Review comments: Directly reply to a review comment made by CodeRabbit. Example:
    • I pushed a fix in commit <commit_id>, please review it.
    • Generate unit testing code for this file.
    • Open a follow-up GitHub issue for this discussion.
  • Files and specific lines of code (under the "Files changed" tab): Tag @coderabbitai in a new review comment at the desired location with your query. Examples:
    • @coderabbitai generate unit testing code for this file.
    • @coderabbitai modularize this function.
  • PR comments: Tag @coderabbitai in a new PR comment to ask questions about the PR branch. For the best results, please provide a very specific query, as very limited context is provided in this mode. Examples:
    • @coderabbitai gather interesting stats about this repository and render them as a table. Additionally, render a pie chart showing the language distribution in the codebase.
    • @coderabbitai read src/utils.ts and generate unit testing code.
    • @coderabbitai read the files in the src/scheduler package and generate a class diagram using mermaid and a README in the markdown format.
    • @coderabbitai help me debug CodeRabbit configuration file.

Note: Be mindful of the bot's finite context window. It's strongly recommended to break down tasks such as reading entire modules into smaller chunks. For a focused discussion, use review comments to chat about specific files and their changes, instead of using the PR comments.

CodeRabbit Commands (Invoked using PR comments)

  • @coderabbitai pause to pause the reviews on a PR.
  • @coderabbitai resume to resume the paused reviews.
  • @coderabbitai review to trigger an incremental review. This is useful when automatic reviews are disabled for the repository.
  • @coderabbitai full review to do a full review from scratch and review all the files again.
  • @coderabbitai summary to regenerate the summary of the PR.
  • @coderabbitai generate docstrings to generate docstrings for this PR.
  • @coderabbitai resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Other keywords and placeholders

  • Add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.
  • Add @coderabbitai summary to generate the high-level summary at a specific location in the PR description.
  • Add @coderabbitai anywhere in the PR title to generate the title automatically.

CodeRabbit Configuration File (.coderabbit.yaml)

  • You can programmatically configure CodeRabbit by adding a .coderabbit.yaml file to the root of your repository.
  • Please see the configuration documentation for more information.
  • If your editor has YAML language server enabled, you can add the path at the top of this file to enable auto-completion and validation: # yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json

Documentation and Community

  • Visit our Documentation for detailed information on how to use CodeRabbit.
  • Join our Discord Community to get help, request features, and share feedback.
  • Follow us on X/Twitter for updates and announcements.

Copy link

New, updated, and removed dependencies detected. Learn more about Socket for GitHub ↗︎

Package New capabilities Transitives Size Publisher
npm/@rc-component/[email protected] environment 0 53.3 kB zombiej
npm/@rc-component/[email protected] None 0 27.2 kB afc163, madccc, peachscript, ...1 more
npm/@rc-component/[email protected] environment +8 1.24 MB zombiej

View full report↗︎

Copy link

codecov bot commented Feb 26, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.42%. Comparing base (a3fcb93) to head (887f52a).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #473   +/-   ##
=======================================
  Coverage   98.42%   98.42%           
=======================================
  Files           8        8           
  Lines         190      190           
  Branches       64       64           
=======================================
  Hits          187      187           
  Misses          3        3           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@zombieJ zombieJ merged commit c90df7a into react-component:master Feb 26, 2025
9 of 10 checks passed
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