React Native鸿蒙化仓库
| Files | Last commit | Last update |
|---|---|---|
refactor: integrate quality-toolkit — full quality engineering stack Replace all self-hosted quality tooling with the quality-toolkit submodule (standards + skills + tools, 185 rules, 62-scenario self-verification suite). Single atomic commit; detailed history in the toolkit repo. Compliance harness: - .quality-toolkit submodule (HTTPS) + .quality/harness.config.json - 185-rule catalog with dependency gating; CI gate via --commit-range Commit enforcement: - commitlint rnoh preset with rnoh-tests-required rule - .githooks: commitlint + gitleaks + lint-staged after business checks Issue/PR automation: - tools/submit, tools/create-issue, tools/generate-branch-pr, tools/platform-api (gitcode/gitee/atomgit/github) Static analysis + multi-branch submit (restored from RNOH): - tools/static-check: 782-line multi-language engine - tools/submit-prs: 606-line Python multi-branch automation Skills structure: - .agents/skills/ → mixed: toolkit skills via symlinks (13 generic) + RNOH-local skills (arkts-test, rnoh-upgrade) - arkts-test moved from toolkit (HarmonyOS-specific) - rnoh-upgrade created from upgrade-version Part B+C (RNOH-specific) Testing: - packages/rnoh_test: CPTF E2E suite (submodule, HTTPS) - .opencode/agent/: 13 agents from toolkit + 2 RNOH-local skills Scripts replaced: all self-hosted quality scripts → toolkit equivalents (check_includes, integrate-upstream-code, package-trim, verify-docs, format-cpp, gitleaks, bump-version, gtest-*, patch-react-native) Impact: pnpm init-ws works without SSH keys; pnpm harness exit 0; pnpm submit --create-issue --yes creates issue + PR + linkage. test case: toolkit 62-scenario suite + gtest:quality 2983 tests + live Issue/PR creation on CPTF fork Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago | |
chore(Docs): RNOH社区规范文档调整,以及提供对应模板文件 1、RNOH社区规范文档调整 2、配套规范提供对应模板文件 3、tester直接依赖源码编译,需要在entry做debug和release区分 Signed-off-by: gyange <gyange@163.com> | 6 months ago | |
refactor: integrate quality-toolkit — full quality engineering stack Replace all self-hosted quality tooling with the quality-toolkit submodule (standards + skills + tools, 185 rules, 62-scenario self-verification suite). Single atomic commit; detailed history in the toolkit repo. Compliance harness: - .quality-toolkit submodule (HTTPS) + .quality/harness.config.json - 185-rule catalog with dependency gating; CI gate via --commit-range Commit enforcement: - commitlint rnoh preset with rnoh-tests-required rule - .githooks: commitlint + gitleaks + lint-staged after business checks Issue/PR automation: - tools/submit, tools/create-issue, tools/generate-branch-pr, tools/platform-api (gitcode/gitee/atomgit/github) Static analysis + multi-branch submit (restored from RNOH): - tools/static-check: 782-line multi-language engine - tools/submit-prs: 606-line Python multi-branch automation Skills structure: - .agents/skills/ → mixed: toolkit skills via symlinks (13 generic) + RNOH-local skills (arkts-test, rnoh-upgrade) - arkts-test moved from toolkit (HarmonyOS-specific) - rnoh-upgrade created from upgrade-version Part B+C (RNOH-specific) Testing: - packages/rnoh_test: CPTF E2E suite (submodule, HTTPS) - .opencode/agent/: 13 agents from toolkit + 2 RNOH-local skills Scripts replaced: all self-hosted quality scripts → toolkit equivalents (check_includes, integrate-upstream-code, package-trim, verify-docs, format-cpp, gitleaks, bump-version, gtest-*, patch-react-native) Impact: pnpm init-ws works without SSH keys; pnpm harness exit 0; pnpm submit --create-issue --yes creates issue + PR + linkage. test case: toolkit 62-scenario suite + gtest:quality 2983 tests + live Issue/PR creation on CPTF fork Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago | |
refactor: integrate quality-toolkit — full quality engineering stack Replace all self-hosted quality tooling with the quality-toolkit submodule (standards + skills + tools, 185 rules, 62-scenario self-verification suite). Single atomic commit; detailed history in the toolkit repo. Compliance harness: - .quality-toolkit submodule (HTTPS) + .quality/harness.config.json - 185-rule catalog with dependency gating; CI gate via --commit-range Commit enforcement: - commitlint rnoh preset with rnoh-tests-required rule - .githooks: commitlint + gitleaks + lint-staged after business checks Issue/PR automation: - tools/submit, tools/create-issue, tools/generate-branch-pr, tools/platform-api (gitcode/gitee/atomgit/github) Static analysis + multi-branch submit (restored from RNOH): - tools/static-check: 782-line multi-language engine - tools/submit-prs: 606-line Python multi-branch automation Skills structure: - .agents/skills/ → mixed: toolkit skills via symlinks (13 generic) + RNOH-local skills (arkts-test, rnoh-upgrade) - arkts-test moved from toolkit (HarmonyOS-specific) - rnoh-upgrade created from upgrade-version Part B+C (RNOH-specific) Testing: - packages/rnoh_test: CPTF E2E suite (submodule, HTTPS) - .opencode/agent/: 13 agents from toolkit + 2 RNOH-local skills Scripts replaced: all self-hosted quality scripts → toolkit equivalents (check_includes, integrate-upstream-code, package-trim, verify-docs, format-cpp, gitleaks, bump-version, gtest-*, patch-react-native) Impact: pnpm init-ws works without SSH keys; pnpm harness exit 0; pnpm submit --create-issue --yes creates issue + PR + linkage. test case: toolkit 62-scenario suite + gtest:quality 2983 tests + live Issue/PR creation on CPTF fork Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago | |
chore(Config): drop the repo-level fork owner declaration per review The remote.fork block added in b9b453f0b hardcodes a personal fork into a config file shared by every contributor of the upstream repository. resolveFork treats remoteConfig.fork as the highest-priority fork source, so non-owner contributors running generate-branch-pr would be directed to a fork they cannot push to (remote-add then 403, or the owner/repo validation exits early). The submit workflow is unaffected (it does not pass remoteConfig), but the declaration was added for generate-branch-pr in the first place, so it cannot stay. Keep only the remote.origin label (local origin plays upstream — documentation only, no code consumes it) and let fork resolution fall back to the per-user chain: local fork remote, GBR_FORK_OWNER / GBR_FORK_REMOTE env, API fork detection (and fork auto-creation when enabled). Every contributor resolves their own fork that way. Impact: harness config only. The equivalent declarations on rnoh_test and CPTF carry the same latent flaw for other contributors; follow-ups proposed separately (config removal there, plus a per-user placeholder mechanism in the toolkit as the systemic fix). Signed-off-by: gyange <gaoyang36@huawei.com> | 28 days ago | |
!3675 merge feature/image-asset-root-multi-bundle-086 into main feat(Image): add AssetRoot for multi-bundle asset resolution Created-by: changlp Commit-by: changlp Merged-by: openharmony_ci Description: ## Summary - Add per-bundle AssetRoot for Image/asset resolution across multi-bundle OH apps - Sync asset roots to worker and resolve blob/Image URIs with owner bundle context - Include docs/Samples/BundleAssetRootSample (review fixes: stream try/finally, empty signingConfigs, lifecycle mutex, safer optional checks) ## Linked Issue Close #3321 ## Test plan - [x] packages/react-native-harmony/tests/asset-root.test.ts - [x] packages/react-native-harmony/tests/asset-resolver.test.ts - [ ] Manual verify BundleAssetRootSample (Image placeholders / fetch blob / Hot BizA) ## Change Type - [x] Feature ## Self-Check - [x] DCO Signed-off-by present (changlp) - [x] English commit subject/body ## Target - Base: main - Head: changlp/ohos_react_native_zy_0921:feature/image-asset-root-multi-bundle-086 ## Note Replaces !3664 which was opened from fangyygw/ohos_react_native_dzm and could not receive updates pushed to the changlp fork. See merge request: CPF-RN/ohos_react_native!3675 | 23 days ago | |
feat(Image): add AssetRoot for multi-bundle asset resolution Support per-bundle asset roots so multi-bundle apps resolve local Image and fetch/blob assets under the correct rawfile or file prefix instead of a shared global root: harmony AssetRegistry / AssetSourceResolver / resolveAssetSource JS shims, the ArkTS AssetResolver / RNInstance / Worker wiring, ImageNode and ImageComponentInstance placeholder handling, and Jest tests. Signed-off-by: changlp <chang_leipeng@hoperun.com> | 23 days ago | |
chore(Upgrade): guard the preset plugin shape and extract install hooks to files Two follow-ups from MR review: commitlint.config.js merged the toolkit preset's plugin rules into this repo's single inline-plugin slot via preset.plugins[0].rules. That silently degrades to {} if the toolkit ever splits its rules across several plugins or moves them off the first one — the preset rules would drop out of the overlay with no error. Surface both structural breaks now: warn when the preset does not expose exactly one plugin object, and warn when the extracted rule set comes back empty. Both warnings name the pinned toolkit version so the drift is diagnosable. preinstall and _setup:husky were two inline node -e one-liners of very different length. Extract both into scripts/ as plain readable files and point the package.json entries at them — identical behavior (warn-only submodule self-heal, pnpm version gate when the toolkit is present, hooks/template git config), with the warn texts normalized to English to match the repo's all-English posture. Smoke-tested on this checkout: the gate runs, the git config stays idempotent, and the commitlint overlay still carries the full preset rule set plus body-english. Signed-off-by: gyange <gaoyang36@huawei.com> | 28 days ago | |
chore(Upgrade): bump .quality-toolkit to f854c3e and declare the fork remote The toolkit pointer moves past e77f631 to pick up quality-toolkit !3-!7: issue-spec template rendering for --create-issue with a language gate, the tiered generalization RFC, tier-2 config keys (community.testRef as the single test-reference vocabulary, community.language, issueTemplates.source, aiReview.blockOn, lint.formatters), fork auto-creation for generate-branch-pr with remote owner/repo validation and one-shot push credentials for token-free fork remotes, and plain-template issue bodies without the provenance header. The harness config now also declares the remote topology: remote.origin labels the local origin remote as the upstream, and remote.fork names gyange/ohos_react_native, so fork detection no longer relies on local-remote or API probing. Submodule pointer and config only; no dependency manifest updates. Signed-off-by: gyange <gaoyang36@huawei.com> AI[0%] Human Fixed[0%] Human[100%] AI Adopted[0%] | 28 days 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 | |
test(UnitTests): rename upstream-colliding tests and rewrite RemoteImageLoader tests 上游同步覆盖白盒测试:pnpm init-ws 执行 integrate-upstream-code.ts 时用 fs.cpSync 无条件覆盖与 上游子模块同路径同名的文件,已提交的 AnimatedNative/HTMLCollection/NodeList 适配版测试被上游 0.86.3 原文覆盖,43 个用例失败;removeUntrackedFiles() 使用 git ls-files --others 会静默删除 未提交的 untracked 文件。另上游路径迁移(debugging/ 迁移至新子目录)带入的 TracingStateObserver-test.js 以未跟踪状态混入执行。 同步覆盖修复:4 个与上游同名的测试重命名为 *-rnoh-test.js(内容不变);TracingStateObserver-test.js 复制为 -rnoh- 副本保留 7 个用例;.gitignore 与 jest.config.js 的 testPathIgnorePatterns 双清单排除 上游原文;removeUntrackedFiles() 改用 git ls-files --others --ignored --exclude-standard 只清理 ignored 的上游遗留文件并打印保留清单;.agents/skills/rnoh-js-test/SKILL.md 补充上游同名测试冲突 规则。 RemoteImageLoader 测试失效:源码磁盘探测已由 diskCache.has 改为 fs.accessSync、prefetch 去重表 activePrefetchByUrl 提升为 private static,测试仍按旧契约 mock 导致 12 个用例失败。重写为 mock fs.accessSync 模拟磁盘状态、经类访问 static map 并在 beforeEach 清理防跨用例污染、断言对齐新 持久化契约(fs.moveFile + onDiskCacheUpdate)。 影响范围: 仅测试与工具链(JS/ArkTS 白盒测试、integrate-upstream-code.ts 同步脚本、.agents 文档 与 .cspell.json 词典),不涉及 Symbols/Native/构建产物,对现网功能无影响。 验证:JS 白盒 41 套件 578 用例(含恢复 27 个此前被误排除的已提交用例)、ArkTS 白盒 85 套件 2159 用例全部通过;实测 integrate-upstream-code.ts 重跑,未提交文件存活、上游原文还原后被 gitignore 正确忽略、关键文件内容不变。 Signed-off-by: liu_wentao <liuwentao57@h-partners.com> AI[0%] Human Fixed[0%] Human[100%] AI Adopted[0%] | 1 month 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: integrate quality-toolkit — full quality engineering stack Replace all self-hosted quality tooling with the quality-toolkit submodule (standards + skills + tools, 185 rules, 62-scenario self-verification suite). Single atomic commit; detailed history in the toolkit repo. Compliance harness: - .quality-toolkit submodule (HTTPS) + .quality/harness.config.json - 185-rule catalog with dependency gating; CI gate via --commit-range Commit enforcement: - commitlint rnoh preset with rnoh-tests-required rule - .githooks: commitlint + gitleaks + lint-staged after business checks Issue/PR automation: - tools/submit, tools/create-issue, tools/generate-branch-pr, tools/platform-api (gitcode/gitee/atomgit/github) Static analysis + multi-branch submit (restored from RNOH): - tools/static-check: 782-line multi-language engine - tools/submit-prs: 606-line Python multi-branch automation Skills structure: - .agents/skills/ → mixed: toolkit skills via symlinks (13 generic) + RNOH-local skills (arkts-test, rnoh-upgrade) - arkts-test moved from toolkit (HarmonyOS-specific) - rnoh-upgrade created from upgrade-version Part B+C (RNOH-specific) Testing: - packages/rnoh_test: CPTF E2E suite (submodule, HTTPS) - .opencode/agent/: 13 agents from toolkit + 2 RNOH-local skills Scripts replaced: all self-hosted quality scripts → toolkit equivalents (check_includes, integrate-upstream-code, package-trim, verify-docs, format-cpp, gitleaks, bump-version, gtest-*, patch-react-native) Impact: pnpm init-ws works without SSH keys; pnpm harness exit 0; pnpm submit --create-issue --yes creates issue + PR + linkage. test case: toolkit 62-scenario suite + gtest:quality 2983 tests + live Issue/PR creation on CPTF fork Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month 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 | |
chore(Upgrade): approve dependency build scripts and migrate pnpm config for v11 The CI pnpm install fails under pnpm 11 with ERR_PNPM_IGNORED_BUILDS for @swc/core and sqlite3 — pnpm 11 turned unapproved dependency build scripts from a warning into an exit-1 failure (reproduced locally with pnpm 11.21.0: a control install exits 1 with the same error, adding allowBuilds exits 0 and the builds run). pnpm 11 also no longer reads pnpm-specific settings from .npmrc, so node-linker=hoisted was silently dropped and the install fell back to the default isolated linker (verified: pnpm config get node-linker answers undefined when only .npmrc carries it). - pnpm-workspace.yaml: allowBuilds approval for @swc/core (transitive via ts-node; postinstall fetches the platform binding) and sqlite3 (direct dep of packages/tester; postinstall fetch/builds the native binding) - pnpm-workspace.yaml: nodeLinker hoisted + packageManagerStrict(+Version) + managePackageManagerVersions migrated from .npmrc - .npmrc: registry/auth lines stay (npm-compatible settings keep the .npmrc domain) Impact: build toolchain config only, no source or test code. Lockfile untouched (CI re-resolves; regeneration stays a separate follow-up). Signed-off-by: gyange <gaoyang36@huawei.com> | 28 days 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 | |
refactor: integrate quality-toolkit — full quality engineering stack Replace all self-hosted quality tooling with the quality-toolkit submodule (standards + skills + tools, 185 rules, 62-scenario self-verification suite). Single atomic commit; detailed history in the toolkit repo. Compliance harness: - .quality-toolkit submodule (HTTPS) + .quality/harness.config.json - 185-rule catalog with dependency gating; CI gate via --commit-range Commit enforcement: - commitlint rnoh preset with rnoh-tests-required rule - .githooks: commitlint + gitleaks + lint-staged after business checks Issue/PR automation: - tools/submit, tools/create-issue, tools/generate-branch-pr, tools/platform-api (gitcode/gitee/atomgit/github) Static analysis + multi-branch submit (restored from RNOH): - tools/static-check: 782-line multi-language engine - tools/submit-prs: 606-line Python multi-branch automation Skills structure: - .agents/skills/ → mixed: toolkit skills via symlinks (13 generic) + RNOH-local skills (arkts-test, rnoh-upgrade) - arkts-test moved from toolkit (HarmonyOS-specific) - rnoh-upgrade created from upgrade-version Part B+C (RNOH-specific) Testing: - packages/rnoh_test: CPTF E2E suite (submodule, HTTPS) - .opencode/agent/: 13 agents from toolkit + 2 RNOH-local skills Scripts replaced: all self-hosted quality scripts → toolkit equivalents (check_includes, integrate-upstream-code, package-trim, verify-docs, format-cpp, gitleaks, bump-version, gtest-*, patch-react-native) Impact: pnpm init-ws works without SSH keys; pnpm harness exit 0; pnpm submit --create-issue --yes creates issue + PR + linkage. test case: toolkit 62-scenario suite + gtest:quality 2983 tests + live Issue/PR creation on CPTF fork Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago | |
chore(Config): enforce English commit bodies - add a body-english plugin rule to the repo commitlint wrapper, merged into the same inline plugin object as the RNOH preset rules (commitlint keeps a single slot for inline plugin objects; separate entries would silently drop the preset implementations) - subject English is already enforced by the preset rnoh-subject-english - CJK is only allowed inside backticks or fenced code blocks - declare the English policy for commits, PRs, and issues in AGENTS.md impact scope: commit-msg validation for all future commits; toolchain config only, no runtime code involved test case: none required; existing test cases need no modification Signed-off-by: gyange <gaoyang36@huawei.com> | 30 days ago | |
docs(Docs): add local CLI install steps to upgrade guide Add missing local install commands for @rnoh/react-native-harmony-cli in the upgrade guide. DTS: DTS2026100964478 Impact: documentation only Signed-off-by: changlp <chang_leipeng@hoperun.com> | 25 days 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: 文档相关问题修改 -版本说明文档拆分、统一推荐版本线、README 结论先行 -死锚点修复 -master分支 + 旧域名链接清理 Closes #3156 Signed-off-by: changlp <chang_leipeng@hoperun.com> | 1 month ago | |
chore(Upgrade): fail fast when the preset plugin shape breaks Follow-up to MR review: a console.warn is easy to scroll past in CI, and the failure mode it guarded is exactly the silent one — if the toolkit preset ever splits its rules across several plugins, taking presetPlugins[0].rules drops the rest while commitlint keeps running with a smaller rule set. Both structural guards in commitlint.config.js now throw instead: the exact-one-plugin invariant and the non-empty extracted-rule-set invariant each raise an error naming the pinned toolkit version, so config loading fails loudly the moment the overlay and the preset shape drift apart. The install-hook scripts (scripts/preinstall.js, scripts/setup-husky.js) intentionally stay warn-only: there the missing-toolkit case is a bootstrap condition that must not fail the install, which is a different invariant from this config-shape one. Smoke-tested on this checkout: the config still loads with the current pin (12 plugin rules, 68 scope-enum entries), and fixtures with a 2-plugin preset, a 0-plugin preset, and an empty rule set all fail config loading with the new errors. Signed-off-by: gyange <gaoyang36@huawei.com> | 28 days ago | |
refactor: integrate quality-toolkit — full quality engineering stack Replace all self-hosted quality tooling with the quality-toolkit submodule (standards + skills + tools, 185 rules, 62-scenario self-verification suite). Single atomic commit; detailed history in the toolkit repo. Compliance harness: - .quality-toolkit submodule (HTTPS) + .quality/harness.config.json - 185-rule catalog with dependency gating; CI gate via --commit-range Commit enforcement: - commitlint rnoh preset with rnoh-tests-required rule - .githooks: commitlint + gitleaks + lint-staged after business checks Issue/PR automation: - tools/submit, tools/create-issue, tools/generate-branch-pr, tools/platform-api (gitcode/gitee/atomgit/github) Static analysis + multi-branch submit (restored from RNOH): - tools/static-check: 782-line multi-language engine - tools/submit-prs: 606-line Python multi-branch automation Skills structure: - .agents/skills/ → mixed: toolkit skills via symlinks (13 generic) + RNOH-local skills (arkts-test, rnoh-upgrade) - arkts-test moved from toolkit (HarmonyOS-specific) - rnoh-upgrade created from upgrade-version Part B+C (RNOH-specific) Testing: - packages/rnoh_test: CPTF E2E suite (submodule, HTTPS) - .opencode/agent/: 13 agents from toolkit + 2 RNOH-local skills Scripts replaced: all self-hosted quality scripts → toolkit equivalents (check_includes, integrate-upstream-code, package-trim, verify-docs, format-cpp, gitleaks, bump-version, gtest-*, patch-react-native) Impact: pnpm init-ws works without SSH keys; pnpm harness exit 0; pnpm submit --create-issue --yes creates issue + PR + linkage. test case: toolkit 62-scenario suite + gtest:quality 2983 tests + live Issue/PR creation on CPTF fork Signed-off-by: gyange <gaoyang36@huawei.com> AI[100%] Human Fixed[0%] Human[0%] AI Adopted[100%] Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> Co-authored-by: opencode (glm-5.2) <ai@local> Co-authored-by: opencode (glm-5.3) <ai@local> | 1 month ago | |
chore(Upgrade): guard the preset plugin shape and extract install hooks to files Two follow-ups from MR review: commitlint.config.js merged the toolkit preset's plugin rules into this repo's single inline-plugin slot via preset.plugins[0].rules. That silently degrades to {} if the toolkit ever splits its rules across several plugins or moves them off the first one — the preset rules would drop out of the overlay with no error. Surface both structural breaks now: warn when the preset does not expose exactly one plugin object, and warn when the extracted rule set comes back empty. Both warnings name the pinned toolkit version so the drift is diagnosable. preinstall and _setup:husky were two inline node -e one-liners of very different length. Extract both into scripts/ as plain readable files and point the package.json entries at them — identical behavior (warn-only submodule self-heal, pnpm version gate when the toolkit is present, hooks/template git config), with the warn texts normalized to English to match the repo's all-English posture. Smoke-tested on this checkout: the gate runs, the git config stays idempotent, and the commitlint overlay still carries the full preset rule set plus body-english. Signed-off-by: gyange <gaoyang36@huawei.com> | 28 days 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(Upgrade): approve dependency build scripts and migrate pnpm config for v11 The CI pnpm install fails under pnpm 11 with ERR_PNPM_IGNORED_BUILDS for @swc/core and sqlite3 — pnpm 11 turned unapproved dependency build scripts from a warning into an exit-1 failure (reproduced locally with pnpm 11.21.0: a control install exits 1 with the same error, adding allowBuilds exits 0 and the builds run). pnpm 11 also no longer reads pnpm-specific settings from .npmrc, so node-linker=hoisted was silently dropped and the install fell back to the default isolated linker (verified: pnpm config get node-linker answers undefined when only .npmrc carries it). - pnpm-workspace.yaml: allowBuilds approval for @swc/core (transitive via ts-node; postinstall fetches the platform binding) and sqlite3 (direct dep of packages/tester; postinstall fetch/builds the native binding) - pnpm-workspace.yaml: nodeLinker hoisted + packageManagerStrict(+Version) + managePackageManagerVersions migrated from .npmrc - .npmrc: registry/auth lines stay (npm-compatible settings keep the .npmrc domain) Impact: build toolchain config only, no source or test code. Lockfile untouched (CI re-resolves; regeneration stays a separate follow-up). Signed-off-by: gyange <gaoyang36@huawei.com> | 28 days 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编译构建指南 |
📦 版本管理
💡 该用哪个版本:本仓库默认分支
main为版本演进分支(当前承载新版本探索开发,不保证稳定性),生产环境请勿直接依赖;生产接入请安装 npm dist-tag0.XX-stable形式的稳定版(如@react-native-oh/react-native-harmony@0.82-stable,命名对齐上游react-native,随迭代自动前移)。当前推荐:新项目生产接入首选0.82-stable(最新 GA)。各版本线状态一览见 稳定版本识别与安装 · 推荐版本判定表。
| 文档 | 说明 |
|---|---|
| 稳定版本识别与安装 | 版本选型结论与推荐版本判定表 |
| 版本说明 | Release Notes 发布记录 |
| 版本升级指导 | 版本升级流程 |
| 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