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(demo): 更新组件引用方式 #2304

Merged
merged 5 commits into from
May 30, 2024

Conversation

oasis-cloud
Copy link
Collaborator

@oasis-cloud oasis-cloud commented May 30, 2024

🤔 这个变动的性质是?

  • 站点、文档改进

🔗 相关 Issue

💡 需求背景和解决方案

☑️ 请求合并前的自查清单

⚠️ 请自检并全部勾选全部选项⚠️

  • 文档已补充或无须补充
  • 代码演示已提供或无须提供
  • TypeScript 定义已补充或无须补充
  • fork仓库代码是否为最新避免文件冲突
  • Files changed 没有 package.json lock 等无关文件

Summary by CodeRabbit

  • 修复

    • 更新了多个组件的依赖路径,以引用新的包 @nutui/nutui-react-taro,确保更好的模块管理和兼容性。
  • 任务

    • 在CI工作流中添加了启用Corepack的步骤,并在设置Node之前进行。
    • 在CI工作流中增加了Yarn的设置步骤,以使用最新版本的Yarn路径。

Copy link

coderabbitai bot commented May 30, 2024

Warning

Rate limit exceeded

@oasis-cloud has exceeded the limit for the number of commits or files that can be reviewed per hour. Please wait 41 minutes and 48 seconds before requesting another review.

How to resolve this issue?

After the wait time has elapsed, a review can be triggered using the @coderabbitai review command as a PR comment. Alternatively, push new commits to this PR.

We recommend that you space out your commits to avoid hitting the rate limit.

How do rate limits work?

CodeRabbit enforces hourly rate limits for each developer per organization.

Our paid plans have higher rate limits than the trial, open-source and free plans. In all cases, we re-allow further reviews after a brief timeout.

Please see our FAQ for further information.

Commits

Files that changed from the base of the PR and between b691669 and 371d117.

Walkthrough

这次更新主要涉及将多个组件的导入路径从@/packages/nutui.react.taro更改为@nutui/nutui-react-taro,这可能是由于包重组或重命名。此外,还在CI工作流程中添加了启用Corepack的步骤和一些格式调整。

Changes

文件路径 更改摘要
src/packages/audio/demo.taro.tsx
src/packages/avatar/demo.taro.tsx
src/packages/badge/demo.taro.tsx
src/packages/button/demo.taro.tsx
src/packages/circleprogress/demo.taro.tsx
src/packages/divider/demo.taro.tsx
src/packages/image/demo.taro.tsx
src/packages/inputnumber/demo.taro.tsx
src/packages/overlay/demo.taro.tsx
src/packages/pagination/demo.taro.tsx
src/packages/price/demo.taro.tsx
src/packages/progress/demo.taro.tsx
src/packages/radio/demo.taro.tsx
src/packages/rate/demo.taro.tsx
src/packages/skeleton/demo.taro.tsx
src/packages/space/demo.taro.tsx
src/packages/sticky/demo.taro.tsx
src/packages/swipe/demo.taro.tsx
src/packages/virtuallist/demo.taro.tsx
Cell组件的导入路径从@/packages/nutui.react.taro更改为@nutui/nutui-react-taro
src/packages/icon/demo.taro.tsx
src/packages/icon/demos/taro/demo7.tsx
CellToast组件的导入路径从@/packages/nutui.react.taro更改为@nutui/nutui-react-taro
src/packages/table/demo.taro.tsx Toast组件的导入路径从@/packages/nutui.react.taro更改为@nutui/nutui-react-taro
.github/workflows/ci.yml 添加启用Corepack的步骤,并进行一些格式调整,添加使用yarn路径设置最新版本的步骤

Poem

在代码的森林里,
路径悄然改变,
组件们欢快地跳跃,
从旧家到新居,
流程更加顺畅,
兔子欢欣鼓舞,
未来更加光明。


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:

‼️ IMPORTANT
Auto-reply has been disabled for this repository in the CodeRabbit settings. The CodeRabbit bot will not respond to your replies unless it is explicitly tagged.

  • 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 generate interesting stats about this repository and render them as a table.
    • @coderabbitai show all the console.log statements in this repository.
    • @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 as 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 resolve resolve all the CodeRabbit review comments.
  • @coderabbitai configuration to show the current CodeRabbit configuration for the repository.
  • @coderabbitai help to get help.

Additionally, you can add @coderabbitai ignore anywhere in the PR description to prevent this PR from being reviewed.

CodeRabbit Configration 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: 1

Outside diff range and nitpick comments (3)
src/packages/icon/demos/taro/demo7.tsx (1)

Line range hint 44-63: 为了提高无障碍访问性,请添加键盘事件处理。

- <li key={icon.name} onClick={() => {
+ <li key={icon.name} onClick={() => { onKeyUp={() => {
src/packages/audio/demo.taro.tsx (1)

Line range hint 62-62: 1. 请避免使用 any 类型,这会降低代码的类型安全性。建议指定更具体的类型。
2. 使用 Number.parseInt 替代全局的 parseInt,以提高代码的清晰度和一致性。

- const time = parseInt(value)
+ const time = Number.parseInt(value)

Also applies to: 74-75, 81-81, 10-10

src/packages/swipe/demo.taro.tsx (1)

Line range hint 164-164: 请避免使用 any 类型,这会降低代码的类型安全性。建议指定更具体的类型。

Also applies to: 166-166, 186-186, 340-340, 346-346, 360-361

@@ -1,6 +1,6 @@
import React, { CSSProperties } from 'react'
Copy link

Choose a reason for hiding this comment

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

请清理未使用的类型导入,这将有助于提高代码的清晰度和维护性。

- import React, { CSSProperties } from 'react'
+ import React from 'react'
+ import type { CSSProperties } from 'react'

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
import React, { CSSProperties } from 'react'
import React from 'react'
import type { CSSProperties } from 'react'

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: 1

@@ -16,6 +16,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Enable Corepack before setting up Node
run: corepack enable
Copy link

Choose a reason for hiding this comment

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

注意到在“安装 pnpm”步骤中也有一个corepack enable命令,这似乎是重复的。建议移除此行,以避免执行不必要的操作。

-      run: corepack enable

Committable suggestion

‼️ IMPORTANT
Carefully review the code before committing. Ensure that it accurately replaces the highlighted code, contains no missing lines, and has no issues with indentation.

Suggested change
run: corepack enable

Copy link

codecov bot commented May 30, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (next@bbdfc59). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             next    #2304   +/-   ##
=======================================
  Coverage        ?   85.87%           
=======================================
  Files           ?      217           
  Lines           ?    22813           
  Branches        ?     2494           
=======================================
  Hits            ?    19591           
  Misses          ?     3217           
  Partials        ?        5           

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

@oasis-cloud oasis-cloud merged commit 16b8c89 into jdf2e:next May 30, 2024
5 checks passed
@oasis-cloud oasis-cloud deleted the chore/update-import-way branch May 30, 2024 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

1 participant