React Native鸿蒙化仓库
| Files | Last commit | Last update |
|---|---|---|
chore(Docs): migrate docs skills into .agents/skills Unify agent skills under .agents/skills so docs tooling lives with other RNOH agent skills instead of under docs/skills. - move docs-quality-audit and docs-spellcheck to .agents/skills - group version-upgrade skills under rnoh-upgrade-version - add upgrade-third-party guidance and sync docs/.agents references Signed-off-by: changlp <chang_leipeng@hoperun.com> | 2 months ago | |
chore(Docs): RNOH社区规范文档调整,以及提供对应模板文件 1、RNOH社区规范文档调整 2、配套规范提供对应模板文件 3、tester直接依赖源码编译,需要在entry做debug和release区分 Signed-off-by: gyange <gyange@163.com> | 6 months ago | |
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 months ago | |
chore(Docs): migrate docs skills into .agents/skills Unify agent skills under .agents/skills so docs tooling lives with other RNOH agent skills instead of under docs/skills. - move docs-quality-audit and docs-spellcheck to .agents/skills - group version-upgrade skills under rnoh-upgrade-version - add upgrade-third-party guidance and sync docs/.agents references Signed-off-by: changlp <chang_leipeng@hoperun.com> | 2 months ago | |
Fix(Linking):修复autolinking 每次构建向 oh-package.json5 尾部追加空行,导致结尾空行随构建次数无限累积 修复autolinking 每次构建向 oh-package.json5 尾部追加空行,导致结尾空行随构建次数无限累积 Close:#3066 Signed-off-by: changlp <chang_leipeng@hoperun.com> | 2 months ago | |
feat(Upgrade): Upgrading the third-party library of the RN framework 影响范围: - Upgrading the third-party library of the RN framework Closes #3055 Signed-off-by: changlp <chang_leipeng@hoperun.com> | 2 months ago | |
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 year ago | |
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 year ago | |
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> Merge branch '0813' into 0824 | 2 months ago | |
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 months ago | |
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> | 3 months ago | |
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 months ago | |
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 year ago | |
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 months ago | |
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 year ago | |
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 year ago | |
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 months ago | |
docs(Docs): optimize the docs structure Co-authored-by: gyange<gyange@163.com> | 6 months ago | |
test(UnitTest): add RefreshControl/tools unit tests AI[49%] Human Fixed[0%] Human[51%] AI Adopted[100%] Signed-off-by: gyange <gyange@163.com> | 2 months ago | |
chore(Upgrade): bump version to 0.84.4 and update release notes - Bump version from 0.84.3 to 0.84.4 across all packages - Fix 0.84.3 release date to upstream tag date (2026-08-11) - Supplement 0.84.3 release entries and add 0.84.4 section - Update 0.84.3 release notes (beta -> release, npm URLs, date fix) - Add 0.84.4 release notes - Sync tester release notes and update tester oh-package version Signed-off-by: liu_wentao <liuwentao57@h-partners.com> AI[0%] Human Fixed[0%] Human[100%] AI Adopted[0%] | 2 months ago | |
docs: 新增社区开发规范 Co-authored-by: gyange<gyange@163.com> | 6 months ago | |
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 year ago | |
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 year ago | |
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 months ago | |
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 months ago | |
chore(Docs): RNOH社区规范文档调整,以及提供对应模板文件 1、RNOH社区规范文档调整 2、配套规范提供对应模板文件 3、tester直接依赖源码编译,需要在entry做debug和release区分 Signed-off-by: gyange <gyange@163.com> | 6 months ago | |
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 months ago | |
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 months ago | |
docs(Docs): 补充稳定版本识别与安装指引 Co-authored-by: alvancf<chengyuanhang3@h-partners.com> | 2 months ago | |
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> | 3 months ago | |
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> | 3 months ago | |
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 months ago | |
feat(Upgrade): Upgrade React Native version to 0.86.3 影响范围: - Upgrade React Native version to 0.86.3 Closes #2676 Signed-off-by: fangyygw <fang_zhen@hoperun.com> | 2 months ago | |
chore: update react-native to 0.82.1 Co-authored-by: Patryk Fryda<patryk.fryda@swmansion.com> # message auto-generated for no-merge-commit merge: !1843 merge 0.82 into 0.82 chore: update react-native to 0.82.1 Created-by: pafry Commit-by: Patryk Fryda Merged-by: huangyouhua Description: # https://gitcode.com/openharmony-sig/ohos_react_native/merge_requests/1835 has to be merged first. ## Why are these changes being made? There is ongoing effort to update react-native and RNOH to 0.82. This is the last step. ### Notable react-native changes: - https://github.com/facebook/react-native/pull/51600 - infoLog removal - https://github.com/facebook/react-native/pull/53094 - changing libhermes to libhermesvm - https://github.com/facebook/react-native/pull/52610 - moving ReactNativeFeatureFlags to src/private - https://github.com/facebook/react-native/pull/53360 - stable DOM API - https://github.com/facebook/react-native/pull/52750 - Install ContextContainer::Shared with std::shared_ptr ### Other changes: - replaced custom RNOH cxx turbomodules ## Changelog - updated react-native to 0.82.1 ## Test Plan - launch tester app, - run sequential and concurrent tests ## 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!1843 | 10 months ago | |
chore(Tests): 迁移tetster-ecosystem包 将tester-ecosystem包从本monorepo迁移至独立仓库维护,解耦生态兼容性测试与核心框架构建流程。 迁移变更: 1. 移除packages/tester-ecosystem/下全部源码及配置文件 2. 从pnpm-workspace.yaml中移除tester-ecosystem工作区引用 3. 从根package.json中移除test:ecosystem脚本 4. 更新scripts/sync-hvigor.js,移除对tester-ecosystem的处理逻辑 5. 更新pnpm-workspace.yaml中hvigor相关注释 影响范围: - pnpm workspace:不再包含tester-ecosystem,pnpm install不再安装其依赖 - 构建脚本:test:ecosystem命令已移除,相关CI流水线需同步调整 - 核心框架:不受影响,tester-ecosystem为独立测试项目 Closes #2544 Signed-off-by: fangyygw <fang_zhen@hoperun.com> | 5 months ago | |
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 year ago |
React Native for OpenHarmony (RNOH)
将 React Native 开发体验完整带入鸿蒙生态 (OpenHarmony)。高性能桥接、完整 Fabric 支持,让 RN 应用无缝运行于鸿蒙。
项目简介
本项目为 React Native 跨平台应用开发框架添加 OpenHarmony 平台支持
| 角色 / 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包管理规范 |
社区交流
微信群:

邮件列表:
待补充
Built with ❤️ by OpenHarmony React Native SIG