Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 2 additions & 2 deletions packages/connect-examples/electron-example/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "hardware-example",
"productName": "HardwareExample",
"executableName": "onekey-hardware-example",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"author": "OneKey",
Comment on lines +5 to 6
Copy link
Contributor

Choose a reason for hiding this comment

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

🛠️ Refactor suggestion

Mark example app as private to avoid accidental publish.

Add "private": true. It’s an example; don’t risk publishing it.

   "executableName": "onekey-hardware-example",
   "version": "1.1.11-alpha.2",
+  "private": true,
   "author": "OneKey",
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"version": "1.1.11-alpha.2",
"author": "OneKey",
"executableName": "onekey-hardware-example",
"version": "1.1.11-alpha.2",
"private": true,
"author": "OneKey",
🤖 Prompt for AI Agents
In packages/connect-examples/electron-example/package.json around lines 5 to 6,
the package is not marked private and could be accidentally published; add a
"private": true field to package.json (e.g., as a sibling to "version" and
"author") to prevent npm publishing and commit the change.

"description": "End-to-end encrypted workspaces for teams",
"main": "dist/index.js",
Expand All @@ -22,7 +22,7 @@
"ts:check": "yarn tsc --noEmit"
},
"dependencies": {
"@onekeyfe/hd-transport-electron": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-electron": "1.1.11-alpha.2",
"@stoprocent/noble": "2.3.4",
"debug": "4.3.4",
"electron-is-dev": "^3.0.1",
Expand Down
10 changes: 5 additions & 5 deletions packages/connect-examples/expo-example/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "expo-example",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"scripts": {
"start": "cross-env CONNECT_SRC=https://localhost:8087/ yarn expo start --dev-client",
"android": "yarn expo run:android",
Expand All @@ -19,10 +19,10 @@
"@noble/ed25519": "^2.1.0",
"@noble/hashes": "^1.3.3",
"@noble/secp256k1": "^1.7.1",
"@onekeyfe/hd-ble-sdk": "1.1.12-alpha.0",
"@onekeyfe/hd-common-connect-sdk": "1.1.12-alpha.0",
"@onekeyfe/hd-core": "1.1.12-alpha.0",
"@onekeyfe/hd-web-sdk": "1.1.12-alpha.0",
"@onekeyfe/hd-ble-sdk": "1.1.11-alpha.2",
"@onekeyfe/hd-common-connect-sdk": "1.1.11-alpha.2",
"@onekeyfe/hd-core": "1.1.11-alpha.2",
"@onekeyfe/hd-web-sdk": "1.1.11-alpha.2",
"@onekeyfe/react-native-ble-utils": "^0.1.3",
"@polkadot/util-crypto": "13.1.1",
"@react-native-async-storage/async-storage": "1.21.0",
Expand Down
8 changes: 4 additions & 4 deletions packages/connect-examples/expo-playground/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "onekey-hardware-playground",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"private": true,
"sideEffects": [
"app/utils/shim.js",
Expand All @@ -17,9 +17,9 @@
},
"dependencies": {
"@noble/hashes": "^1.8.0",
"@onekeyfe/hd-core": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-web-sdk": "1.1.12-alpha.0",
"@onekeyfe/hd-core": "1.1.11-alpha.2",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-web-sdk": "1.1.11-alpha.2",
"@radix-ui/react-checkbox": "^1.3.2",
"@radix-ui/react-dialog": "^1.1.14",
"@radix-ui/react-dropdown-menu": "^2.1.15",
Expand Down
2 changes: 1 addition & 1 deletion packages/connect-examples/shared-constants/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekey-internal/shared-constants",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"private": true,
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand Down
6 changes: 3 additions & 3 deletions packages/core/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-core",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Versions aligned — add npm dist-tag for alpha publish

Core and its @onekeyfe deps are pinned to 1.1.11-alpha.2. Looks consistent. Add a dist-tag to keep “latest” clean.

Apply:

   "publishConfig": {
-    "access": "public"
+    "access": "public",
+    "tag": "next"
   },

Also applies to: 28-29

🤖 Prompt for AI Agents
In packages/core/package.json around line 3 (and also apply the same change to
the other package.jsons referenced at lines 28-29), the package is using an
alpha version but no npm dist-tag is set; add a publishConfig entry to pin alpha
releases to the "alpha" dist-tag by adding "publishConfig": { "tag": "alpha" }
(place it near the top-level fields, e.g., after "version") so npm publish will
use the alpha tag and keep "latest" clean.

"description": "Core processes and APIs for communicating with OneKey hardware devices.",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -25,8 +25,8 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"axios": "^0.27.2",
"bignumber.js": "^9.0.2",
"bytebuffer": "^5.0.1",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -602,7 +602,7 @@ async function connectDeviceForBle(method: BaseMethod, device: Device) {
await device.acquire();
await device.initialize(parseInitOptions(method));
} catch (err) {
if (err.errorCode === HardwareErrorCode.BleTimeoutError && bleTimeoutRetry <= 5) {
if (err.errorCode === HardwareErrorCode.BleTimeoutError && bleTimeoutRetry <= 1) {
bleTimeoutRetry += 1;
Log.debug(`Bletooth connect timeout and will retry, retry count: ${bleTimeoutRetry}`);
await wait(3000);
Expand Down
8 changes: 4 additions & 4 deletions packages/hd-ble-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-ble-sdk",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -20,8 +20,8 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-core": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-react-native": "1.1.12-alpha.0"
"@onekeyfe/hd-core": "1.1.11-alpha.2",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport-react-native": "1.1.11-alpha.2"
}
}
14 changes: 7 additions & 7 deletions packages/hd-common-connect-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-common-connect-sdk",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -20,11 +20,11 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-core": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-emulator": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-http": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-lowlevel": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-web-device": "1.1.12-alpha.0"
"@onekeyfe/hd-core": "1.1.11-alpha.2",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport-emulator": "1.1.11-alpha.2",
"@onekeyfe/hd-transport-http": "1.1.11-alpha.2",
"@onekeyfe/hd-transport-lowlevel": "1.1.11-alpha.2",
"@onekeyfe/hd-transport-web-device": "1.1.11-alpha.2"
}
}
8 changes: 4 additions & 4 deletions packages/hd-transport-electron/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-electron",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
Expand All @@ -25,9 +25,9 @@
"electron-log": ">=4.0.0"
},
"dependencies": {
"@onekeyfe/hd-core": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport": "1.1.12-alpha.0",
"@onekeyfe/hd-core": "1.1.11-alpha.2",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
Comment on lines +28 to +30
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Deps are consistent. Add alpha dist-tag.

Prevent prerelease from becoming latest on npm.

   "publishConfig": {
-    "access": "public"
+    "access": "public",
+    "tag": "alpha"
   },
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@onekeyfe/hd-core": "1.1.11-alpha.2",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"publishConfig": {
"access": "public",
"tag": "alpha"
},
🤖 Prompt for AI Agents
In packages/hd-transport-electron/package.json around lines 28–30, the
prerelease dependency versions need an npm dist-tag so the alpha release does
not become the latest; add a publishConfig with "tag": "alpha" to package.json
(or ensure CI invokes npm publish --tag alpha) so published prereleases use the
"alpha" dist-tag instead of "latest".

"@stoprocent/noble": "2.3.4",
"p-retry": "^4.6.2"
},
Expand Down
6 changes: 3 additions & 3 deletions packages/hd-transport-emulator/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-emulator",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Use alpha dist-tag on publish.

Same prerelease safeguard here.

   "publishConfig": {
-    "access": "public"
+    "access": "public",
+    "tag": "alpha"
   },

Also applies to: 27-28

🤖 Prompt for AI Agents
In packages/hd-transport-emulator/package.json around line 3 (and also update
lines 27-28), add a publishConfig entry to set the npm dist-tag to "alpha" for
this prerelease; specifically add or update "publishConfig": { "tag": "alpha" }
in package.json so publishing uses the alpha dist-tag, and ensure any other
package.json entries referenced at lines 27-28 follow the same change.

"description": "hardware emulator transport",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -24,8 +24,8 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"axios": "^0.27.2",
"secure-json-parse": "^4.0.0"
}
Expand Down
6 changes: 3 additions & 3 deletions packages/hd-transport-http/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-http",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"description": "hardware http transport",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand All @@ -24,8 +24,8 @@
"url": "https://github.com/OneKeyHQ/hardware-js-sdk/issues"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"axios": "^0.27.2",
"secure-json-parse": "^4.0.0"
}
Comment on lines +27 to 31
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Plan axios upgrade to ^1.x in a follow-up.

^0.27.2 is dated; upgrade separately and run tests.

Also add an alpha dist-tag:

   "publishConfig": {
-    "access": "public"
+    "access": "public",
+    "tag": "alpha"
   },
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"axios": "^0.27.2",
"secure-json-parse": "^4.0.0"
}
"publishConfig": {
"access": "public",
"tag": "alpha"
},
🤖 Prompt for AI Agents
In packages/hd-transport-http/package.json around lines 27 to 31, keep the
current axios dependency as-is for now but add a follow-up task to upgrade to
^1.x and run the test suite; also add a publishConfig with "tag": "alpha" so npm
publishes use the alpha dist-tag (e.g. add "publishConfig": {"tag":"alpha"})
before publishing. Ensure tests pass after adding publishConfig and create a
short issue/PR to perform the axios^1.x upgrade and test changes separately.

Expand Down
6 changes: 3 additions & 3 deletions packages/hd-transport-lowlevel/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-lowlevel",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -19,7 +19,7 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport": "1.1.12-alpha.0"
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2"
}
}
8 changes: 4 additions & 4 deletions packages/hd-transport-react-native/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-react-native",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
"main": "dist/index.js",
Expand All @@ -19,9 +19,9 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport": "1.1.12-alpha.0",
"@onekeyfe/react-native-ble-utils": "^0.1.4",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"@onekeyfe/react-native-ble-utils": "npm:react-native-ble-utils@^0.1.7",
Comment on lines +22 to +24
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Pin internal deps consistently across the monorepo.

All internal @onekeyfe deps here use 1.1.11-alpha.2. Make sure every package matches to prevent install 404s.

Run:


🏁 Script executed:

#!/bin/bash
set -euo pipefail
echo "Internal versions:"
jq -r 'select(.name|startswith("@onekeyfe/")) | "\(.name)@\(.version)"' packages/**/package.json | sort
echo
echo "Cross-dep pins not matching their package version:"
python - <<'PY'
import json,glob,os,sys
issues=[]
for path in glob.glob("packages/**/package.json", recursive=True):
    data=json.load(open(path))
    name=data.get("name","")
    version=data.get("version","")
    for sec in ("dependencies","devDependencies","peerDependencies"):
        for k,v in (data.get(sec) or {}).items():
            if k.startswith("@onekeyfe/") and v==version: continue
    # naive check: ensure internal deps are pinned to some 1.1.11-alpha.2
    for sec in ("dependencies","devDependencies"):
        deps=(data.get(sec) or {})
        for k,v in deps.items():
            if k.startswith("@onekeyfe/") and "1.1.11-alpha.2" not in v:
                issues.append((path,k,v))
for p,k,v in issues: print(f"{p}: {k} -> {v}")
PY

Length of output: 1550


Pin internal @onekeyfe deps to 1.1.11-alpha.2 across the repo

Detected mismatches:

  • packages/connect-examples/expo-example/package.json: @onekeyfe/react-native-ble-utils → ^0.1.3
  • packages/hd-transport-react-native/package.json: @onekeyfe/react-native-ble-utils → npm:react-native-ble-utils@^0.1.7
  • packages/hd-web-sdk/package.json: @onekeyfe/cross-inpage-provider-core → ^0.0.17

Update these to 1.1.11-alpha.2 to prevent install errors.

🤖 Prompt for AI Agents
In packages/hd-transport-react-native/package.json lines 22-24, the internal
@onekeyfe dependency versions are inconsistent; update the mismatched entries
across the repo to the pinned version 1.1.11-alpha.2. Replace
"@onekeyfe/react-native-ble-utils": "npm:react-native-ble-utils@^0.1.7" (and any
other occurrences noted in packages/connect-examples/expo-example/package.json
and packages/hd-web-sdk/package.json) with the exact internal package reference
and version "@onekeyfe/react-native-ble-utils": "1.1.11-alpha.2" (and set
"@onekeyfe/cross-inpage-provider-core": "1.1.11-alpha.2" and any other @onekeyfe
packages listed to "1.1.11-alpha.2") so all internal @onekeyfe deps match and
avoid install errors.

"react-native-ble-plx": "3.5.0"
Comment on lines +22 to 25
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify npm alias for @onekeyfe/react-native-ble-utils.

You map the scoped name to external react-native-ble-utils@^0.1.7. If this is intentional, consider depending on react-native-ble-utils directly to avoid scope confusion. If not, pin to the internal version like other @onekeyfe deps.

Proposed options:

-    "@onekeyfe/react-native-ble-utils": "npm:react-native-ble-utils@^0.1.7",
+    "react-native-ble-utils": "^0.1.7",

or

-    "@onekeyfe/react-native-ble-utils": "npm:react-native-ble-utils@^0.1.7",
+    "@onekeyfe/react-native-ble-utils": "1.1.11-alpha.2",

Also add an alpha dist-tag to avoid publishing under latest:

   "publishConfig": {
-    "access": "public"
+    "access": "public",
+    "tag": "alpha"
   },

🏁 Script executed:

#!/bin/bash
# Locate internal @onekeyfe/react-native-ble-utils package.json
internal_file=$(rg -l '"name": "@onekeyfe/react-native-ble-utils"' -n .)
echo "Internal file: ${internal_file:-not found}"
if [ -n "$internal_file" ]; then
  grep -n '"version"' "$internal_file"
fi

# Check publishConfig in hd-transport-react-native
pkg="packages/hd-transport-react-native/package.json"
echo ""
echo "publishConfig snippet from $pkg:"
grep -n '"publishConfig"' -C3 "$pkg" || echo "publishConfig not found"

Length of output: 616


Use direct react-native-ble-utils and add an alpha dist-tag
The scoped package @onekeyfe/react-native-ble-utils doesn’t exist internally. Swap the alias for the external package and tag this alpha release to avoid publishing under “latest”.

packages/hd-transport-react-native/package.json
@@ Lines 22-25
-    "@onekeyfe/react-native-ble-utils": "npm:react-native-ble-utils@^0.1.7",
+    "react-native-ble-utils": "^0.1.7",

@@ publishConfig
-  "access": "public"
+  "access": "public",
+  "tag": "alpha"
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"@onekeyfe/react-native-ble-utils": "npm:react-native-ble-utils@^0.1.7",
"react-native-ble-plx": "3.5.0"
// In packages/hd-transport-react-native/package.json
"dependencies": {
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2",
"react-native-ble-utils": "^0.1.7",
"react-native-ble-plx": "3.5.0"
},
// … other fields …
"publishConfig": {
"access": "public",
"tag": "alpha"
}
🤖 Prompt for AI Agents
In packages/hd-transport-react-native/package.json around lines 22 to 25, the
dependency uses a nonexistent scoped alias "@onekeyfe/react-native-ble-utils"
and the package needs an alpha dist-tag; replace the aliased dependency with the
upstream package name "react-native-ble-utils" at the appropriate version (e.g.,
^0.1.7 or exact 0.1.7 as needed) and add a publishConfig with "tag": "alpha" (or
ensure npm publish is run with --tag alpha) so this release is published under
the alpha dist-tag instead of latest.

}
}
20 changes: 16 additions & 4 deletions packages/hd-transport-react-native/src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,12 @@ import {
isOnekeyDevice,
} from '@onekeyfe/hd-shared';
import type EventEmitter from 'events';
import { getConnectedDeviceIds, onDeviceBondState, pairDevice } from './BleManager';
import {
getConnectedDeviceIds,
onDeviceBondState,
pairDevice,
getBondedDevices,
} from './BleManager';
import { subscribeBleOn } from './subscribeBleOn';
import {
getBluetoothServiceUuids,
Expand Down Expand Up @@ -260,9 +265,16 @@ export default class ReactNativeBleTransport {

// check device is bonded
if (Platform.OS === 'android') {
const bondState = await pairDevice(uuid);
if (bondState.bonding) {
await onDeviceBondState(uuid);
const bondedDevices = await getBondedDevices();
const existsBondedList = bondedDevices.find(
device => device.id.toLowerCase() === uuid.toLowerCase()
);

if (!existsBondedList) {
const bondState = await pairDevice(uuid);
if (bondState.bonding) {
await onDeviceBondState(uuid);
}
}
}

Expand Down
8 changes: 4 additions & 4 deletions packages/hd-transport-web-device/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport-web-device",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "MIT",
Expand All @@ -20,11 +20,11 @@
"lint:fix": "eslint . --fix"
},
"dependencies": {
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport": "1.1.12-alpha.0"
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport": "1.1.11-alpha.2"
},
"devDependencies": {
"@onekeyfe/hd-transport-electron": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-electron": "1.1.11-alpha.2",
"@types/w3c-web-usb": "^1.0.6",
"@types/web-bluetooth": "^0.0.17"
}
Expand Down
2 changes: 1 addition & 1 deletion packages/hd-transport/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-transport",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
"description": "Transport layer abstractions and utilities for OneKey hardware SDK.",
"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
Expand Down
10 changes: 5 additions & 5 deletions packages/hd-web-sdk/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-web-sdk",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

💡 Verification agent

🧩 Analysis chain

Verify workspace-wide prerelease tagging and version sync.

Confirm all packages on 1.1.11-alpha.2 have publishConfig.tag set to alpha and no stragglers remain.

Also applies to: 24-27


🏁 Script executed:

#!/bin/bash
set -euo pipefail
# Find package.json files under packages/
fd -a package.json packages | while read -r f; do
  python - <<'PY' "$f"
import json,sys,os
p=sys.argv[1]
with open(p) as fh:
  j=json.load(fh)
name=j.get("name", os.path.dirname(p))
ver=j.get("version","")
pc=j.get("publishConfig",{})
tag=(pc or {}).get("tag")
if "-" in ver and not (isinstance(pc,dict) and tag=="alpha"):
  print(f"MISSING alpha tag: {p}  name={name}  version={ver}  publishConfig={pc}")
PY
done

echo
echo "Check internal dep pins:"
rg -nP '"@onekeyfe/[^"]+":\s*"1\.1\.11-alpha\.2"' packages | wc -l

Length of output: 4256


Add missing alpha publish tags

  • 16 packages at version 1.1.11-alpha.2 lack a publishConfig.tag: "alpha" entry.
  • 37 internal dependency references to "1.1.11-alpha.2" were found—verify these are intentional.
🤖 Prompt for AI Agents
packages/hd-web-sdk/package.json lines 3-3: package version "1.1.11-alpha.2" is
missing a publishConfig.tag set to "alpha"; add a publishConfig block with
"tag": "alpha" to this package.json (and the other 15 packages at the same
version) so npm publishes them under the alpha dist-tag, and review/update the
37 internal dependency entries that reference "1.1.11-alpha.2" to ensure they
intentionally point to the pre-release (adjust to the correct version or range
if they should reference a stable or workspace reference instead).

"author": "OneKey",
"homepage": "https://github.com/OneKeyHQ/hardware-js-sdk#readme",
"license": "ISC",
Expand All @@ -21,10 +21,10 @@
},
"dependencies": {
"@onekeyfe/cross-inpage-provider-core": "^0.0.17",
"@onekeyfe/hd-core": "1.1.12-alpha.0",
"@onekeyfe/hd-shared": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-http": "1.1.12-alpha.0",
"@onekeyfe/hd-transport-web-device": "1.1.12-alpha.0"
"@onekeyfe/hd-core": "1.1.11-alpha.2",
"@onekeyfe/hd-shared": "1.1.11-alpha.2",
"@onekeyfe/hd-transport-http": "1.1.11-alpha.2",
"@onekeyfe/hd-transport-web-device": "1.1.11-alpha.2"
},
"devDependencies": {
"@babel/plugin-proposal-optional-chaining": "^7.17.12",
Expand Down
2 changes: 1 addition & 1 deletion packages/shared/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@onekeyfe/hd-shared",
"version": "1.1.12-alpha.0",
"version": "1.1.11-alpha.2",
Copy link
Contributor

Choose a reason for hiding this comment

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

🧹 Nitpick (assertive)

Version bump looks good. Add a pre-release publish tag.

To avoid publishing this alpha as "latest" on npm, set a publish tag.

Apply:

-  "publishConfig": {
-    "access": "public"
-  },
+  "publishConfig": {
+    "access": "public",
+    "tag": "next"
+  },
📝 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. Thoroughly test & benchmark the code to ensure it meets the requirements.

Suggested change
"version": "1.1.11-alpha.2",
"publishConfig": {
"access": "public",
"tag": "next"
},
🤖 Prompt for AI Agents
packages/shared/package.json around line 3: add a pre-release publish tag so
this alpha version is not published as "latest"; update the package.json to
include a publishConfig with a tag (for example "alpha") or otherwise ensure the
CI/npm publish step uses --tag alpha; specifically add a publishConfig: { "tag":
"alpha" } entry in package.json so npm will publish this release under the alpha
tag.

"description": "Hardware SDK's shared tool library",
"keywords": [
"Hardware-SDK",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -4810,10 +4810,10 @@
resolved "https://registry.yarnpkg.com/@onekeyfe/react-native-ble-utils/-/react-native-ble-utils-0.1.3.tgz#5b6b669c53e11b960b77554529d08ef0be2cbf71"
integrity sha512-zzLpkjtHZ+GoafJst3gTbvEvPsqeEV3l5FIsmB7Z16MEMSJwkBmH9me/dHvo9qlIcLfttpewAyFQjSfEnrrvOg==

"@onekeyfe/react-native-ble-utils@^0.1.4":
version "0.1.4"
resolved "https://registry.yarnpkg.com/@onekeyfe/react-native-ble-utils/-/react-native-ble-utils-0.1.4.tgz#4a262d30cd226e94f1c697c08a3a85a44310690c"
integrity sha512-DTKjjFKdkGktx/qqdu7STFAjpD6ZI3Rdfcyvv/a1Ho4GBs9F/nOJyxEhqiUNbY4XZoVHSwYy2cxYrdX4zGY6eA==
"@onekeyfe/react-native-ble-utils@npm:react-native-ble-utils@^0.1.7":
version "0.1.7"
resolved "https://registry.yarnpkg.com/react-native-ble-utils/-/react-native-ble-utils-0.1.7.tgz#01c2cfe0edb3f37e86800fa4baa9b347afc8de1b"
integrity sha512-6fttsWSVoYm/r+eHoZOrZbdGIv28d6ugNQVb9KQ01uhfcNthzY23dUluh/AsjZnY9FNCY2bsc9V2vfUYWm2IWA==

"@peculiar/asn1-schema@^2.3.8":
version "2.3.13"
Expand Down