refactor!: rename native host APIs to bundle preparation - #649
Conversation
|
Navigate logical layers of code changes, visualize relationships, and explore their blast radius. No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: defaults Review profile: CHILL Plan: Advanced Run ID: 📒 Files selected for processing (13)
🚧 Files skipped from review as they are similar to previous changes (1)
Included review availability: This review used your included allowance. Your plan provides up to 4 included reviews per hour; 2 remain after this review. 📝 WalkthroughWalkthroughThe native host API is renamed to bundle-preparation terminology across Android, Harmony, and iOS. Result and configuration types are renamed without changing their described values or validation. Migration documentation and tests are updated. ChangesNative Host API Rename
Priority: ➖ Normal Estimated code review effort: 3 (Moderate) | ~25 minutes Change: Refactor Merge Risk: ⚪ Minimal · up to The native API rename appears ready to merge after normal checks. Native hosts must update their calls and rebuild as documented. Security Architecture ReviewSecurity architecture risk: 🔵 Low · up to The native API rename requires host applications to migrate, but the reviewed preparation paths retain their existing checks and state ownership. No newly exposed security path was identified. External caller coverage remains incomplete. Retained concerns Security review detailsSecurity Blast Radius
Trust Boundaries and Controls
Resilience and Maintainability Implications
🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Full details: Docstring CoverageExplanation Docstring coverage is 20.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 30 functions across 16 files. (3 skipped: 3 unsupported.)
✨ Finishing Touches 💡 1📝 Generate docstrings 💡
🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
…ter 10.56.0
- iOS: RCTPushyNativeConfigurationCompletion -> RCTPushyConfigurationCompletion,
RCTPushyNormalizeNativeConfig -> RCTPushyNormalizeConfiguration,
RCTPushyNativeConfig.{h,mm} -> RCTPushyConfiguration.{h,mm}
- Harmony: NativeUpdateRound -> BundlePreparationRound,
PersistedNativeUpdateConfig -> PersistedPushyConfiguration
- Android/Harmony: "configure native update" error text -> "persist configuration"
- Naming test now scans every shipped native source for old host names and
"native update" wording (JNI-bound NativeUpdateCore/Flow excepted)
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Summary / 改动
Rename the bridge-free native-host entry points consistently across Android, iOS/Swift, and HarmonyOS, using bundle-preparation terminology rather than
checkAndUpdate.PushyNativeUpdate.checkAndUpdate(context, callback)PushyRuntime.prepareBundle(context, callback)checkAndUpdateWithCompletion:prepareBundleWithCompletion:checkAndUpdate(completion:)prepareBundle(completion:)PushyFileJSBundleProvider.checkAndUpdate()PushyFileJSBundleProvider.prepareBundle()NativeUpdateResultBundlePreparationResultNativeUpdateConfigPushyConfigurationRCTPushyNativeUpdateCompletionRCTPushyBundlePreparationCompletionCompatibility / 兼容性边界
This is a source-breaking native-host API rename, not a behavior change.
configureretains its name. Preparation still starts, joins, or reuses the existing native round after real launch bundle resolution; it does not reload the running React Native instance. Activation still selects a bundle for the next launch.The public JavaScript SDK, TurboModule/legacy bridge contract (
src/NativePushy.ts), server HTTP paths, configuration values, result fields/status strings (includingnoUpdate), and persisted keys are unchanged. Package identity, version, and dependencies are unchanged. This PR does not remove every occurrence ofupdatefrom the package or binary.原生宿主需要同步修改调用方法、导入及类型,并重新构建/分发原生安装包;不能仅靠 JS 热更新完成原生接口重命名。Apple 平台按正常升级流程重新运行
pod install,Harmony 使用重新构建的匹配 HAR。不得为了调用prepareBundle再次解析启动 bundle。Validation / 验证
Completed on the renamed source in validation run:
bun install --frozen-lockfile— passed.bun test src/__tests__— 320 passed, 0 failed, across 20 files.tsc --noEmit— passed.Actual native compilation/E2E results are tracked separately by the existing PR checks. The temporary branch-scoped refactor workflow has been removed; the final diff does not alter CI workflows or test selection. No merge or release is included.
Need help on this PR? Tag
@codesmith-botwith what you need. Autofix is disabled.Summary by CodeRabbit
prepareBundleentry points, startup sequence, migration steps, and rebuild requirements.