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

optimize: allnetwork #369

Merged
merged 2 commits into from
Sep 29, 2024
Merged

optimize: allnetwork #369

merged 2 commits into from
Sep 29, 2024

Conversation

ByteZhang1024
Copy link
Contributor

@ByteZhang1024 ByteZhang1024 commented Sep 29, 2024

Summary by CodeRabbit

  • 新功能
    • 更新多个软件包至版本 1.0.12-alpha.0,引入了预发布版本,可能包含不稳定或不完整的功能。
  • 依赖更新
    • 更新多个依赖项的版本,以支持新功能和改进。
  • 修复
    • 修改了比特币网络配置的方法名称,以改善比特币地址的处理方式。

Copy link

coderabbitai bot commented Sep 29, 2024

Walkthrough

此次更改涉及多个软件包的版本更新,从 1.0.11 升级至 1.0.12-alpha.0。这些更改包括更新依赖项的版本,反映出软件包的预发布状态。具体文件中,常量和类型定义也进行了相应的调整,以支持新的功能和数据结构。

Changes

文件路径 更改摘要
packages/connect-examples/... hardware-exampleexpo-example 的版本更新至 1.0.12-alpha.0,依赖项版本也相应更新。
packages/core/... @onekeyfe/hd-core 的版本更新至 1.0.12-alpha.0,更新了部分依赖项。
packages/core/src/api/allnetwork/... 更新了 AllNetworkGetAddress.ts 中的 methodName 属性,修改为 'btcGetPublicKey'
packages/core/src/types/api/allNetworkGetAddress.ts 新增 BTC 节点结构,返回类型改为数组。
packages/hd-ble-sdk/... @onekeyfe/hd-ble-sdk 的版本和依赖项更新至 1.0.12-alpha.0
packages/hd-common-connect-sdk/... 所有依赖项更新至 1.0.12-alpha.0
packages/hd-transport-http/... 更新版本至 1.0.12-alpha.0,部分依赖项也进行了更新。
packages/hd-transport-lowlevel/... 更新版本至 1.0.12-alpha.0,依赖项版本更新。
packages/hd-transport-react-native/... 更新版本至 1.0.12-alpha.0,依赖项版本更新。
packages/hd-transport-webusb/... 更新版本至 1.0.12-alpha.0,依赖项版本更新。
packages/hd-transport/... 更新版本至 1.0.12-alpha.0
packages/hd-web-sdk/... 更新版本和多个依赖项至 1.0.12-alpha.0
packages/shared/... 更新版本至 1.0.12-alpha.0

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 or 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: 3

🧹 Outside diff range comments (1)
packages/connect-examples/expo-example/package.json (1)

Line range hint 3-22: 建议:全面测试新版本

alpha 版本可能不稳定。合并前,请彻底测试所有功能,确保与其他依赖兼容。

📜 Review details

Configuration used: CodeRabbit UI
Review profile: ASSERTIVE

📥 Commits

Files that changed from the base of the PR and between c79b39b and 4707d9f.

📒 Files selected for processing (15)
  • packages/connect-examples/electron-example/package.json (1 hunks)
  • packages/connect-examples/expo-example/package.json (2 hunks)
  • packages/connect-examples/expo-example/src/constants/connect.ts (1 hunks)
  • packages/core/package.json (2 hunks)
  • packages/core/src/api/allnetwork/AllNetworkGetAddress.ts (1 hunks)
  • packages/core/src/types/api/allNetworkGetAddress.ts (2 hunks)
  • packages/hd-ble-sdk/package.json (2 hunks)
  • packages/hd-common-connect-sdk/package.json (2 hunks)
  • packages/hd-transport-http/package.json (2 hunks)
  • packages/hd-transport-lowlevel/package.json (2 hunks)
  • packages/hd-transport-react-native/package.json (2 hunks)
  • packages/hd-transport-webusb/package.json (2 hunks)
  • packages/hd-transport/package.json (1 hunks)
  • packages/hd-web-sdk/package.json (2 hunks)
  • packages/shared/package.json (1 hunks)
🔇 Additional comments (22)
packages/connect-examples/expo-example/src/constants/connect.ts (1)

1-2: SDK 版本更新和本地开发选项

SDK 版本从 1.0.10 升级到了 1.0.12-alpha.0。注意,这是预发布版本,可能不稳定。

保留了本地开发 URL 注释很好,方便切换。考虑用环境变量控制 URL 选择?

✅ Verification successful

修正 SDK 版本搜索脚本

之前的脚本无法识别 typescript 类型。现在,我们将直接搜索 .ts.tsx 文件。


SDK 版本更新已通过验证

没有在其他 TypeScript 文件中发现旧版本的 SDK URL。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查其他文件是否也更新了 SDK 版本
rg --type typescript "jssdk\.onekey\.so/1\.0\.(10|11)" -l

Length of output: 94


Script:

#!/bin/bash
# 检查其他 TypeScript 文件中是否更新了 SDK 版本
rg "jssdk\.onekey\.so/1\.0\.(10|11)" --glob "*.ts" --glob "*.tsx" -l

Length of output: 70

packages/hd-transport-lowlevel/package.json (2)

3-3: 版本更新至预发布状态

版本号从 1.0.11 升级到 1.0.12-alpha.0,表明这是一个预发布版本。


22-23: 依赖项版本同步更新

@onekeyfe/hd-shared 和 @onekeyfe/hd-transport 的版本都更新到了 ^1.0.12-alpha.0,与包版本一致。这种同步更新很好。

packages/shared/package.json (1)

3-3: 版本更新已确认

版本号从 1.0.11 升级到了 1.0.12-alpha.0,表明进入了 alpha 阶段。

请确保其他依赖此包的项目已更新。运行以下脚本检查:

✅ Verification successful

版本更新已验证

所有依赖项已更新到 1.0.12-alpha.0 版本。请确保 alpha 版本的兼容性和稳定性。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 描述:查找使用 @onekeyfe/hd-shared 的文件
rg --type json '"@onekeyfe/hd-shared":\s*"(.+?)"' -g 'package.json'

Length of output: 746

packages/hd-transport/package.json (1)

3-3: 版本号更新正确。

版本号从 1.0.11 升级到 1.0.12-alpha.0,符合语义化版本规范。

别忘了更新 changelog,记录这次预发布版本的变化。

packages/hd-ble-sdk/package.json (2)

3-3: 版本号更新为预发布版本

版本号从 1.0.11 升级到 1.0.12-alpha.0,表明这是一个预发布版本。确保在正式发布前充分测试新功能。


23-25: 依赖项版本同步更新

三个依赖项的版本已更新,与包版本保持一致。这种同步更新有助于维护包之间的兼容性。

packages/hd-transport-webusb/package.json (1)

3-3: 版本更新检查

包版本和依赖项已更新至1.0.12-alpha.0。这表明正在进行预发布测试。

请确保:

  1. 新功能与alpha版本相符
  2. 更新日志已更新
  3. 测试覆盖了新变化

Also applies to: 23-24

✅ Verification successful

版本更新一致性验证通过

所有相关包的版本已统一更新至1.0.12-alpha.0,符合预发布版本标准。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 检查其他相关包是否也更新了版本
grep -r '"version": "1.0.12-alpha.0"' packages/*/package.json

Length of output: 1099

packages/hd-transport-react-native/package.json (2)

3-3: 版本号更新至预发布版本

版本号从 1.0.11 升级到 1.0.12-alpha.0,表明这是一个预发布版本。请确保这符合您的发布计划。


22-23: 依赖项版本同步更新

@onekeyfe/hd-shared 和 @onekeyfe/hd-transport 的版本已更新,与包版本一致。这很好,保持了版本同步。

packages/hd-transport-http/package.json (2)

3-3: 版本号更新为预发布版本

版本号从 1.0.11 升级到 1.0.12-alpha.0,表明这是一个预发布版本。


27-28: 依赖项版本同步更新

@onekeyfe/hd-shared 和 @onekeyfe/hd-transport 的版本已更新至 ^1.0.12-alpha.0,与包版本保持一致。

packages/hd-common-connect-sdk/package.json (1)

23-27: 依赖项版本同步更新

所有依赖项都更新到了 1.0.12-alpha.0 版本,保持了一致性。这种同步更新有助于避免版本冲突。

packages/core/package.json (3)

3-3: 版本更新正确。

版本号从 1.0.11 升级到 1.0.12-alpha.0,符合语义化版本规范。


28-28: 依赖更新合理。

@onekeyfe/hd-shared 依赖版本更新到 ^1.0.12-alpha.0,与包版本一致。


29-29: 依赖更新合理,建议核实相关包。

@onekeyfe/hd-transport 依赖版本更新到 ^1.0.12-alpha.0,与包版本一致。请确认相关包的变更。

运行以下脚本检查相关包的变更:

✅ Verification successful

依赖更新已验证

@onekeyfe/hd-transport 及其相关依赖包版本一致,更新无误。

🏁 Scripts executed

The following scripts were executed for the analysis:

Script:

#!/bin/bash
# 描述:检查 @onekeyfe/hd-shared 和 @onekeyfe/hd-transport 包的变更。

# 测试:查找这两个包的 package.json 文件并显示其内容。
echo "检查 @onekeyfe/hd-shared 包:"
fd -t f "package.json" | rg "hd-shared" | xargs cat

echo "检查 @onekeyfe/hd-transport 包:"
fd -t f "package.json" | rg "hd-transport" | xargs cat

Length of output: 4225

packages/connect-examples/electron-example/package.json (1)

5-5: 版本更新已确认。

版本号从 1.0.11 升级到 1.0.12-alpha.0,表明项目进入了新的测试阶段。

请确保相关文档和发布说明已更新,以反映此alpha版本的变化:

packages/hd-web-sdk/package.json (2)

3-3: 版本更新至预发布状态

包版本从 1.0.11 升级到 1.0.12-alpha.0,表明这是新小版本的预发布。


24-27: 依赖包版本同步更新

四个依赖包版本已更新至 1.0.12-alpha.0,与主包版本一致。这确保了包之间的兼容性。

packages/connect-examples/expo-example/package.json (2)

19-22: @onekeyfe 依赖同步更新

@onekeyfe 相关依赖已更新到 1.0.12-alpha.0。保持一致性很好,但要注意可能的兼容性问题。

#!/bin/bash
# 检查所有 @onekeyfe 依赖版本是否一致
jq -r '.dependencies | to_entries[] | select(.key | startswith("@onekeyfe")) | .value' packages/connect-examples/expo-example/package.json | sort | uniq -c

3-3: 版本更新到预发布状态

项目版本从 1.0.11 升级到 1.0.12-alpha.0。这是预发布版本,可能包含重大变更。

packages/core/src/types/api/allNetworkGetAddress.ts (1)

92-92: 函数返回类型修改,需检查调用方

allNetworkGetAddress函数的返回类型从Response<AllNetworkAddress>修改为Response<AllNetworkAddress[]>。请确保所有调用此函数的代码已更新,正确处理返回的数组类型。

运行以下脚本查找并检查函数的调用:

#!/bin/bash
# 描述:查找所有调用allNetworkGetAddress的地方
# 预期:调用方应处理返回的数组类型

rg --type ts 'allNetworkGetAddress' -A 5 -B 2

@ByteZhang1024 ByteZhang1024 merged commit f71d293 into onekey Sep 29, 2024
7 checks passed
@ByteZhang1024 ByteZhang1024 deleted the optimize/allnetwork branch September 29, 2024 08:32
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