-
Notifications
You must be signed in to change notification settings - Fork 13
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
Feat/unexpect error #403
Feat/unexpect error #403
Conversation
WalkthroughThis pull request involves a version update across multiple packages in the OneKey SDK ecosystem. The version has been incremented from "1.0.19-alpha.0" to "1.0.19" for various packages, including core SDK components, transport layers, and example projects. Additionally, the error handling in the Changes
Sequence DiagramsequenceDiagram
participant DeviceCommands
participant HardwareError
participant TypedError
DeviceCommands->>HardwareError: Catch error
alt Is HardwareError
DeviceCommands->>TypedError: Throw ResponseUnexpectTypeError
end
The sequence diagram illustrates the new error handling logic in the 🪧 TipsChatThere are 3 ways to chat with CodeRabbit:
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)
Other keywords and placeholders
CodeRabbit Configuration File (
|
👍 Dependency issues cleared. Learn more about Socket for GitHub ↗︎ This PR previously contained dependency changes with security issues that have been resolved, removed, or ignored. |
There was a problem hiding this 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
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (13)
packages/connect-examples/electron-example/package.json
(1 hunks)packages/connect-examples/expo-example/package.json
(2 hunks)packages/core/package.json
(2 hunks)packages/core/src/device/DeviceCommands.ts
(1 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 (14)
packages/core/src/device/DeviceCommands.ts (1)
173-173
: Good addition to error handling!This explicit error throw makes the unexpected type error handling more consistent with other error cases.
packages/hd-transport-lowlevel/package.json (1)
3-3
: Version updates look consistent.Package version and dependencies are aligned at 1.0.19-alpha.1.
Also applies to: 22-23
packages/shared/package.json (1)
3-3
: Version update is aligned.Version bump to 1.0.19-alpha.1 matches other packages.
packages/hd-transport/package.json (1)
3-3
: Version update is consistent.Version bump to 1.0.19-alpha.1 matches other packages.
packages/hd-ble-sdk/package.json (1)
3-3
: Version updates look consistent.Package version and dependencies are properly aligned to 1.0.19-alpha.1.
Also applies to: 23-25
packages/hd-transport-webusb/package.json (1)
3-3
: Version alignment confirmed.Package version and dependencies match the expected 1.0.19-alpha.1 update.
Also applies to: 23-24
packages/hd-transport-react-native/package.json (1)
3-3
: Version updates are consistent.Package version and dependencies correctly updated to 1.0.19-alpha.1.
Also applies to: 22-23
packages/hd-transport-http/package.json (1)
3-3
: Version updates verified.Package version and dependencies correctly aligned to 1.0.19-alpha.1.
Also applies to: 27-28
packages/hd-common-connect-sdk/package.json (1)
3-3
: Version updates are complete and consistent.Package version and all dependencies properly updated to 1.0.19-alpha.1.
The PR title mentions "Feat/unexpect error" but only shows version bumps. Could you clarify the connection between the version updates and error handling improvements?
Also applies to: 23-27
packages/core/package.json (2)
3-3
: Version updates look consistent.All package versions and dependencies are correctly bumped to 1.0.19-alpha.1.
Also applies to: 28-29
Line range hint
1-42
: PR title mentions error handling changes, but only version bumps are visible.The PR title "Feat/unexpect error" suggests error handling changes, but I only see version updates in the files.
Let's check for error handling changes:
packages/connect-examples/electron-example/package.json (1)
5-5
: Version bump is consistent.Version updated to 1.0.19-alpha.1, matching other packages.
packages/hd-web-sdk/package.json (1)
3-3
: Version updates are aligned.Package version and all @onekeyfe dependencies are correctly updated to 1.0.19-alpha.1.
Also applies to: 24-27
packages/connect-examples/expo-example/package.json (1)
3-3
: Version updates are consistent.Package version and all @onekeyfe dependencies are correctly updated to 1.0.19-alpha.1.
Also applies to: 22-25
Report too large to display inline |
There was a problem hiding this 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
♻️ Duplicate comments (1)
packages/hd-transport/package.json (1)
4-4
: 🧹 Nitpick (assertive)Update the package description.
Replace the TODO placeholder with a proper description of the package's purpose.
- "description": "> TODO: description", + "description": "Hardware SDK transport layer implementation",
📜 Review details
Configuration used: CodeRabbit UI
Review profile: ASSERTIVE
Plan: Pro
📒 Files selected for processing (12)
packages/connect-examples/electron-example/package.json
(1 hunks)packages/connect-examples/expo-example/package.json
(2 hunks)packages/core/package.json
(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 (12)
packages/hd-transport-lowlevel/package.json (1)
3-3
: Version updates look good!Version and dependency updates are consistent with the package ecosystem.
Also applies to: 22-23
packages/shared/package.json (1)
3-3
: Version update is consistent!Clean transition from alpha to stable version.
packages/hd-ble-sdk/package.json (1)
3-3
: Version and dependency updates are aligned!Package version and dependencies consistently updated to 1.0.19.
Also applies to: 23-25
packages/hd-transport/package.json (1)
3-3
: Version update looks good!Clean transition from alpha to stable version.
packages/hd-transport-webusb/package.json (1)
3-3
: Version and dependency updates are aligned!Package version and dependencies consistently updated to 1.0.19.
Also applies to: 23-24
packages/hd-transport-react-native/package.json (1)
3-3
: Version updates look consistent.The package version and dependencies are properly aligned to "1.0.19".
Also applies to: 22-23
packages/hd-transport-http/package.json (1)
3-3
: Version updates are aligned.Package version and dependencies correctly updated to "1.0.19".
Also applies to: 27-28
packages/hd-common-connect-sdk/package.json (1)
3-3
: Version updates are complete and consistent.Package version and all dependencies properly updated to "1.0.19".
Also applies to: 23-27
packages/core/package.json (1)
3-3
: Version updates are consistent.Package version and dependencies correctly updated to "1.0.19".
Also applies to: 28-29
packages/connect-examples/electron-example/package.json (1)
5-5
: Version update looks good.Package version correctly updated to "1.0.19".
packages/hd-web-sdk/package.json (1)
3-3
: Version bump from alpha to stable looks goodClean transition from alpha (1.0.19-alpha.0) to stable (1.0.19). All @onekeyfe dependencies are properly synchronized.
Let's verify version consistency across all packages:
Also applies to: 24-27
✅ Verification successful
Version consistency verified across HD packages
All HD-related @onekeyfe packages are properly synchronized at ^1.0.19. Different versions for platform-specific packages (react-native-ble-plx) and tooling (cross-inpage-provider-core) are expected and don't impact the core functionality.
🏁 Scripts executed
The following scripts were executed for the analysis:
Script:
#!/bin/bash # Check version consistency across all package.json files find . -name "package.json" -exec jq -r '. | select(.dependencies != null) | .dependencies | with_entries(select(.key | startswith("@onekeyfe"))) | to_entries[] | "\(.key): \(.value)"' {} \;Length of output: 1154
packages/connect-examples/expo-example/package.json (1)
3-3
: Version updates are consistent with SDK coreClean alignment with the SDK version bump (1.0.19). All @onekeyfe dependencies match the core package versions.
Also applies to: 22-25
Summary by CodeRabbit
Version Update
Bug Fixes
Chores