Skip to content

Conversation

@zombieJ
Copy link
Member

@zombieJ zombieJ commented Jan 28, 2025

Summary by CodeRabbit

  • 依赖更新

    • 将包名从 rc-input-number 更新为 @rc-component/input-number
    • 更新了多个依赖包的导入路径,包括 @rc-component/input@rc-component/util
    • 重置版本号为 1.0.0
  • 开发工具

    • 升级了开发依赖工具版本
    • 调整了发布脚本
  • 代码重构

    • 更新了所有文件中的导入路径
    • 修改了测试文件中的模块引用

这些更改主要是包的重组和重命名,不会影响组件的核心功能。

@vercel
Copy link

vercel bot commented Jan 28, 2025

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

Name Status Preview Comments Updated (UTC)
input-number ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jan 28, 2025 6:02am

@coderabbitai
Copy link

coderabbitai bot commented Jan 28, 2025

概述

演练

这个拉取请求主要是将 InputNumber 组件及其相关依赖从 rc-input-numberrc-util 迁移到 @rc-component/input-number@rc-component/util 命名空间。变更涉及多个文件的导入路径更新,包括文档示例、源代码、测试文件和配置文件。这是一次全面的包重构,涉及包名、版本号和依赖项的调整。

变更

文件 变更摘要
docs/demo/* 所有演示文件中的 InputNumber 导入路径从 rc-input-number 更新为 @rc-component/input-number
src/InputNumber.tsx 更新多个依赖的导入路径,包括 BaseInput、工具函数和类型
package.json 包名从 rc-input-number 变更为 @rc-component/input-number,版本重置为 1.0.0,依赖项和开发依赖项也相应更新
tests/* 更新 KeyCodeisMobile 等工具的导入路径
tsconfig.json 更新路径映射

诗歌

🐰 代码重构,兔子欢跳
依赖换新装,包裹更轻巧
@rc-component 闪耀光芒
版本重置,未来可期待
重构之路,兔子带你飞!

可能相关的 PR

建议的审阅者

  • afc163

📜 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 193afb5 and a2475cf.

📒 Files selected for processing (28)
  • docs/demo/combination-key-format.tsx (1 hunks)
  • docs/demo/custom.tsx (1 hunks)
  • docs/demo/debug.tsx (1 hunks)
  • docs/demo/decimal.tsx (1 hunks)
  • docs/demo/focus.tsx (1 hunks)
  • docs/demo/formatter.tsx (1 hunks)
  • docs/demo/input-control.tsx (1 hunks)
  • docs/demo/precision.tsx (1 hunks)
  • docs/demo/simple.tsx (1 hunks)
  • docs/demo/small-step.tsx (1 hunks)
  • docs/demo/wheel.tsx (1 hunks)
  • package.json (3 hunks)
  • src/InputNumber.tsx (1 hunks)
  • src/StepHandler.tsx (1 hunks)
  • src/hooks/useCursor.ts (1 hunks)
  • src/hooks/useFrame.ts (1 hunks)
  • tests/click.test.tsx (1 hunks)
  • tests/cursor.test.tsx (1 hunks)
  • tests/focus.test.tsx (1 hunks)
  • tests/formatter.test.tsx (1 hunks)
  • tests/github.test.tsx (1 hunks)
  • tests/input.test.tsx (1 hunks)
  • tests/keyboard.test.tsx (1 hunks)
  • tests/mobile.test.tsx (1 hunks)
  • tests/precision.test.tsx (1 hunks)
  • tests/props.test.tsx (1 hunks)
  • tests/wheel.test.tsx (1 hunks)
  • tsconfig.json (1 hunks)
✅ Files skipped from review due to trivial changes (22)
  • docs/demo/wheel.tsx
  • docs/demo/simple.tsx
  • docs/demo/custom.tsx
  • src/hooks/useFrame.ts
  • docs/demo/combination-key-format.tsx
  • docs/demo/precision.tsx
  • docs/demo/small-step.tsx
  • tests/cursor.test.tsx
  • tests/github.test.tsx
  • docs/demo/debug.tsx
  • src/hooks/useCursor.ts
  • tests/precision.test.tsx
  • src/StepHandler.tsx
  • docs/demo/decimal.tsx
  • docs/demo/formatter.tsx
  • tests/input.test.tsx
  • tests/formatter.test.tsx
  • tests/props.test.tsx
  • docs/demo/focus.tsx
  • docs/demo/input-control.tsx
  • tests/focus.test.tsx
  • src/InputNumber.tsx
🔇 Additional comments (9)
tests/mobile.test.tsx (1)

6-6: 导入路径更新正确!

rc-util 迁移到 @rc-component/util 的修改符合预期。

tests/keyboard.test.tsx (1)

1-1: KeyCode 导入路径更新正确!

rc-util 迁移到 @rc-component/util 的修改符合预期,所有 KeyCode 的使用保持不变。

tests/wheel.test.tsx (1)

1-1: KeyCode 导入路径更新正确!

rc-util 迁移到 @rc-component/util 的修改符合预期,所有 KeyCode 在滚轮事件中的使用保持不变。

tests/click.test.tsx (1)

4-4: KeyCode 导入路径更新正确!建议验证依赖版本。

rc-util 迁移到 @rc-component/util 的修改符合预期。

请运行以下脚本验证 package.json 中的依赖版本:

✅ Verification successful

依赖版本验证通过!

@rc-component/util 的版本 ^1.2.0 配置正确,可以安全使用。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查 package.json 中的 @rc-component/util 版本
if [ -f "package.json" ]; then
  echo "Checking @rc-component/util version in package.json:"
  cat package.json | jq '.dependencies["@rc-component/util"] // .devDependencies["@rc-component/util"]'
fi

Length of output: 253

tsconfig.json (1)

13-13: 路径映射更新正确!

路径别名已正确更新为新的作用域包名称,同时保持了对源文件的正确映射。

package.json (4)

2-3: 包名和版本更新符合规范!

  • 包名更改为作用域格式 @rc-component/input-number 符合组织规范
  • 版本重置到 1.0.0 适合此次重大重构

37-37: 构建脚本更新合理!

np --yolo --no-publish 切换到 rc-np 符合新的发布工具链要求。


51-52: 依赖项更新统一!

依赖项已统一更新到 @rc-component 作用域下:

  • @rc-component/input: ~1.0.0
  • @rc-component/util: ^1.2.0

55-56: 开发依赖更新正确!

  • father 插件已更新到最新版本 ^2.0.2
  • 新增了 @rc-component/np 依赖,版本 ^1.0.3

建议验证新版本 father 插件的兼容性。


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.

@socket-security
Copy link

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

Package New capabilities Transitives Size Publisher
npm/@rc-component/father-plugin@2.0.3 🔁 npm/@rc-component/father-plugin@1.1.0 None +4 121 kB zombiej
npm/@rc-component/input@1.0.0 None 0 61.9 kB zombiej
npm/@rc-component/np@1.0.3 Transitive: environment, eval, filesystem, shell, unsafe +145 18.2 MB zombiej
npm/@rc-component/util@1.2.0 environment +1 202 kB zombiej

View full report↗︎

@codecov
Copy link

codecov bot commented Jan 28, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 95.95%. Comparing base (193afb5) to head (a2475cf).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #696      +/-   ##
==========================================
+ Coverage   95.36%   95.95%   +0.59%     
==========================================
  Files           7        6       -1     
  Lines         302      297       -5     
  Branches       77       77              
==========================================
- Hits          288      285       -3     
+ Misses         14       12       -2     

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

@zombieJ zombieJ merged commit d9662d5 into master Jan 28, 2025
12 checks passed
@zombieJ zombieJ deleted the bump-father-plugin branch January 28, 2025 06:06
@afc163
Copy link
Member

afc163 commented Feb 7, 2025

README 里没改。

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.

3 participants