diff --git a/CHANGELOG.md b/CHANGELOG.md index f92fe2e1edc80f161dfe2d5d68a8a6211b508841..631ca149a88bfcdb72decb32eacf2cfe8dc11b14 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,13 @@ # Changelog + +## 5.1.0.203 +- chore: update to version 0.72.57,([e10c9b86e](https://gitee.com/openharmony-sig/ohos_react_native/commit/e10c9b86e27d638261e28d8f18048bafb5ef47a1)) +- fix:crash when Animated remove native event,([62fd10343](https://gitee.com/openharmony-sig/ohos_react_native/commit/62fd10343f8061dac00ad3c0f72ccc45855b15ec)) +- fix lineHeight inconsistency,([325a3319c](https://gitee.com/openharmony-sig/ohos_react_native/commit/325a3319c642880e007aa0cffcebe8b32cc351ef)) +- chore: update to version 5.1.0.202(0.72.56),([6d5003245](https://gitee.com/openharmony-sig/ohos_react_native/commit/6d5003245109243b330adeb32156a0fe9de28575)) +- fix(codecheck): unsafe memcpy,([9b42afd1a](https://gitee.com/openharmony-sig/ohos_react_native/commit/9b42afd1aa3aa6c4200e51577aa1260fdd75479d)) +- feat(mmap): speed up bundle loading with mmap,([1451c57a5](https://gitee.com/openharmony-sig/ohos_react_native/commit/1451c57a5c5a63607a0020c1b1ca4cb861372805)) + ## 5.1.0.202 - Supplement the pull third-party library dependency command,([18e052f9](https://gitee.com/openharmony-sig/ohos_react_native/commit/18e052f9e2073ab4860f1526e21ecd8c0daab360)) - doc(performance): update performance tuning instructions and add BiSheng compiler usage,([c3ad53c3](https://gitee.com/openharmony-sig/ohos_react_native/commit/c3ad53c3dac1f260af07016e49924d5d0563e777)) diff --git a/README_zh.md b/README_zh.md index 087337ebc1bd0c0fa9e713787d8d05755b2ad0b4..9157b9a8fdb26bdb60cd53cd86bbe2c0ac18e579 100644 --- a/README_zh.md +++ b/README_zh.md @@ -7,16 +7,20 @@ ### 前提条件 #### 安装了HarmonyOS NEXT的模拟器或真机 + 该项目需要HarmonyOS NEXT上进行测试。 #### 华为开发者账号 + 运行应用程序时,需要用到华为开发者账号进行签名。 #### DevEco Studio + 从[官网](https://developer.huawei.com/consumer/cn/deveco-studio/)下载并安装最新版本 DevEco Studio。 ### 启动项目 -> 如果是编译源码,在拉取工程后需要在工程的根目录执行`git submodule update --init`命令,拉取三方库依赖。 + +> 如果是编译源码,在拉取工程后需要在工程的根目录执行`git submodule update --init --recursive`命令,拉取三方库依赖。 1. 打开终端(命令行工具)并导航到react-native-harmony-cli目录,然后执行 `npm i && npm pack`。 1. 在终端中导航到react-native-harmony-sample-package目录,然后执行 `npm i && npm pack`。 @@ -35,16 +39,20 @@ - RNOH的使用问题可查阅[中文文档](./docs/zh-cn/README.md)或[英文文档](./docs/en/README.md)。 ## 版本说明 + 当前发布的最新正式版本: + - [RNOH v5.0.0.813(2024-12-26)](./docs/zh-cn/release-notes/react-native-harmony-v5.0.0.813.md) 历史发布的正式版本: + - [RNOH v5.0.0.812(2024-12-14)](./docs/zh-cn/release-notes/react-native-harmony-v5.0.0.812.md) - [RNOH v5.0.0.715(2024-10-25)](./docs/zh-cn/release-notes/react-native-harmony-v5.0.0.715.md) - [RNOH v5.0.0.601(2024-09-26)](./docs/zh-cn/release-notes/react-native-harmony-v5.0.0.601.md) - [RNOH v5.0.0.500(2024-08-27)](./docs/zh-cn/release-notes/react-native-harmony-v5.0.0.500.md) ## 分支说明 + - 0.72.5-ohos-5.0-release分支:release分支,如需下载源码,请从此分支下载上述正式版本对应的tag点源码。 - master分支:主分支,请勿从此分支拉取源码用于商用版本,不保证质量。 - dev分支/partner-dev分支:开发分支,请勿从此分支拉取源码,不保证质量。 diff --git a/docs/Samples/Capture_bundle/NativeProject/AppScope/app.json5 b/docs/Samples/Capture_bundle/NativeProject/AppScope/app.json5 index cfc56cdf27a2f1e0a320f40ea3c84bb0915b502c..3d2e31a3f9f5f9084aab0dce6c5271f5d3539316 100644 --- a/docs/Samples/Capture_bundle/NativeProject/AppScope/app.json5 +++ b/docs/Samples/Capture_bundle/NativeProject/AppScope/app.json5 @@ -1,6 +1,6 @@ { "app": { - "bundleName": "com.example.CaptureBundle", + "bundleName": "com.example.capturebundle", "vendor": "example", "versionCode": 1000000, "versionName": "1.0.0", diff --git a/docs/Samples/Capture_bundle/NativeProject/entry/hvigorfile.ts b/docs/Samples/Capture_bundle/NativeProject/entry/hvigorfile.ts index d0f029bd2a2858b1701bf87bf3f67c00d5630c84..6650e7217be2e794b661d45f0d373a35d0026db4 100644 --- a/docs/Samples/Capture_bundle/NativeProject/entry/hvigorfile.ts +++ b/docs/Samples/Capture_bundle/NativeProject/entry/hvigorfile.ts @@ -8,6 +8,6 @@ import { hapTasks } from '@ohos/hvigor-ohos-plugin'; export default { - system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ + system: hapTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ } diff --git a/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/RNPackagesFactory.ets b/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/RNPackagesFactory.ets index 193ab1590919086abfb7b631470f31e9d41b086b..32a1c1f885769452c41143514bf10459f08e7fc6 100644 --- a/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/RNPackagesFactory.ets +++ b/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/RNPackagesFactory.ets @@ -6,6 +6,7 @@ */ import { RNPackageContext, RNPackage } from '@rnoh/react-native-openharmony/ts'; + export function createRNPackages(ctx: RNPackageContext): RNPackage[] { return []; } \ No newline at end of file diff --git a/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/pages/Index.ets b/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/pages/Index.ets index bc6ef0a3d4b624cf3dedc9d9f98b767f60d06590..9ce6839c316aaf2635a4d9536651acf0d8befb76 100644 --- a/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/pages/Index.ets +++ b/docs/Samples/Capture_bundle/NativeProject/entry/src/main/ets/pages/Index.ets @@ -20,7 +20,8 @@ import { import { createRNPackages } from '../RNPackagesFactory'; @Builder -export function buildCustomRNComponent(ctx: ComponentBuilderContext) {}; +export function buildCustomRNComponent(ctx: ComponentBuilderContext) { +}; const wrappedCustomRNComponentBuilder = wrapBuilder(buildCustomRNComponent); diff --git a/docs/Samples/Capture_bundle/NativeProject/hvigorfile.ts b/docs/Samples/Capture_bundle/NativeProject/hvigorfile.ts index 549b0badab9ef99722e947c60855c7dd266ae506..15864d709a604c7a9db90b9afec84fc9f1ee044e 100644 --- a/docs/Samples/Capture_bundle/NativeProject/hvigorfile.ts +++ b/docs/Samples/Capture_bundle/NativeProject/hvigorfile.ts @@ -8,6 +8,11 @@ import { appTasks } from '@ohos/hvigor-ohos-plugin'; export default { +<<<<<<< HEAD + system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +======= system: appTasks, /* Built-in plugin of Hvigor. It cannot be modified. */ - plugins:[] /* Custom plugin to extend the functionality of Hvigor. */ + plugins: [] /* Custom plugin to extend the functionality of Hvigor. */ +>>>>>>> 589ae80f (Format the code format of the Sample project) } diff --git a/docs/Samples/Capture_bundle/ReactProject/App.tsx b/docs/Samples/Capture_bundle/ReactProject/App.tsx index 1c91d6b69ca07dcc8a14953dc6fc2e1d6951183e..3024526b3a082e2e433bdfc5097734a753bb6d6d 100644 --- a/docs/Samples/Capture_bundle/ReactProject/App.tsx +++ b/docs/Samples/Capture_bundle/ReactProject/App.tsx @@ -5,94 +5,94 @@ * LICENSE-MIT file in the root directory of this source tree. */ -import React ,{useState} from 'react'; -import {View,Text,Button,Alert,StyleSheet} from 'react-native' +import React, { useState } from 'react'; +import { View, Text, Button, Alert, StyleSheet } from 'react-native' -const App:React.FC = () => { - const[errorMessage,setErrorMessage] = useState(''); +const App: React.FC = () => { + const [errorMessage, setErrorMessage] = useState(''); - const handleReferenceError = () =>{ - try{ + const handleReferenceError = () => { + try { const erro = new ReferenceError('Some error happened'); throw error; - }catch(e){ - console.error('Caught an error:',e); + } catch (e) { + console.error('Caught an error:', e); setErrorMessage(e.message); } }; - const handleStandardError = () =>{ - try{ + const handleStandardError = () => { + try { const error = new Error('Some error happened'); throw error; - }catch(e){ - console.error('Caught an error:',e); + } catch (e) { + console.error('Caught an error:', e); setErrorMessage(e.message); } }; - const handleFrozenError = () =>{ - try{ + const handleFrozenError = () => { + try { const error = Object.freeze(new Error('Some error happened')); throw error; - }catch(e){ - console.error('Caught an error:',e); + } catch (e) { + console.error('Caught an error:', e); setErrorMessage(e.message); } }; - const handleWarningError = () =>{ - try{ - const warning = new Error('This is a warning message') as any; + const handleWarningError = () => { + try { + const warning = new Error('This is a warning message') as any; warning.type = 'warn'; throw warning; - }catch(e){ - Alert.alert('Warning',e.message); - setErrorMessage('Warning displayed:'+e.message); + } catch (e) { + Alert.alert('Warning', e.message); + setErrorMessage('Warning displayed:' + e.message); } }; - return( + return ( - Press a Button to trigger an error or warning: - -