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: bump util & father plugin #298

Merged
merged 2 commits into from
Jan 16, 2025
Merged

chore: bump util & father plugin #298

merged 2 commits into from
Jan 16, 2025

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Jan 16, 2025

Summary by CodeRabbit

  • 包管理

    • 包名从 rc-segmented 更新为 @rc-component/segmented
    • 版本号重置为 1.0.0-1
    • 依赖包从 rc-util 更新为 @rc-component/util
    • 开发依赖 @rc-component/father-plugin 升级到 2.0.1 版本
  • 代码依赖

    • 更新了内部实用函数的导入路径
    • 未改变组件的核心功能和逻辑

Copy link

coderabbitai bot commented Jan 16, 2025

概述

演练

这个拉取请求主要涉及包管理和依赖更新。package.json 文件被重命名为 @rc-component/segmented,版本从 2.7.0 更改为 1.0.0-1。同时,rc-util 依赖被替换为 @rc-component/util,并更新了相关的导入路径。这些更改反映了包的重组和重命名。

变更

文件 变更摘要
package.json - 包名从 rc-segmented 更改为 @rc-component/segmented
- 版本更新为 1.0.0-1
- 依赖从 rc-util 替换为 @rc-component/util
src/MotionThumb.tsx - 更新导入路径:从 rc-util@rc-component/util
src/index.tsx - 更新导入路径:useMergedStateomitcomposeRefrc-util 迁移到 @rc-component/util

诗歌

🐰 兔子的代码重组诗 🔧

包名变了,路径更新
依赖重构,版本轮回
兔子跳跃,代码飞翔
重组之路,优雅前行
新的开始,精彩无限


📜 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 7f2e8f5 and 83d5b62.

📒 Files selected for processing (3)
  • package.json (2 hunks)
  • src/MotionThumb.tsx (1 hunks)
  • src/index.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (2)
  • src/MotionThumb.tsx
  • src/index.tsx
🔇 Additional comments (3)
package.json (3)

55-55: 确认 father-plugin 升级的影响

@rc-component/father-plugin 升级到 ^2.0.1 可能会影响构建过程。请检查:

  1. 新版本的变更日志
  2. 是否需要更新构建配置

2-3: 注意包名和版本的重大变更

包名更改为作用域包 @rc-component/segmented 以及版本重置为 1.0.0-1 表明这是一个破坏性变更。请确保:

  1. 已经更新了所有依赖此包的项目
  2. 在发布之前更新 CHANGELOG
  3. 考虑添加迁移指南
✅ Verification successful

包名变更影响相对较小,但仍需完善文档

经验证,目前没有其他公共包依赖 rc-segmented,这降低了重命名的风险。但建议:

  1. 在 CHANGELOG.md 中详细记录此次变更
  2. 添加版本迁移说明,特别是包名变更的部分
  3. 更新相关文档以反映新的包名 @rc-component/segmented
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查是否有其他包依赖此包
npm info rc-segmented dependencies

Length of output: 143


Script:

#!/bin/bash
# Check for CHANGELOG and migration guide
fd "CHANGELOG.md|MIGRATION.md|HISTORY.md" --type f --exec cat {}

# Check reverse dependencies
npm info rc-segmented dependent

Length of output: 114


52-52: 验证 @rc-component/util 的兼容性

rc-util 迁移到 @rc-component/util。请确认:

  1. 新包提供了所有必需的功能
  2. API 签名保持一致
✅ Verification successful

迁移验证完成,使用兼容

  • 已确认 @rc-component/util 提供了所有必需的功能:useMergedStateomitcomposeRefuseLayoutEffect
  • 这些 API 都是标准的 React 工具函数,保持了与原 rc-util 包的兼容性
  • 代码中没有使用任何已废弃或不兼容的 API
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查导入的方法在新包中是否存在
rg "import.*from.*rc-util" -A 1

Length of output: 33


Script:

#!/bin/bash
# 检查 package.json 中的依赖
echo "=== 检查 package.json 中的依赖 ==="
cat package.json | grep -E "rc-util|@rc-component/util"

# 使用更广泛的搜索模式
echo -e "\n=== 搜索 rc-util 的导入 ==="
rg "rc-util" -l

# 搜索新包的使用
echo -e "\n=== 搜索 @rc-component/util 的使用 ==="
rg "@rc-component/util" -l

Length of output: 393


Script:

#!/bin/bash
# 检查新包的具体使用方式
echo "=== src/index.tsx 中的使用 ==="
rg "@rc-component/util" src/index.tsx -A 2

echo -e "\n=== src/MotionThumb.tsx 中的使用 ==="
rg "@rc-component/util" src/MotionThumb.tsx -A 2

Length of output: 688


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. (Beta)
  • @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

github-actions bot commented Jan 16, 2025

😭 Deploy PR Preview 83d5b62 failed. Build logs

🤖 By surge-preview

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] 🔁 npm/@rc-component/[email protected] None 0 8.71 kB afc163
npm/@rc-component/[email protected] environment +1 206 kB zombiej
npm/[email protected] filesystem Transitive: environment, eval, shell, unsafe +68 10 MB eslintbot
npm/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +161 531 MB yifankakaxi
npm/[email protected] filesystem, shell Transitive: environment +21 825 kB tschaub
npm/[email protected] environment, filesystem, shell 0 6.44 kB typicode
npm/[email protected] Transitive: environment, filesystem +15 2.71 MB simenb
npm/[email protected] None +12 2.54 MB simenb
npm/[email protected] 🔁 npm/[email protected], npm/[email protected] Transitive: environment +2 2.83 MB matthew-dean
npm/[email protected] Transitive: environment, filesystem, shell +23 2.07 MB sindresorhus
npm/[email protected] environment, filesystem, unsafe 0 11.2 MB prettier-bot
npm/[email protected] filesystem +4 224 kB jounqin
npm/[email protected] Transitive: environment +2 374 kB 07akioni, afc163, madccc, ...1 more
npm/[email protected] Transitive: environment +3 114 kB
npm/[email protected] None 0 0 B
npm/[email protected] environment, filesystem, unsafe Transitive: shell +15 431 MB blakeembrey
npm/[email protected] None 0 22.7 MB typescript-bot

View full report↗︎

Copy link

🚨 Potential security issues detected. Learn more about Socket for GitHub ↗︎

To accept the risk, merge this PR and you will not be notified again.

Alert Package NoteSourceCI
Critical CVE npm/[email protected] ⚠︎

View full report↗︎

Next steps

What is a critical CVE?

Contains a Critical Common Vulnerability and Exposure (CVE).

Remove or replace dependencies that include known critical CVEs. Consumers can use dependency overrides or npm audit fix --force to remove vulnerable dependencies.

Take a deeper look at the dependency

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 [AT] socket [DOT] dev.

Remove the package

If you happen to install a dependency that Socket reports as Known Malware you should immediately remove it and select a different dependency. For other alert types, you may may wish to investigate alternative packages or consider if there are other ways to mitigate the specific risk posed by the dependency.

Mark a package as acceptable risk

To ignore an alert, reply with a comment starting with @SocketSecurity ignore followed by a space separated list of ecosystem/package-name@version specifiers. e.g. @SocketSecurity ignore npm/[email protected] or ignore all packages with @SocketSecurity ignore-all

Copy link

codecov bot commented Jan 16, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.37%. Comparing base (7f2e8f5) to head (83d5b62).
Report is 1 commits behind head on master.

Additional details and impacted files
@@           Coverage Diff           @@
##           master     #298   +/-   ##
=======================================
  Coverage   99.37%   99.37%           
=======================================
  Files           2        2           
  Lines         161      161           
  Branches       40       40           
=======================================
  Hits          160      160           
  Misses          1        1           

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

@zombieJ zombieJ merged commit 0119e2a into master Jan 16, 2025
11 checks passed
@zombieJ zombieJ deleted the util branch January 16, 2025 08:07
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