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 trigger version #910

Merged
merged 5 commits into from
Feb 24, 2025
Merged

Conversation

aojunhao123
Copy link
Contributor

@aojunhao123 aojunhao123 commented Feb 21, 2025

Summary by CodeRabbit

  • Chores

    • 更新了构建和发布流程,同时调整了项目依赖,提升整体工具链兼容性。
  • Refactor

    • 统一并更新了多个内部模块的依赖引用,改善了代码结构和可维护性。
    • 修改了 PickerTrigger 组件的弹出层过渡处理方式,采用对象配置替代字符串方式。
  • Tests

    • 更新了测试用例中的依赖路径和模拟方法,确保测试环境与核心改动保持一致。

此次更新主要为内部依赖和引用管理做了优化,用户使用体验保持不变,但为后续提升系统稳定性及功能扩展奠定了良好基础。

Copy link

vercel bot commented Feb 21, 2025

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

Name Status Preview Comments Updated (UTC)
picker ✅ Ready (Inspect) Visit Preview 💬 Add feedback Feb 24, 2025 2:47am

Copy link

socket-security bot commented Feb 21, 2025

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

Package New capabilities Transitives Size Publisher
npm/@rc-component/[email protected] Transitive: environment, eval, filesystem, network, shell, unsafe +248 22.4 MB zombiej
npm/@rc-component/[email protected] environment 0 33.4 kB zombiej
npm/@rc-component/[email protected] 🔁 npm/@rc-component/[email protected] None +6 824 kB zombiej
npm/@rc-component/[email protected] environment +1 202 kB zombiej

🚮 Removed packages: npm/[email protected]

View full report↗︎

Copy link

coderabbitai bot commented Feb 21, 2025

Walkthrough

本次 PR 主要针对依赖更新与导入路径调整。在 package.json 中,预发布脚本以及部分依赖项和开发依赖项被修改;多个组件、hook 和测试文件中的模块引用由旧的 rc-utilrc-resize-observer 更新为新的 @rc-component/util@rc-component/resize-observer。代码逻辑保持不变,仅进行依赖管理和格式优化调整。

Changes

文件 修改摘要
package.json 更新预发布脚本(从 np --yolo --no-publish 改为 rc-np);移除 @babel/runtimerc-resize-observerrc-util;添加或更新 @rc-component/resize-observer@rc-component/trigger@rc-component/util;开发依赖由 np 替换为 @rc-component/np
src/PickerInput/** 更新组件与 hook 的导入路径:如 ResizeObserverrc-resize-observer 改为 @rc-component/resize-observer,其它工具函数从 rc-util 改为 @rc-component/util;部分代码格式得到优化。
src/PickerPanel/** 修改面板相关组件的导入路径(如 useLayoutEffectwarning 等),保持组件逻辑不变。
src/generate/moment.ts, src/hooks/useTimeInfo.ts, src/utils/warnUtil.ts 更新 warningnoteOnce 等工具的导入路径至 @rc-component/util
tests/** 调整测试文件中 resetWarnedKeyCodespyElementPrototypesisVisible 等模块的导入路径;移除冗余测试工具代码,并在 setup 文件中新增全局 ResizeObserver mock。

Possibly related PRs

Suggested reviewers

  • afc163
  • zombieJ

Poem

我是一只快乐的小兔子,🐇
跳跃在代码的花园里,
依赖更新如春风轻拂,
每个导入都焕发新意,
格式整齐,逻辑不改,
代码世界里开心无限!


📜 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 e7ae49b and 31fd2c9.

📒 Files selected for processing (1)
  • tsconfig.json (1 hunks)
🔇 Additional comments (1)
tsconfig.json (1)

13-13: 更新模块路径别名

现在将模块路径别名修改为 @rc-component/picker,与 package.json 中更新后的命名保持一致。请确认项目中所有引用该别名的地方已同步更新,以避免模块加载问题。


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

@coderabbitai coderabbitai bot left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Actionable comments posted: 0

🧹 Nitpick comments (1)
package.json (1)

46-46: 确认 rc-overflow 依赖的版本更新。
此处 rc-overflow 版本标记为 ^1.3.2。建议确认该版本更新是否符合项目整体依赖管理的版本策略,并确保不存在依赖冲突问题。

📜 Review details

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

📥 Commits

Reviewing files that changed from the base of the PR and between ec4f698 and 00709dc.

📒 Files selected for processing (33)
  • package.json (2 hunks)
  • src/PickerInput/Popup/index.tsx (1 hunks)
  • src/PickerInput/RangePicker.tsx (1 hunks)
  • src/PickerInput/Selector/Input.tsx (1 hunks)
  • src/PickerInput/Selector/RangeSelector.tsx (1 hunks)
  • src/PickerInput/Selector/hooks/useClearIcon.tsx (1 hunks)
  • src/PickerInput/Selector/hooks/useInputProps.ts (6 hunks)
  • src/PickerInput/SinglePicker.tsx (1 hunks)
  • src/PickerInput/hooks/useCellRender.ts (2 hunks)
  • src/PickerInput/hooks/useDelayState.ts (2 hunks)
  • src/PickerInput/hooks/useDisabledBoundary.ts (1 hunks)
  • src/PickerInput/hooks/useFilledProps.ts (2 hunks)
  • src/PickerInput/hooks/useInvalidate.ts (3 hunks)
  • src/PickerInput/hooks/useLockEffect.ts (1 hunks)
  • src/PickerInput/hooks/usePresets.ts (2 hunks)
  • src/PickerInput/hooks/useRangePickerValue.ts (2 hunks)
  • src/PickerInput/hooks/useRangeValue.ts (3 hunks)
  • src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx (1 hunks)
  • src/PickerPanel/TimePanel/TimePanelBody/useScrollTo.ts (1 hunks)
  • src/PickerPanel/index.tsx (1 hunks)
  • src/generate/moment.ts (1 hunks)
  • src/hooks/useTimeInfo.ts (1 hunks)
  • src/utils/warnUtil.ts (1 hunks)
  • tests/disabledTime.spec.tsx (1 hunks)
  • tests/keyboard.spec.tsx (1 hunks)
  • tests/loop.spec.tsx (1 hunks)
  • tests/multiple.spec.tsx (1 hunks)
  • tests/new-range.spec.tsx (2 hunks)
  • tests/panel.spec.tsx (1 hunks)
  • tests/picker.spec.tsx (2 hunks)
  • tests/range.spec.tsx (1 hunks)
  • tests/setup.js (1 hunks)
  • tests/time.spec.tsx (1 hunks)
✅ Files skipped from review due to trivial changes (32)
  • tests/keyboard.spec.tsx
  • src/generate/moment.ts
  • src/PickerInput/hooks/useCellRender.ts
  • src/PickerPanel/TimePanel/TimePanelBody/TimeColumn.tsx
  • src/PickerInput/Selector/Input.tsx
  • tests/loop.spec.tsx
  • src/PickerInput/Selector/hooks/useClearIcon.tsx
  • src/utils/warnUtil.ts
  • src/hooks/useTimeInfo.ts
  • src/PickerInput/hooks/useFilledProps.ts
  • tests/panel.spec.tsx
  • src/PickerInput/SinglePicker.tsx
  • src/PickerPanel/index.tsx
  • src/PickerInput/Popup/index.tsx
  • src/PickerInput/hooks/useRangePickerValue.ts
  • src/PickerInput/hooks/useDisabledBoundary.ts
  • src/PickerInput/hooks/useRangeValue.ts
  • tests/time.spec.tsx
  • src/PickerInput/Selector/RangeSelector.tsx
  • src/PickerInput/hooks/useLockEffect.ts
  • tests/multiple.spec.tsx
  • src/PickerInput/hooks/useDelayState.ts
  • src/PickerInput/hooks/useInvalidate.ts
  • src/PickerInput/Selector/hooks/useInputProps.ts
  • tests/setup.js
  • src/PickerInput/hooks/usePresets.ts
  • tests/disabledTime.spec.tsx
  • src/PickerInput/RangePicker.tsx
  • src/PickerPanel/TimePanel/TimePanelBody/useScrollTo.ts
  • tests/range.spec.tsx
  • tests/new-range.spec.tsx
  • tests/picker.spec.tsx
🔇 Additional comments (3)
package.json (3)

32-32: 更新 prepublishOnly 脚本为 rc-np。
将 prepublishOnly 脚本中调用的工具从 np 切换为 rc-np,符合依赖更新的要求。请确认 CI/CD 流程也相应更新,确保新工具正常工作。


42-44: 新增和更新 @rc-component 相关依赖。
依次新增了 @rc-component/resize-observer@rc-component/util,同时将 @rc-component/trigger 的版本从旧版更新为 ^3.0.0。请检查项目中所有模块的引用,确保旧包的依赖已全部切换至新的 @rc-component 包。


53-53: 开发依赖中替换 np 为 @rc-component/np。
新的 devDependency @rc-component/np 替换了旧的 np,用于实现 prepublishOnly 脚本中的预发布任务。请检查项目中是否还有其他地方引用旧的 np,若有,请一并更新。

Copy link

codecov bot commented Feb 21, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 98.71%. Comparing base (ec4f698) to head (7308522).

Additional details and impacted files
@@            Coverage Diff             @@
##           master     #910      +/-   ##
==========================================
- Coverage   98.71%   98.71%   -0.01%     
==========================================
  Files          64       64              
  Lines        2652     2650       -2     
  Branches      736      730       -6     
==========================================
- Hits         2618     2616       -2     
  Misses         31       31              
  Partials        3        3              

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

@zombieJ zombieJ merged commit a1fcf9d into react-component:master Feb 24, 2025
7 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