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: fix icon svg #2742

Merged
merged 3 commits into from
Nov 13, 2024
Merged

chore: fix icon svg #2742

merged 3 commits into from
Nov 13, 2024

Conversation

xiaoyatong
Copy link
Collaborator

@xiaoyatong xiaoyatong commented Nov 12, 2024

🤔 这个变动的性质是?

  • 新特性提交
  • 日常 bug 修复
  • 站点、文档改进
  • 演示代码改进
  • 组件样式/交互改进
  • TypeScript 定义更新
  • 包体积优化
  • 性能优化
  • 功能增强
  • 国际化改进
  • 重构
  • 代码风格优化
  • 测试用例
  • 分支合并
  • 其他改动(是关于什么的改动?)

🔗 相关 Issue

💡 需求背景和解决方案

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

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

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

Summary by CodeRabbit

  • 新特性

    • 更新了多个 @tarojs 依赖包的版本,提升了项目的稳定性和功能性。
  • 依赖更新

    • 移除了 react-native 依赖,简化了项目结构。
  • 配置优化

    • 改进了环境变量处理和配置文件的可读性,增强了配置的维护性。
  • 版本管理

    • 更新了 @nutui/icons-react-taro 和其他相关依赖的版本,确保使用最新的功能和修复。
  • 文件忽略

    • 添加了 .npmrc.gitignore 文件中,防止其被 Git 跟踪。

Copy link

coderabbitai bot commented Nov 12, 2024

Walkthrough

本次拉取请求对@nutui/nutui-react-taro@nutui/nutui-taro-demo项目的package.json文件进行了依赖版本更新,主要将多个@tarojs相关包的版本从4.0.0-beta.138更新至4.0.8-beta.0,同时移除了react-native依赖。此外,nutui-taro-demo的配置文件也进行了环境变量处理和插件管理的优化,更新了@jd-oh/taro_cpp_library的版本。

Changes

文件路径 更改摘要
packages/nutui-taro-demo/package.json 更新多个@tarojs依赖版本,从4.0.0-beta.138更新至4.0.8-beta.0,移除react-native依赖。
package.json 更新多个@tarojs依赖版本,从4.0.0-beta.138更新至4.0.8-beta.0,移除react-native依赖。
packages/nutui-taro-demo/config/index.js 简化环境变量的条件逻辑,优化插件管理,更新@jd-oh/taro_cpp_library版本,改进项目路径格式。

Possibly related PRs

Suggested labels

size/XL

Suggested reviewers

  • oasis-cloud

🐰 在更新的日子里,
依赖版本齐心协力,
移除旧的react-native
新的旅程开始起步。
配置更清晰,插件更精简,
让我们一起欢庆这变化的春天! 🌼


📜 Recent review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between c6f349b and 7f373e3.

⛔ Files ignored due to path filters (1)
  • pnpm-lock.yaml is excluded by !**/pnpm-lock.yaml
📒 Files selected for processing (1)
  • .gitignore (1 hunks)
✅ Files skipped from review due to trivial changes (1)
  • .gitignore

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 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.

@github-actions github-actions bot added the 3.x label Nov 12, 2024
Copy link

codecov bot commented Nov 12, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 83.99%. Comparing base (304fd2f) to head (7f373e3).
Report is 1 commits behind head on V3.0.

Additional details and impacted files
@@           Coverage Diff           @@
##             V3.0    #2742   +/-   ##
=======================================
  Coverage   83.99%   83.99%           
=======================================
  Files         221      221           
  Lines       17878    17878           
  Branches     2676     2676           
=======================================
  Hits        15016    15016           
  Misses       2857     2857           
  Partials        5        5           

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

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

🧹 Outside diff range and nitpick comments (2)
packages/nutui-taro-demo/config/index.js (2)

134-141: 建议优化项目路径配置的健壮性

当前项目路径配置的改进提高了代码的可读性,但建议添加以下优化:

  1. 添加路径存在性检查
  2. 为未定义的环境添加错误处理

建议按如下方式重构:

 projectPath: path.resolve(
   process.cwd(),
-  isHarmony
-    ? '../nutui-harmony'
-    : isHarmonycpp
-      ? '../nutui-jdharmonycpp'
-      : '../nutui-jdharmony'
+  (() => {
+    if (isHarmony) return '../nutui-harmony'
+    if (isHarmonycpp) return '../nutui-jdharmonycpp'
+    if (!process.env.TARO_ENV) {
+      throw new Error('TARO_ENV 未定义')
+    }
+    return '../nutui-jdharmony'
+  })()
 ),

231-233: 确保异步函数支持的兼容性

启用 asyncFunction 配置是个好的改进,但建议:

  1. 确认目标环境对 async/await 的支持情况
  2. 考虑添加相关的 polyfill
  3. 在构建过程中添加相应的语法转换配置
📜 Review details

Configuration used: CodeRabbit UI
Review profile: CHILL

📥 Commits

Reviewing files that changed from the base of the PR and between 304fd2f and 1867eba.

📒 Files selected for processing (3)
  • package.json (1 hunks)
  • packages/nutui-taro-demo/config/index.js (4 hunks)
  • packages/nutui-taro-demo/package.json (2 hunks)
🔇 Additional comments (7)
packages/nutui-taro-demo/package.json (3)

64-80: 验证 Taro 相关依赖版本一致性

所有 @tarojs/* 包都更新到了 4.0.8-beta.0 版本,这保持了很好的版本一致性。但由于是 beta 版本:

  • 建议在升级前查看 changelog,了解重大变更
  • 确保所有相关功能在升级后都能正常工作
  • 建议在测试环境充分验证
#!/bin/bash
# 检查 Taro 相关包的版本一致性
echo "检查 package.json 中的 Taro 依赖版本..."
rg '"@tarojs/[^"]+": "[^"]+"' | sort | uniq -c

# 检查是否有稳定版本可用
echo "检查 npm 仓库中可用的稳定版本..."
curl -s "https://registry.npmjs.org/@tarojs/taro" | jq '.versions | keys[]' | grep -v "beta" | tail -n 5

60-60: 请注意使用 alpha 版本的潜在风险

@jdtaro/plugin-platform-jdharmony-cpp 使用了 alpha 版本(0.1.2-alpha.0),这可能存在不稳定性风险。建议:

  • 在开发环境充分测试此版本
  • 关注官方更新,待稳定版发布后及时升级
  • 确保有回退方案

91-94: 确保开发依赖版本同步更新

开发相关的 Taro 工具包(CLI、构建工具等)已同步更新到 4.0.8-beta.0,这很好。建议:

  • 在升级后运行完整的构建流程验证
  • 检查新版本是否需要更新构建配置
  • 确保团队所有成员同步更新开发环境

Also applies to: 104-104, 106-106

packages/nutui-taro-demo/config/index.js (2)

18-18: 插件配置需要验证兼容性

建议验证 Harmony 和 JDHarmony CPP 插件的版本兼容性,确保与更新后的 Taro 版本(4.0.8-beta.0)能够正常协同工作。

Also applies to: 51-51

✅ Verification successful

插件版本已确认兼容,无需额外验证

从搜索结果可以看到:

  • @tarojs/plugin-platform-harmony-ets 版本为 4.0.8-beta.0,与 Taro 核心包版本完全一致
  • @jdtaro/plugin-platform-jdharmony-cpp 版本为 0.1.2-alpha.0,作为独立插件已在项目中明确指定版本

由于插件版本与 Taro 主版本保持同步,且依赖关系已明确定义,不存在版本兼容性问题。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查插件版本兼容性
rg -A 1 '"@tarojs/plugin-platform-harmony-ets"|"@jdtaro/plugin-platform-jdharmony-cpp"' package.json

Length of output: 102


Script:

#!/bin/bash
# 在整个仓库中搜索相关的依赖配置
fd package.json --exec rg -A 1 '"@tarojs/plugin-platform-harmony-ets"|"@jdtaro/plugin-platform-jdharmony-cpp"' {}

# 检查 Taro 配置文件中的插件配置
rg -A 5 'plugins:' packages/nutui-taro-demo/config/index.js

# 查找项目中的 Taro 版本
fd package.json --exec rg -A 1 '"@tarojs/taro"' {}

Length of output: 852


128-128: 谨慎使用 alpha 版本依赖

当前配置使用了 @jd-oh/taro_cpp_library 的 alpha 版本(0.1.2-alpha.0),这可能带来潜在风险:

  1. alpha 版本可能存在不稳定性
  2. 可能缺少完整的测试覆盖
  3. 可能包含破坏性更新

建议:

  • 在测试环境充分验证该版本
  • 关注官方更新,待稳定版发布后及时升级
  • 确保有回滚策略
package.json (2)

133-137: 建议验证相关依赖的兼容性

Taro 4.0.8-beta.0 的升级可能会影响其他依赖项:

  1. 请确认此版本与项目中使用的 React 18.2.0 完全兼容
  2. 建议检查 @nutui/icons-react-taro 和 @nutui/jdesign-icons-react-taro 是否支持新版本
✅ Verification successful

Let me check the package.json to verify the dependencies and their versions.


依赖兼容性验证已完成,无需担心

经过验证,当前依赖配置完全兼容:

  1. Taro 4.0.8-beta.0 与 React 18.2.0 完全兼容,因为:

    • package.json 中的 peerDependencies 已声明支持 React ^16.8.0 || ^17.0.0 || ^18.0.0
    • devDependencies 中使用的是 React 18.2.0
  2. @nutui/icons-react-taro 2.0.0-beta.2 和 @nutui/jdesign-icons-react-taro 1.0.6-beta.2 都是专门为 Taro 4.x 设计的版本,可以放心使用。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查项目中 Taro 相关组件的使用
rg --type-add 'tsx:*.tsx' --type tsx '@nutui/(icons-react-taro|jdesign-icons-react-taro)' -A 2

Length of output: 33777


Script:

#!/bin/bash
# Check package.json for React and NutUI dependencies
cat package.json | jq '.dependencies, .devDependencies, .peerDependencies'

Length of output: 3936


133-137: 请验证 Taro 依赖版本升级的兼容性

所有 @tarojs 相关包都从 4.0.0-beta.138 升级到了 4.0.8-beta.0。由于这是测试版本之间的升级:

  1. 建议查看 Taro 4.0.8-beta.0 的更新日志,确认是否存在破坏性更改
  2. 在开发环境中完整测试所有 Taro 相关功能,特别是小程序和 H5 平台的构建和运行

@oasis-cloud oasis-cloud merged commit c04c36a into jdf2e:V3.0 Nov 13, 2024
6 checks passed
This was referenced Nov 22, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants