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 & build version #492

Merged
merged 2 commits into from
Jan 10, 2025
Merged

chore: bump util & build version #492

merged 2 commits into from
Jan 10, 2025

Conversation

zombieJ
Copy link
Member

@zombieJ zombieJ commented Jan 10, 2025

Summary by CodeRabbit

  • 重大更新

    • 包名从 rc-tooltip 更改为 @rc-component/tooltip
    • 版本号重置为 1.0.0-0
  • 依赖变更

    • 新增依赖 @rc-component/father-plugin@rc-component/util
    • 移除依赖 rc-util
  • 代码调整

    • 更新 useId 钩子的导入路径
    • 调整 TooltipRef 接口的格式

Copy link

vercel bot commented Jan 10, 2025

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

Name Status Preview Comments Updated (UTC)
tooltip ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 10, 2025 9:56am

Copy link

coderabbitai bot commented Jan 10, 2025

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.

src/Tooltip.tsx

Oops! Something went wrong! :(

ESLint: 8.57.1

Error: Cannot read config file: /.eslintrc.js
Error: Cannot find module '@umijs/fabric/dist/eslint'
Require stack:

  • /.eslintrc.js
  • /node_modules/.pnpm/@eslint[email protected]/node_modules/@eslint/eslintrc/dist/eslintrc.cjs
  • /node_modules/.pnpm/[email protected]/node_modules/eslint/lib/cli-engine/cli-engine.js
  • /node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/eslint.js
  • /node_modules/.pnpm/[email protected]/node_modules/eslint/lib/eslint/index.js
  • /node_modules/.pnpm/[email protected]/node_modules/eslint/lib/cli.js
  • /node_modules/.pnpm/[email protected]/node_modules/eslint/bin/eslint.js
    at Module._resolveFilename (node:internal/modules/cjs/loader:1248:15)
    at Module._load (node:internal/modules/cjs/loader:1074:27)
    at TracingChannel.traceSync (node:diagnostics_channel:315:14)
    at wrapModuleLoad (node:internal/modules/cjs/loader:217:24)
    at Module.require (node:internal/modules/cjs/loader:1339:12)
    at require (node:internal/modules/helpers:135:16)
    at Object. (/.eslintrc.js:1:14)
    at Module._compile (node:internal/modules/cjs/loader:1546:14)
    at Module._extensions..js (node:internal/modules/cjs/loader:1691:10)
    at Module.load (node:internal/modules/cjs/loader:1317:32)

概述

演练

这些更改主要涉及 package.jsonsrc/Tooltip.tsx 文件的更新。包名从 rc-tooltip 更改为 @rc-component/tooltip,版本重置为 1.0.0-0。依赖项发生了变化,包括添加 @rc-component/father-plugin@rc-component/util,同时移除了 rc-util。在 Tooltip.tsx 中,主要是导入路径和接口格式的微小调整。

更改

文件 更改摘要
package.json - 包名从 rc-tooltip 更改为 @rc-component/tooltip
- 版本从 6.4.0 更改为 1.0.0-0
- 添加 @rc-component/father-plugin: ^2.0.1
- 添加 @rc-component/util: ^1.0.1
- 移除 rc-util: ^5.44.3
src/Tooltip.tsx - 导入路径从 rc-util/lib/hooks/useId 更改为 @rc-component/util/lib/hooks/useId
- 接口格式微调

诗歌

🐰 依赖变换,版本重生
代码如兔跃,轻盈飞翔
@rc-component 新标签闪亮
重构之路,技术飞扬
兔子微笑,未来可期 🚀


📜 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 e8e35fc and caf656b.

📒 Files selected for processing (2)
  • package.json (2 hunks)
  • src/Tooltip.tsx (2 hunks)
✅ Files skipped from review due to trivial changes (1)
  • src/Tooltip.tsx
⏰ Context from checks skipped due to timeout of 90000ms (1)
  • GitHub Check: Socket Security: Pull Request Alerts
🔇 Additional comments (2)
package.json (2)

2-3: ⚠️ Potential issue

包名和版本号的重大变更需要注意

这是一个破坏性变更:

  • 包名从 rc-tooltip 改为 @rc-component/tooltip
  • 版本号从 6.4.0 重置为 1.0.0-0

请确保:

  1. 已经更新了所有依赖此包的项目
  2. 在发布前已通知用户关于此破坏性变更
✅ Verification successful

包名变更和版本重置是合理的重大变更

此变更是组织层面的重构一部分,从 rc-tooltip 迁移到 @rc-component/tooltip 范围下:

  • 版本重置到 1.0.0-0 符合语义化版本规范
  • 未发现外部依赖受影响

但是需要更新以下文档:

  • README.md 中的 NPM 徽章和链接
  • 示例代码中的导入语句
  • 文档中的包名引用
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查是否有其他包依赖旧的包名
rg -l "rc-tooltip"

Length of output: 350


Script:

#!/bin/bash
# Check for actual imports and requires
echo "=== Checking for require/import statements ==="
rg "require\(['\"]rc-tooltip['\"]|from ['\"]rc-tooltip['\"]" -l

echo "=== Checking for package.json dependencies ==="
fd "package.json" --exec grep -l "rc-tooltip" {}

echo "=== Checking documentation references ==="
rg "rc-tooltip" README.md -C 2

Length of output: 3324


45-48: 依赖项更新需要验证兼容性

依赖变更:

  • 新增 @rc-component/father-plugin ^2.0.1
  • 新增 @rc-component/util ^1.0.1
  • 移除 rc-util ^5.44.3

建议:

  1. 确认 @rc-component/util 提供的 API 与 rc-util 完全兼容
  2. 验证 father-plugin 从 v1 升级到 v2 的兼容性
✅ Verification successful

依赖更新验证完成,更改安全

代码分析显示:

  • rc-util 已完全迁移至 @rc-component/util,仅使用 useId hook
  • @rc-component/trigger 作为核心依赖使用正确
  • father-plugin 仅用于构建配置,不影响运行时
🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查代码中是否还有使用旧的 rc-util 的地方
rg "rc-util"

# 检查 father-plugin 的重大变更
gh api repos/react-component/father-plugin/releases | jq '.[].body' | grep -i "breaking change"

Length of output: 110


Script:

#!/bin/bash
# 检查 rc-util 的导入语句
ast-grep --pattern 'import $_ from "rc-util$$$"'

# 检查 @rc-component/util 的使用情况
ast-grep --pattern 'import $_ from "@rc-component/util$$$"'

# 查找 father 配置文件
fd -e ts -e js "father" --exec cat {}

# 使用不同的方式搜索 rc-util
rg -i "rc-util"

Length of output: 168


Script:

#!/bin/bash
# 验证代码库是否可访问,列出所有 JS/TS 文件
fd -e js -e ts -e jsx -e tsx

# 使用更宽泛的搜索模式
rg -l "rc-util|@rc-component"

# 检查 package.json 的历史变更
cat package.json

# 检查不同的导入语法
ast-grep --pattern 'require("$_")'

Length of output: 2565


Script:

#!/bin/bash
# 检查包含依赖引用的文件内容
echo "=== src/Tooltip.tsx ==="
cat src/Tooltip.tsx

echo -e "\n=== src/placements.tsx ==="
cat src/placements.tsx

echo -e "\n=== docs/examples/simple.tsx ==="
cat docs/examples/simple.tsx

Length of output: 12486


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

codecov bot commented Jan 10, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 100.00%. Comparing base (e8e35fc) to head (caf656b).
Report is 1 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##            master      #492   +/-   ##
=========================================
  Coverage   100.00%   100.00%           
=========================================
  Files            3         3           
  Lines           33        33           
  Branches        12        12           
=========================================
  Hits            33        33           

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

Copy link

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

Package New capabilities Transitives Size Publisher
npm/@rc-component/[email protected] environment, filesystem, shell 0 8.65 kB zombiej
npm/@rc-component/[email protected] environment +1 206 kB zombiej

🚮 Removed packages: npm/@rc-component/[email protected]

View full report↗︎

@zombieJ zombieJ merged commit cedf012 into master Jan 10, 2025
10 checks passed
@zombieJ zombieJ deleted the bump-util branch January 10, 2025 10:16
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