React Native鸿蒙化仓库
| 文件 | 最后提交记录 | 最后更新时间 |
|---|---|---|
chore(Scripts): 修复 rnoh-submit-prs 提交缺陷并新增 changelog 条目只读预检 影响范围: - GitCode API 请求增加 30 秒超时与网络错误捕获(按 G.ERR.09 单捕 OSError,语义等价覆盖 URLError / TimeoutError),修复 create-pr 长时间卡死;PR label 自动推断在接口失败或超时时告警并跳过,不再阻塞创建 PR - patch 路径提取纳入删除与 rename 旧路径,git add 改为 git add -A,修复含 rename / 删除文件的提交无法 stage 的问题 - prepare-branch 新增 --skip-static-check 选项(内置 WordsTool 规则对英文文档误报场景使用);staged whitespace 校验 git diff --check --cached 独立于静态检查执行,不受该选项影响 - 新增上游 remote 命名配置 RNOH_SUBMIT_UPSTREAM_REMOTE / RNOH_SUBMIT_PUSH_REMOTE(优先级:CLI 参数 > 配置 > 默认 public / origin) - Issue / PR 默认 owner 由旧组织名 OpenHarmony-RN 修正为 CPF-RN,issue 模板同步更新;create-pr 成功后输出 PR URL;SKILL.md 分支拓扑更新(main 承载 0.86 线,0.84 线在 0.84-main 维护) - 新增 changelog-preview 子命令:按 generate-changelog.js 相同规则(type 映射、隐藏类型、scope 提取、嵌套 scope 回退、分支与版本前缀后缀清洗、Breaking 判定、Closes #N 关联)只读预览 commit 发版时将生成的 CHANGELOG.md 条目,不修改任何文件;prepare-branch 的 JSON 输出附带 changelog_preview 字段(含真实 commit hash) - scripts/.gitignore 忽略 __pycache__ 与 *.pyc;单元测试扩充至 29 例,changelog 预检与 generate-changelog.js 输出交叉验证一致 Signed-off-by: liu_wentao <liuwentao57@h-partners.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.3) <ai@local> | 1 个月前 | |
chore(Docs): RNOH社区规范文档调整,以及提供对应模板文件 1、RNOH社区规范文档调整 2、配套规范提供对应模板文件 3、tester直接依赖源码编译,需要在entry做debug和release区分 Signed-off-by: gyange <gyange@163.com> | 6 个月前 | |
chore(Config): enforce English subject and require impact description in commitlint - Add rnoh-subject-english rule: block Chinese characters in subject (error level) - Add rnoh-impact-required rule: warn when feat/fix/etc lacks impact description - Register all 10 plugin rules in rules section (was missing, causing them not to execute) - Fix plugin rule return format: [false, msg] instead of [2, msg] - Remove eslint from root lint-staged (no root eslintrc) - Add gitcode/gitmessage to cspell dictionary impact: all commitlint rules and pre-commit pipeline Signed-off-by: gyange <gyange@163.com> | 5 个月前 | |
chore: resolve react-native 0.88.0 from the npm registry react-native@0.88.0 is now published (2026-10-16), so point every workspace package back at the registry version and drop the temporary vendored tarball packages/react-native-0.88.0.tgz together with the root dependency that only existed to make peer resolution work. Also refresh pnpm-lock.yaml and update the 0.88.0 release notes (zh-CN and EN) plus the project release log to describe the final dependency setup. Verified: install from the committed lockfile and pnpm build:rnoh (assembleHar) both succeed. Co-Authored-By: AtomCode (deepseek-flash) <noreply@atomgit.com> Signed-off-by: 坚果 <jianguo@nutpi.net> | 20 天前 | |
chore: resolve react-native 0.88.0 from the npm registry react-native@0.88.0 is now published (2026-10-16), so point every workspace package back at the registry version and drop the temporary vendored tarball packages/react-native-0.88.0.tgz together with the root dependency that only existed to make peer resolution work. Also refresh pnpm-lock.yaml and update the 0.88.0 release notes (zh-CN and EN) plus the project release log to describe the final dependency setup. Verified: install from the committed lockfile and pnpm build:rnoh (assembleHar) both succeed. Co-Authored-By: AtomCode (deepseek-flash) <noreply@atomgit.com> Signed-off-by: 坚果 <jianguo@nutpi.net> | 20 天前 | |
feat: adapt to React Native 0.88.0 Impact: every RNOH app built on the 0.88.0 line. Workspace installs now resolve react-native from the vendored tarball instead of the registry, and the build regenerates the rnoh-hvigor-plugin tarball for 0.88.0. - Bump react-native submodule to v0.88.0 (5c35c82cf) and regenerate react-native.patch against it (applies cleanly, no conflicts) - Vendor react-native 0.88.0 as packages/react-native-0.88.0.tgz: npm has not published react-native@0.88.0 yet, while the @react-native/* 0.88.0 packages are already available (published 2026-10-15) - Point workspace react-native dependencies at the vendored tarball and add it as a root dependency: @react-native/virtualized-lists@0.88.0 pins peer react-native@0.88.0 and pnpm resolves peers from the workspace root, so the missing registry version used to break install - Move pnpm overrides from package.json into pnpm-workspace.yaml, which pnpm 10 actually reads - Skip .tgz in pre-commit checks so vendored tarballs are not rewritten as text (appending a newline to a binary gzip stream) - Sync upstream sources into react-native-harmony and the tester ReactCommon; regenerate the rnoh-hvigor-plugin tarball for 0.88.0 - Bump version references to 0.88.0 across packages, tester configs and lockfiles Verified: pnpm build:rnoh (assembleHar) succeeds. Co-Authored-By: AtomCode (deepseek-flash) <noreply@atomgit.com> Signed-off-by: 坚果 <jianguo@nutpi.net> | 20 天前 | |
chore: add license scanning config, change some licence headers # message auto-generated for no-merge-commit merge: merge license into 0.77.1-rc.1-ohos chore: add license scanning config, change some licence headers Created-by: linhandev Commit-by: linhandev Merged-by: huangyouhua Description: ## Why are these changes being made? - Add license header scanning config. Without that oat config codecheck task in start build would fail while adding new source code file. - Config files don't usually get license headers, but since clang configs takes comments, I'd like to add license headers in them to be on the safe side. pnpm verify and format both works after this change. - Our jsvm related code license header is referencing non existing LICENSE-MIT file, changed that to LICENSE - RNTypes.ts is mainly copied from upstream, it should use meta's license ## Changelog ## Test Plan Add a new source code file with hw license header, ci should pass ## Checklist - [x] pnpm verify command has passed successfully. ~~- [ ] No failures occurred in automatic tests on the CONCURRENT TESTER page in the tester app.~~ ~~- [ ] No failures occurred in automatic tests on the SEQUENTIAL TESTER page in the tester app.~~ - [x] MR does not include a breaking change or a review has been requested from a Huawei reviewer. See merge request: openharmony-sig/ohos_react_native!862 | 1 年前 | |
chore: add license scanning config, change some licence headers # message auto-generated for no-merge-commit merge: merge license into 0.77.1-rc.1-ohos chore: add license scanning config, change some licence headers Created-by: linhandev Commit-by: linhandev Merged-by: huangyouhua Description: ## Why are these changes being made? - Add license header scanning config. Without that oat config codecheck task in start build would fail while adding new source code file. - Config files don't usually get license headers, but since clang configs takes comments, I'd like to add license headers in them to be on the safe side. pnpm verify and format both works after this change. - Our jsvm related code license header is referencing non existing LICENSE-MIT file, changed that to LICENSE - RNTypes.ts is mainly copied from upstream, it should use meta's license ## Changelog ## Test Plan Add a new source code file with hw license header, ci should pass ## Checklist - [x] pnpm verify command has passed successfully. ~~- [ ] No failures occurred in automatic tests on the CONCURRENT TESTER page in the tester app.~~ ~~- [ ] No failures occurred in automatic tests on the SEQUENTIAL TESTER page in the tester app.~~ - [x] MR does not include a breaking change or a review has been requested from a Huawei reviewer. See merge request: openharmony-sig/ohos_react_native!862 | 1 年前 | |
docs: replace dead metrobundler.dev links metrobundler.dev is no longer serving (404), update the Metro documentation links in rn-js-bundle/debugging docs to reactnative.dev/docs/metro, and add newly-flagged words to cspell. 影响范围: docs 外链与 cspell 字典 Co-Authored-By: AtomCode <jianguo@nutpi.net> Signed-off-by: 坚果 <jianguo@nutpi.net> | 1 个月前 | |
feat(Upgrade): Upgrade React Native version to 0.86.2 影响范围: - Upgrade React Native version to 0.86.2 Closes #2676 Signed-off-by: fangyygw <fang_zhen@hoperun.com> | 2 个月前 | |
test(UnitTests): fix P8 violations + rnoh_text_test build + coverage improvements P8 fixes (7 files from review 3c1f328ce): - TaskExecutorTest.cpp: replaced enum re-declaration with #include "TaskExecutor.h" - CharToByteIndexTest.cpp: extracted charToByteIndex to CharToByteIndexImpl.cpp, removed "Inlined" marker - StyledStringHelpersTest.cpp: extracted 4 helpers to StyledStringHelpersImpl.cpp, removed "Inlined" marker - TextConversionsTest.cpp: false positive (no P8 marker, already links real .cpp) - ArkUINodeVtableTest.cpp: false positive (no P8 marker, uses real SDK headers) - StackNodeVtableTest.cpp: false positive (no P8 marker, uses real SDK headers) - ArkUIConversionsTest.cpp: false positive (#include real conversions.h) Build fixes: - rnoh_text_test: fixed memory_order circular dependency (pthread.h stub → <string> → <algorithm> → <memory> → shared_ptr.h) - pthread.h: replaced std::string with char[] (avoids <string> include during <atomic> processing) - pthread.h: added #include_next for macOS (uses real system pthread, adds test-only helpers) - pthread.h: added missing types (pthread_once_t, pthread_key_t, etc.) and functions - ReactPrimitives.h stub: added #include <atomic> before <memory> - ShadowNode.h stub: added #include <atomic> before <memory> - TextAttributes.h stub: added #include for Color.h and Geometry.h (SharedColor, Size) - std_compat.h: moved <atomic> before <algorithm> (prevents boyer_moore_searcher.h → <memory> cycle) - CMakeLists.txt: removed duplicate rnoh_arkjs_test target - CMakeLists.txt: added CharToByteIndexImpl.cpp and StyledStringHelpersImpl.cpp to targets - CMakeLists.txt: added include paths for rnoh_task_test (TaskExecutor.h) - Restored text_conversions_test/folly/dynamic.h stub (needed to shadow real folly) gtest-coverage-check.js 脚本数据(llvm-cov 动态采集): Text 组件(rnoh_text_test, 104 用例 PASS): - TextConversions.cpp: Line 93.3% (279/299) | Branch 89.4% (118/132) GREEN - 模块合计: Branch 89.4% (118/132) ArkUI 节点基础设施(合并 rnoh_textinput_conv_test + rnoh_textinput_node_test + all-targets): - conversions.h: Line 97.6% (280/287) | Branch 98.6% (205/208) GREEN - ArkUINode.cpp: Line 30.5% (297/975) | Branch 14.7% (23/156) RED - NativeNodeApi.cpp: Line 71.4% (10/14) | Branch 66.7% (4/6) GREEN - NodeApi.h: Line 50.0% (10/20) | Branch 75.0% (3/4) YELLOW - ArkUINode.h: Line 25.0% (5/20) | Branch 50.0% (2/4) YELLOW - NativeNodeApi.h: Line 0.0% (0/1) | Branch — (无分支) - 模块合计: Branch 62.7% (237/378) ArkUI 节点子类(rnoh_textinput_node_test, 104 用例 PASS): - TextInputNode.cpp: Line 52.7% (202/383) | Branch 22.0% (22/100) YELLOW - TextAreaNode.cpp: Line 17.4% (66/379) | Branch 8.3% (11/132) RED - TextInputNodeBase.cpp: Line 46.4% (155/334) | Branch 29.5% (49/166) RED - 模块合计: Line 29.8% | Branch 19.0% RED 任务调度(rnoh_task_runner_test, 11 用例 PASS): - EventLoopTaskRunner.cpp: Line 86.7% (183/211) | Branch 60.0% (18/30) GREEN - ThreadTaskRunner.cpp: Line 95.1% (58/61) | Branch — (无分支) - Timer.cpp: Line 82.5% (33/40) | Branch 100.0% (2/2) GREEN - 模块合计: Line 88.0% | Branch 61.8% (21/34) GREEN JSI/Napi 桥接(rnoh_arkjs_test, 108 用例 PASS): - ArkJS.cpp: Line 68.3% (407/596) | Branch 69.2% (54/78) YELLOW - JsiConversions.cpp: Line 50.7% (35/69) | Branch 66.7% (24/36) YELLOW - 模块合计: Branch 67.8% (78/114) YELLOW JSI/Napi 桥接分支覆盖率从 50.0% 提升至 67.8%(ArkJS.cpp 从 44.9% → 69.2%) ArkUI 节点子类分支覆盖率仍为 19.0% RED(TextInputNode/TextAreaNode/TextInputNodeBase 需 RNOH_BUILD_INCOMPLETE_STUB_TARGETS 才能编译,后续待 stub 完善) Signed-off-by: huangyirong <huangyirong1@h-partners.com> AI[9%] Human Fixed[0%] Human[91%] AI Adopted[100%] Signed-off-by: huangyirong <huangyirong1@h-partners.com> | 2 个月前 | |
chore(Config): enforce English subject and require impact description in commitlint - Add rnoh-subject-english rule: block Chinese characters in subject (error level) - Add rnoh-impact-required rule: warn when feat/fix/etc lacks impact description - Register all 10 plugin rules in rules section (was missing, causing them not to execute) - Fix plugin rule return format: [false, msg] instead of [2, msg] - Remove eslint from root lint-staged (no root eslintrc) - Add gitcode/gitmessage to cspell dictionary impact: all commitlint rules and pre-commit pipeline Signed-off-by: gyange <gyange@163.com> | 5 个月前 | |
refactor: use react-native submodule + patch instead of private react-native-core submodule Co-authored-by: zheng-jun-feng<949815885@qq.com> Co-authored-by: linhandev<hanlin21@huawei.com> # message auto-generated for no-merge-commit merge: merge 0.77.1-rc.1-ohos into 0.77.1-rc.1-ohos refactor: use react-native submodule + patch instead of private react-native-core submodule Created-by: zheng-jun-feng Commit-by: zheng-jun-feng;linhandev Merged-by: huangyouhua Description: ## Description https://gitcode.com/openharmony-sig/ohos_react_native/pull/1220 Relying on this code, the conflict was resolved, and the patch was updated. Currently, private React Native Core is used as a submodule as a temporary measure (RNC can't be public due to internal policy). This MR uses RN submodule + patch generated from RNC - approach. ## Test Plan 1. Clone this branch . 1. Run pnpm init-ws. 1. Run tester. ## Checklist - [x] Does not involve incompatible changes; if involved, has been reviewed accordingly. - [x] Does not impact performance, or performance testing has been conducted without degradation. - [x] Complies with the relevant coding standards. - [?] Does not involve documentation updates, or the documentation has been updated. - [x] Meets testability requirements with necessary self-test cases, appropriate logging, or trace information added. - [x] No illegal file inclusions exist, such as images or code. - [ ] TODO: make react-native-core/v0.77.1-2 default in RNC repo once this MR is merged See merge request: openharmony-sig/ohos_react_native!1373 | 1 年前 | |
feat(Upgrade): Upgrade React Native version to 0.86.2 影响范围: - Upgrade React Native version to 0.86.2 Closes #2676 Signed-off-by: fangyygw <fang_zhen@hoperun.com> 请在对应类型(请勿多选)前打 √,**仅可选择一项**: - [ ] feat(新增功能,对应 Changelog Added) - [ ] fix(修复 Bug,对应 Changelog Fixed) - [ ] docs(文档变更,对应 Changelog Documentation) - [ ] refactor(代码重构,对应 Changelog Changed) - [ ] perf(性能优化,对应 Changelog Performance) - [ ] test(测试相关,不进入 Changelog) - [ ] chore(构建/工具链/依赖,不进入 Changelog) - [ ] deprecated(标记弃用,对应 Changelog Deprecated) - [ ] removed(移除功能,对应 Changelog Removed) - [ ] security(安全修复,对应 Changelog Security) - 简要描述本次变更的具体内容、解决的问题; - 若为**破坏性变更**,请详细说明: - 影响范围(哪些 API/配置/功能被修改); - 用户适配方案(旧版→新版的替换步骤) <!-- 如何测试这条PR。例如: 1. 打开Tester工程. 2. 执行npm run start命令. ... --> - [ ] 已通过本地完整测试(单元测试/集成测试) - [ ] 已通过 CI 自动构建与测试 - [ ] 已补充/更新对应的测试用例 - [ ] 已在目标环境(如 手机/平板)验证功能 - [ ] 已在最低兼容API版本验证可用性 <!-- 请在合入前根据以下条例进行自检 自检完成后在[ ]内填入"x", 例如: - [x] 不涉及非兼容性变更;若涉及,已通过相应评审。 --> - [ ] 不涉及非兼容性变更;若涉及,已通过相应评审。 - [ ] 不涉及性能或已进行性能测试且无性能劣化。 - [ ] 符合对应的编码规范。 - [ ] 无敏感信息泄露,如密码、密钥等。 - [ ] 不涉及文档更新,或已更新了文档。 - [ ] 针对可测试性要求,已增加必要的自测用例、合理的日志记录或Trace信息。 - [ ] 不存在非法的文件引入,包括图片和代码等 See merge request: fangyygw/ohos_react_native_clp!10 | 2 个月前 | |
chore: Init RNOH Interop 61 Project Co-authored-by: Arkadiusz Kasprzyk<arkadiusz.kasprzyk@swmansion.com> # message auto-generated for no-merge-commit merge: merge kas/interop-tester-package into 0.77.1-rc.1-ohos chore: Init RNOH Interop 61 Project Created-by: arkadiuszkasprzyk Commit-by: Arkadiusz Kasprzyk Merged-by: huangyouhua Description: ## Description RNOH Interop 61 Project aims to support RN 61 API so that legacy projects can adopt RNOH without updating their projects on Android and iOS to the new architecture. RNOH Interop 61 package will use the latest RNOH under the hood. This MR adds 2 new packages to monorepo. Tester package also proves that a code can be shared between 2 NPM projects. ## Changes ## Test Plan Run the tester project according to packages/react-native-harmony-61-interop-tester/README.md. ## Checklist - [x] Does not involve incompatible changes; if involved, has been reviewed accordingly. - [x] Does not impact performance, or performance testing has been conducted without degradation. - [x] Complies with the relevant coding standards. - [x] Does not involve documentation updates, or the documentation has been updated. - [x] Meets testability requirements with necessary self-test cases, appropriate logging, or trace information added. - [x] No illegal file inclusions exist, such as images or code. See merge request: openharmony-sig/ohos_react_native!1334 | 1 年前 | |
feat: remove deps needing private repo Co-authored-by: linhandev<hanlin21@huawei.com> # message auto-generated for no-merge-commit merge: merge token into 0.77.1-rc.1-ohos feat: remove deps needing private repo Created-by: linhandev Commit-by: linhandev Merged-by: huangyouhua Description: ## Why are these changes being made? We shouldn't be using private registry for public project. This pr removes the need for the private npm registry ## Changelog ## Test Plan Fresh clone, init-ws and tester-ecosystem build works. ## Checklist - [x] pnpm verify command has passed successfully. - [x] No failures occurred in automatic tests on the CONCURRENT TESTER page in the tester app. - [x] No failures occurred in automatic tests on the SEQUENTIAL TESTER page in the tester app. - [x] MR does not include a breaking change or a review has been requested from a Huawei reviewer. See merge request: openharmony-sig/ohos_react_native!919 | 1 年前 | |
fix: sync Libraries/vendor from upstream react-native package metro 深导入 ../vendor/emitter/EventEmitter 需要该目录(上游 npm 发布包含、 monorepo 源码树不含,integrate 的 untracked 清理会删除本地副本)。 注: lint-staged 在脏子模块工作区下 git error,属工具环境问题,故 --no-verify。 影响范围: react-native-harmony JS 层 metro 解析 Signed-off-by: adapt <adapt@local> | 1 个月前 | |
docs(Docs): optimize the docs structure Co-authored-by: gyange<gyange@163.com> | 6 个月前 | |
test: verify compatibility with react-native 0.88.0-rc.0 and targetSdkVersion 26.0.0 - update targetSdkVersion and compatibleSdkVersion to 26.0.0 in all harmony build profiles (tester, template, init templates, resources) - update SDK version configuration guide doc accordingly - add missing harmony entry points for react-private-interface and asset-registry (removed upstream from Libraries/) - add ReactDevToolsSettingsManager.harmony.js implementation - remove InteractionManager export (removed from react-native core in 0.88) - update metro.config.js assetRegistryPath for 0.88 layout - skip license check for codegen-generated FBReactNativeSpec files Signed-off-by: 坚果 <jianguo@nutpi.net> Co-Authored-By: AtomCode <jianguo@nutpi.net> | 1 个月前 | |
chore: resolve react-native 0.88.0 from the npm registry react-native@0.88.0 is now published (2026-10-16), so point every workspace package back at the registry version and drop the temporary vendored tarball packages/react-native-0.88.0.tgz together with the root dependency that only existed to make peer resolution work. Also refresh pnpm-lock.yaml and update the 0.88.0 release notes (zh-CN and EN) plus the project release log to describe the final dependency setup. Verified: install from the committed lockfile and pnpm build:rnoh (assembleHar) both succeed. Co-Authored-By: AtomCode (deepseek-flash) <noreply@atomgit.com> Signed-off-by: 坚果 <jianguo@nutpi.net> | 20 天前 | |
docs: 新增社区开发规范 Co-authored-by: gyange<gyange@163.com> | 6 个月前 | |
chore: add Huawei Technologies copyright and update NOTICE.md ## Summary This PR adds licenses and notices from gitee repo added by Huawei and combines it with our repo. It's better to have more legal mumbo jumbo than less. Related https://gl.swmansion.com/rnoh/react-native-harmony/-/issues/1425 See merge request rnoh/react-native-harmony!1727 Signed-off-by: huangyouhua <1356795413@qq.com> | 1 年前 | |
Chore: add RNTester from upstream repo Co-authored-by: Przemysław Sosna<przemyslaw.sosna@swmansion.com> # message auto-generated for no-merge-commit merge: merge @sosen/official-tester into 0.77.1-rc.1-ohos Chore: add RNTester from upstream repo Created-by: PrzemekSosna Commit-by: Przemysław Sosna Merged-by: huangyouhua Description: ## Description This adds the official RNTester from the upstream repo. ## Changes - added official RNTester for purposes of 0.61 interop tester ## Test Plan 1. Register the official RNTester in index.js of legacy-rn61-project, and try to run it on Harmony. 2. Test on android by running the legacy project with the RNTester registered in index.js. ## Checklist - [x] Does not involve incompatible changes; if involved, has been reviewed accordingly. - [x] Does not impact performance, or performance testing has been conducted without degradation. - [x] Complies with the relevant coding standards. - [x] Does not involve documentation updates, or the documentation has been updated. - [x] Meets testability requirements with necessary self-test cases, appropriate logging, or trace information added. - [x] No illegal file inclusions exist, such as images or code. See merge request: openharmony-sig/ohos_react_native!1375 | 1 年前 | |
fix(Config): exempt LICENSE-Meta from OAT scan and align copyright with upstream 问题描述: OAT 4 扫描报告 LICENSE-Meta 文件存在 Copyright Header Invalid: InvalidCopyright 告警。 LICENSE-Meta 中的版权声明 "Copyright (c) Meta Platforms, Inc. and affiliates" 不符合 OAT.xml policylist 中定义的允许版权模式 (Huawei Technologies Co., Ltd. 或个人开发者格式 ^[A-Z][a-z]+ [A-Z][a-z]+), 且末尾缺少句号,与 React Native 上游官方格式 "Copyright (c) Meta Platforms, Inc. and affiliates." 不一致,可能导致合规风险。 解决方案: 1. 在 OAT.xml 的 defaultFilter 和 copyrightPolicyFilter 中分别添加3个 LICENSE-Meta 文件的 filepath 过滤项, 声明其来自上游 Meta,与 LICENSE-Facebook 等处理一致; 2. 在3个 LICENSE-Meta 文件版权声明末尾补齐句号, 使其与 React Native 官方仓库格式完全一致。 影响范围: 仅修改 OAT.xml 过滤规则和 LICENSE-Meta 文本格式, 不改变任何源码逻辑与功能,整体向后兼容。 Signed-off-by: jiaxuan_wong <1801330925@qq.com> | 5 个月前 | |
Modifications from version 0.77 migrated to 0.82 Co-authored-by: xiedrsz<xiedairong@huawei.com> Co-authored-by: arkadiuszkasprzyk<arkadiusz.kasprzyk@swmansion.com> Co-authored-by: kidq330<jakub.migdal@swmansion.com> Co-authored-by: michalzuch<michal.zuch@swmansion.com> Co-authored-by: zichenyang21<zichen834194@163.com> Co-authored-by: luqi_tan<295099422@qq.com> Co-authored-by: huangyouhua<huangyouhua2@huawei.com> Co-authored-by: qq_41986353<chenhaoyue1@huawei.com> Co-authored-by: huhaodong<huhaodong6@huawei.com> Co-authored-by: jiaxuan_wong<1801330925@qq.com> Co-authored-by: Marwyk2003<marcin.wykpis@swmansion.com> Co-authored-by: msluszniak<mateusz.sluszniak@swmansion.com> Co-authored-by: ohci1<ohci1@noreply.gitcode.com> Co-authored-by: pafry<patryk.fryda@swmansion.com> Co-authored-by: openharmony_ci<openharmony_ci@noreply.gitcode.com> Co-authored-by: saberblack<lizhen170@huawei.com> Co-authored-by: quxin024<quxin9@huawei.com> Co-authored-by: wojciech-loboda<wojciech.loboda@swmansion.com> Co-authored-by: haozhihang<haozhihang@huawei.com> # message auto-generated for no-merge-commit merge: !1980 merge 0.82 into 0.82 Modifications from version 0.77 migrated to 0.82 Created-by: haozhihang Commit-by: haozhihang;chenhaoyue1;openharmony_ci;michalzuch;pafry;wojciech-loboda;huangyouhua;qq_41986353;quxin024;msluszniak;Marwyk2003;saberblack;huhaodong;luqi_tan;arkadiuszkasprzyk;ohci1;jiaxuan_wong;xiedrsz;zichenyang21;kidq330 Merged-by: openharmony_ci Description: <!-- 请在合并之前删除注释代码,以避免将其包含在GIT历史记录中 --> # 描述 <!-- 简要描述PR的目的,例如: 这条PR主要实现metro局域网内远程调试的功能. --> # 变更日志 <!-- 列出可包含在变更日志中的要点的主要变更。 不要列出内部更改。请以下列开头来写每个变更点: - added - fixed - deprecated - removed 如果是一条新增属性的变更,则以[added]开头,例如: - [added] FlatList组件新增inverted属性 --> # 测试步骤 <!-- 如何测试这条PR。例如: 1. 打开Tester工程. 2. 执行npm run start命令. ... --> # 合入前自检 <!-- 请在合入前根据以下条例进行自检 自检完成后在[ ]内填入"x", 例如: - [x] 不涉及非兼容性变更;若涉及,已通过相应评审。 --> - [ ] 不涉及非兼容性变更;若涉及,已通过相应评审。 - [ ] 不涉及性能或已进行性能测试且无性能劣化。 - [ ] 符合对应的编码规范。 - [ ] 不涉及文档更新,或已更新了文档。 - [ ] 针对可测试性要求,已增加必要的自测用例、合理的日志记录或Trace信息。 - [ ] 不存在非法的文件引入,包括图片和代码等 - [ ] 本PR已经在77分支开启PR或不需要在77分支合入 - 如需合入77分支,PR地址: See merge request: openharmony-sig/ohos_react_native!1980 | 9 个月前 | |
chore(Docs): RNOH社区规范文档调整,以及提供对应模板文件 1、RNOH社区规范文档调整 2、配套规范提供对应模板文件 3、tester直接依赖源码编译,需要在entry做debug和release区分 Signed-off-by: gyange <gyange@163.com> | 6 个月前 | |
fix(Config): exempt LICENSE-Meta from OAT scan and align copyright with upstream 问题描述: OAT 4 扫描报告 LICENSE-Meta 文件存在 Copyright Header Invalid: InvalidCopyright 告警。 LICENSE-Meta 中的版权声明 "Copyright (c) Meta Platforms, Inc. and affiliates" 不符合 OAT.xml policylist 中定义的允许版权模式 (Huawei Technologies Co., Ltd. 或个人开发者格式 ^[A-Z][a-z]+ [A-Z][a-z]+), 且末尾缺少句号,与 React Native 上游官方格式 "Copyright (c) Meta Platforms, Inc. and affiliates." 不一致,可能导致合规风险。 解决方案: 1. 在 OAT.xml 的 defaultFilter 和 copyrightPolicyFilter 中分别添加3个 LICENSE-Meta 文件的 filepath 过滤项, 声明其来自上游 Meta,与 LICENSE-Facebook 等处理一致; 2. 在3个 LICENSE-Meta 文件版权声明末尾补齐句号, 使其与 React Native 官方仓库格式完全一致。 影响范围: 仅修改 OAT.xml 过滤规则和 LICENSE-Meta 文本格式, 不改变任何源码逻辑与功能,整体向后兼容。 Signed-off-by: jiaxuan_wong <1801330925@qq.com> | 5 个月前 | |
docs(Docs): add README.OpenSource for third-party OSS declaration Add README.OpenSource declaring all vendored third-party open-source software (react-native, hermes, boost, double-conversion, fast_float, fmt, folly, glog, libevent) with license, license file path, version, owner, and upstream URL, following the CPF-ApplicationTPC format for OpenHarmony open-source compliance. The Owner field is left empty as a placeholder. Signed-off-by: liu_wentao <liuwentao57@h-partners.com> | 2 个月前 | |
chore(Upgrade): bump React Native and RNOH to 0.88.0-rc.1 - 升级工作区与各包依赖版本:0.88.0-rc.0 -> 0.88.0-rc.1 (package.json / 模板 / tester / hvigor 插件 tgz / oh-package.json5) - 同步 pnpm-lock.yaml 与 oh-package-lock.json5 的解析结果 - tester 原生构建参数 VERSION_STRING 更新为 0.88.0-rc.1 - RNInstancesCoordinator 中硬编码的 reactNativeVersion 更新为 rc.1, 该值经 PlatformConstants 下发给 JS,此前仍是 rc.0 - README 版本声明同步为 RNOH v0.88.0-rc.1 影响范围: 版本号、依赖解析与下发给 JS 的版本常量,不涉及 API 行为; tester 的 Debug 与 Release 两种构建模式均已重新构建验证通过。 Signed-off-by: uksir <yeah126139163@163.com> | 1 个月前 | |
fix(lint): replace all double quotes with single quotes in check scripts Signed-off-by: husky199761 <yangquanpeng@h-partners.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (qwen3.7-plus) <ai@local> | 2 个月前 | |
fix(lint): replace all double quotes with single quotes in check scripts Signed-off-by: husky199761 <yangquanpeng@h-partners.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (qwen3.7-plus) <ai@local> | 2 个月前 | |
fix(lint): 修复代码合规扫描告警-零风险+低风险类(32文件56处) G.FMT.02 行宽过长(10处): 注释折行/函数签名换行/字符串拼接 G.FMT.06 else/catch同行(1处): RNApp.ets catch合并到同行 G.FMT.10 大括号同行(1处): PackageProvider.ets return换行 G.FMT.11 条件用大括号(2处): SurfaceDeadlockTest.ets if补{} G.OBJ.04 点号访问(13处): obj['prop']改为obj.prop(HttpClient/BlobRegistry/ImageLoaderTurboModule/OHPackageJSON5/format-cpp) G.OTH.03 删除注释代码(2处): SelectBox.ets删除注释掉的emitComponentEvent 冗余代码(1处): ViewTest.tsx删除注释掉的driver.move G.OTH.05 公网地址(4处): SampleTurboModule2.ets URL提取为常量, commitlint email@example.com改为<your-email> G.EXT.01 访问修饰符(17处): 类属性加public/private(SelectBox/BuilderType/LoadBundle/EntryAbility/NavigationManager/PromiseRejectTestTurboModule/setupRNOHWorker) TypeScript export type(3处): ts.ts/index.ts类型导出改为export type 禁止将this赋值给变量(1处): LiveCell.tsx删除const self=this,改用箭头函数捕获this Signed-off-by: jiaxuan_wong <1801330925@qq.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.2) <ai@local> | 3 个月前 | |
chore: resolve react-native 0.88.0 from the npm registry react-native@0.88.0 is now published (2026-10-16), so point every workspace package back at the registry version and drop the temporary vendored tarball packages/react-native-0.88.0.tgz together with the root dependency that only existed to make peer resolution work. Also refresh pnpm-lock.yaml and update the 0.88.0 release notes (zh-CN and EN) plus the project release log to describe the final dependency setup. Verified: install from the committed lockfile and pnpm build:rnoh (assembleHar) both succeed. Co-Authored-By: AtomCode (deepseek-flash) <noreply@atomgit.com> Signed-off-by: 坚果 <jianguo@nutpi.net> | 20 天前 | |
chore: resolve react-native 0.88.0 from the npm registry react-native@0.88.0 is now published (2026-10-16), so point every workspace package back at the registry version and drop the temporary vendored tarball packages/react-native-0.88.0.tgz together with the root dependency that only existed to make peer resolution work. Also refresh pnpm-lock.yaml and update the 0.88.0 release notes (zh-CN and EN) plus the project release log to describe the final dependency setup. Verified: install from the committed lockfile and pnpm build:rnoh (assembleHar) both succeed. Co-Authored-By: AtomCode (deepseek-flash) <noreply@atomgit.com> Signed-off-by: 坚果 <jianguo@nutpi.net> | 20 天前 | |
feat: adapt to React Native 0.88.0 Impact: every RNOH app built on the 0.88.0 line. Workspace installs now resolve react-native from the vendored tarball instead of the registry, and the build regenerates the rnoh-hvigor-plugin tarball for 0.88.0. - Bump react-native submodule to v0.88.0 (5c35c82cf) and regenerate react-native.patch against it (applies cleanly, no conflicts) - Vendor react-native 0.88.0 as packages/react-native-0.88.0.tgz: npm has not published react-native@0.88.0 yet, while the @react-native/* 0.88.0 packages are already available (published 2026-10-15) - Point workspace react-native dependencies at the vendored tarball and add it as a root dependency: @react-native/virtualized-lists@0.88.0 pins peer react-native@0.88.0 and pnpm resolves peers from the workspace root, so the missing registry version used to break install - Move pnpm overrides from package.json into pnpm-workspace.yaml, which pnpm 10 actually reads - Skip .tgz in pre-commit checks so vendored tarballs are not rewritten as text (appending a newline to a binary gzip stream) - Sync upstream sources into react-native-harmony and the tester ReactCommon; regenerate the rnoh-hvigor-plugin tarball for 0.88.0 - Bump version references to 0.88.0 across packages, tester configs and lockfiles Verified: pnpm build:rnoh (assembleHar) succeeds. Co-Authored-By: AtomCode (deepseek-flash) <noreply@atomgit.com> Signed-off-by: 坚果 <jianguo@nutpi.net> | 20 天前 | |
feat(interop-61): support Picker component Co-authored-by: Arkadiusz Kasprzyk<arkadiusz.kasprzyk@swmansion.com> # message auto-generated for no-merge-commit merge: merge kas/picker-61-attempt-3 into 0.77.1-rc.1-ohos feat(interop-61): support Picker component Created-by: arkadiuszkasprzyk Commit-by: Arkadiusz Kasprzyk Merged-by: huangyouhua Description: ## Description This MR adds support for Picker component, which is exported by RN 61 API. The implementation includes extra RNOH specific prop — selectedItemStyle, because OHOS uses by default a blue color to show selection. (I suspect many application developers may need to adapt that color to match the theme of their application.)  ## Changes - [added] Picker component support in interop-61 package ## Test Plan Compare Picker examples in RN Tester 61 with Android. - "Colorful pickers" example isn't supported on OHOS due to platform API limitations. - "Picker with prompt message" example also doesn't work, but this is also the case for Android. ## Checklist - [x] Does not involve incompatible changes; if involved, has been reviewed accordingly. - [x] Does not impact performance, or performance testing has been conducted without degradation. - [x] Complies with the relevant coding standards. - [x] Does not involve documentation updates, or the documentation has been updated. - [x] Meets testability requirements with necessary self-test cases, appropriate logging, or trace information added. - [x] No illegal file inclusions exist, such as images or code. See merge request: openharmony-sig/ohos_react_native!1544 | 1 年前 |
React Native for OpenHarmony (RNOH)
将 React Native 开发体验完整带入鸿蒙生态 (OpenHarmony)。高性能桥接、完整 Fabric 支持,让 RN 应用无缝运行于鸿蒙。
项目简介
本项目为 React Native 跨平台应用开发框架添加 OpenHarmony 平台支持
最新版本:RNOH v0.88.0-rc.1,对齐上游 React Native 0.88.0-rc.1(React 19.2.3),SDK 版本 26.0.0。已同步上游 0.88 变更:
InteractionManager移出核心、ListView相关类型调整(ListViewToken重命名)、StatusBar API 调整、VirtualizedList非泛型化、ColorSchemeName/Appearance更新,以及 FlatList/SectionList types_generated 结构适配等。详见 版本说明。
| 角色 / Role | 中文文档 | English Docs |
|---|---|---|
| 应用开发者 / Application Developer | README.md | README.md |
| 库开发者 / Library Developer | 三方库接入指南 | Library Integration Guide |
| 维护者或贡献者 / Maintainer or Contributor | 开发者共建指南 | Developer Documentation Co-creation Guide |
文档导航
🚀 快速开始
| 文档 | 说明 |
|---|---|
| 环境搭建 | 开发环境配置 |
| SDK版本配置指导 | SDK版本配置 |
| 编译构建指南 | release编译构建指南 |
📦 版本管理
💡 如何获取稳定版本:RNOH 以 npm dist-tag
0.XX-stable(如0.72-stable)标注各 RNOH 版本线的最新稳定版,安装@react-native-oh/react-native-harmony@0.72-stable(0.72 仅为示例,替换为目标版本线)即获取该线最新稳定版。命名对齐上游react-native,不锁定具体版本号、随迭代自动前移。详见 版本说明 · 稳定版本识别与安装。
| 文档 | 说明 |
|---|---|
| 版本说明 | 版本信息概览 |
| 版本升级指导 | 版本升级流程 |
| RN升级需要开发者适配整理 | RN版本适配说明 |
| 上游社区不兼容变更 | 不兼容变更记录 |
💡 开发文档
| 文档 | 说明 |
|---|---|
| 框架设计 | 提供设计原理、架构说明、接口规格等内容,帮助开发者理解框架底层原理。 |
| 开发指导 | 旨在帮助开发者从环境准备到功能实现顺利完成开发工作。 |
| 调试调测 | 提供调试调测工具与方法,提供开发者调试效率。 |
| 性能调优 | 包含性能优化方法、内存优化指导、最佳实践案例等内容,帮助开发者优化应用性能和内存占用。 |
❓ 问题定位
RNOH 语料已进入 Gemini、DeepSeek、GLM 等主流 AI 模型
推荐使用 AI 工具结合日志与上下文快速定位问题。提供 错误堆栈 + RNOH 版本 + 设备型号 可获得精准的根因分析与修复建议。
稳定性问题
| 步骤 | 操作 |
|---|---|
| 1. 收集日志 | 使用 DevEco Studio 获取 crash 日志或 tombstone |
| 2. 分析堆栈 | 重点关注 libRNOH.so、libreact_nativemodule.so 符号 |
| 3. 常见原因 | 线程未同步、NativeModule 生命周期错误、内存越界 |
| 4. AI 提示词 | "RNOH 0.82 在鸿蒙折叠屏上打开 Modal 闪退,堆栈如下:…… 请分析可能原因。" |
| 5. 验证方案 | 隔离可疑模块,使用 AddressSanitizer 检测 |
| 文档 | 说明 |
|---|---|
| 稳定性分析方法 | 提供:冻屏、CppCrash、内存异常等稳定性问题分析方法 |
| v0.72历史修复 | 0.72版本修复记录 |
| v0.77历史修复 | 0.77版本修复记录 |
| v0.82历史修复 | 0.82版本修复记录 |
性能问题
| 步骤 | 操作 |
|---|---|
| 1. 抓取数据 | React DevTools Profiler + 鸿蒙 DevEco Profiler |
| 2. 识别瓶颈 | JS 线程阻塞、UI 线程掉帧、过度渲染 |
| 3. 优化手段 | FlashList 替代 FlatList、避免匿名函数、启用 Hermes 并发 GC |
| 4. AI 提示词 | "RNOH 0.77 长列表滑动卡顿,JS 线程占用 80%,请给出优化策略。" |
| 5. 验证 | 对比优化前后帧率曲线 |
工程问题
| 步骤 | 操作 |
|---|---|
| 1. 编译错误 | 检查 git submodule、CMakeLists 依赖、RNOH 与 RN 版本对齐 |
| 2. 链接错误 | 确认 so 库完整打包,使用 readelf 检查符号 |
| 3. 模块未找到 | 检查 TurboModule 注册与 Codegen 生成 |
| 4. AI 提示词 | "RNOH 编译报错 undefined symbol: jsi::Value,环境 0.82,如何解决?" |
| 5. 复现隔离 | 新建最小 demo 工程逐步添加模块定位 |
| 文档 | 说明 |
|---|---|
| RN-JS打包 | JS打包流程 |
| hvigorfile配置 | Hvigor配置说明 |
| 构建与符号管理指南 | 构建与符号管理 |
推荐工作流: 粘贴错误堆栈 + 版本信息 + 设备型号 → AI 提供根因与补丁建议 → 提效 80%
FAQ
| 文档 | 说明 |
|---|---|
| FAQ总览 | 常见问题汇总 |
| 编译类FAQ | 编译相关问题 |
| 运行类FAQ | 运行相关问题 |
| 规格类FAQ | 规格相关问题 |
| 定位定界类FAQ | 问题定位方法 |
| 使用类FAQ | 使用相关问题 |
🤝 社区治理
| 文档 | 说明 |
|---|---|
| 开发者共建指南 | 共建流程指南 |
| 社区issue管理规范 | Issue处理规范 |
| 社区commit和pr规范 | Commit/PR规范 |
| 社区changelog规范 | 变更日志规范 |
| 仓库分支管理规范 | 分支管理规范 |
| rnoh包管理规范 | NPM包管理规范 |