Skip to content

Conversation

@ByteZhang1024
Copy link
Contributor

@ByteZhang1024 ByteZhang1024 commented Oct 22, 2025

Summary by CodeRabbit

  • Chores
    • Updated Connect Source to version 1.1.16-alpha.1

@coderabbitai
Copy link
Contributor

coderabbitai bot commented Oct 22, 2025

Walkthrough

Updated the default Connect Source URL version from 1.1.15 to 1.1.16-alpha.1 in the getConnectSrc function. The conditional logic for environment variable override and CDN fallback remains unchanged. Function signature and error handling unaffected.

Changes

Cohort / File(s) Summary
Version Update
packages/connect-examples/shared-constants/constants.js
Updated default Connect Source URL version from 1.1.15 to 1.1.16-alpha.1 in getConnectSrc function.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~2 minutes

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "chore: update example 1.1.16-alpha.1" directly references the main factual change—upgrading to version 1.1.16-alpha.1. While "update example" could be more specific about what exactly is being updated (the Connect Source URL in the constants file), the title does clearly indicate that this is a maintenance task updating an example component to a new version. The version number provides concrete context for reviewers scanning the history to understand the update scope, making this a valid partially related title that captures a real aspect of the changeset.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate docstrings
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Post copyable unit tests in a comment
  • Commit unit tests in branch chore/example

Comment @coderabbitai help to get the list of available commands and usage tips.

@revan-zhang
Copy link
Contributor

revan-zhang commented Oct 22, 2025

Snyk checks have passed. No issues have been found so far.

Status Scanner Critical High Medium Low Total (0)
Open Source Security 0 0 0 0 0 issues
Licenses 0 0 0 0 0 issues

💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse.

Copy link
Contributor

@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

📜 Review details

Configuration used: CodeRabbit UI

Review profile: ASSERTIVE

Plan: Pro

Cache: Disabled due to data retention organization setting

Knowledge base: Disabled due to data retention organization setting

Disabled knowledge base sources:

  • Jira integration is disabled by default for public repositories

You can enable these sources in your CodeRabbit configuration.

📥 Commits

Reviewing files that changed from the base of the PR and between f8e7306 and 5fefaec.

📒 Files selected for processing (1)
  • packages/connect-examples/shared-constants/constants.js (1 hunks)
⏰ Context from checks skipped due to timeout of 90000ms. You can increase the timeout in your CodeRabbit configuration to a maximum of 15 minutes (900000ms). (6)
  • GitHub Check: build_expo
  • GitHub Check: build_new_example
  • GitHub Check: Socket Security: Pull Request Alerts
  • GitHub Check: Socket Security: Project Report
  • GitHub Check: build (22)
  • GitHub Check: lint (22)

Comment on lines +12 to +13
export const getConnectSrc = () =>
process.env.CONNECT_SRC || `https://jssdk.onekey.so/1.1.16-alpha.1/`;
Copy link
Contributor

Choose a reason for hiding this comment

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

⚠️ Potential issue | 🔴 Critical

🧩 Analysis chain

Alpha version as production fallback—verify this is intentional.

Using 1.1.16-alpha.1 means users running examples without the CONNECT_SRC env var will hit an alpha (pre-release) build. Alpha versions can be unstable.

Is this intentional for examples? Also verify the CDN URL exists and this version matches your package.json.


🏁 Script executed:

#!/bin/bash
# Verify the CDN URL is accessible and check package.json version alignment

echo "=== Checking CDN URL availability ==="
curl -I "https://jssdk.onekey.so/1.1.16-alpha.1/" 2>&1 | head -n 1

echo -e "\n=== Checking package.json versions in examples ==="
fd -e json "package.json" packages/connect-examples -x cat {} \; -x echo "---"

Length of output: 10266


Update shared-constants/package.json version to match—version mismatch detected.

The constants.js file now uses 1.1.16-alpha.1, but packages/connect-examples/shared-constants/package.json is still at version 1.1.15. Update the package.json to 1.1.16-alpha.1 to stay in sync with the other examples packages.

Also note: using an alpha version as the production CDN fallback could cause instability. Verify this is intentional and ensure users have a way to override it via CONNECT_SRC.

🤖 Prompt for AI Agents
In packages/connect-examples/shared-constants/constants.js around lines 12-13,
the code uses CONNECT_SRC default 1.1.16-alpha.1 while
packages/connect-examples/shared-constants/package.json is still at 1.1.15 —
update package.json version to 1.1.16-alpha.1 to match, bump any related
peer/dependency/version fields, and publish/update lockfiles as needed;
additionally verify that using an alpha CDN fallback is intentional and, if not,
change the default to a stable tag or document this choice and ensure
README/package.json clearly states that CONNECT_SRC environment variable
overrides the default.

@wabicai wabicai closed this Oct 29, 2025
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.

4 participants