diff --git a/ohos_msgpack/AppScope/app.json5 b/ohos_msgpack/AppScope/app.json5 index 9ac9e451b3f22e406879c1d4a3a201e8e6f70c4f..796e4f3e9c9d55d6bfbd788b561c6dc160b65050 100644 --- a/ohos_msgpack/AppScope/app.json5 +++ b/ohos_msgpack/AppScope/app.json5 @@ -3,7 +3,7 @@ "bundleName": "cn.openharmony.msgpack", "vendor": "example", "versionCode": 1000000, - "versionName": "1.0.1", + "versionName": "1.0.2-rc.0", "icon": "$media:app_icon", "label": "$string:app_name" } diff --git a/ohos_msgpack/CHANGELOG.md b/ohos_msgpack/CHANGELOG.md index 98345052e4ca1f1d9fc9291f1dca3fbbe186ef66..b36556ffa4290595824990eadadf508d42273c18 100644 --- a/ohos_msgpack/CHANGELOG.md +++ b/ohos_msgpack/CHANGELOG.md @@ -1,3 +1,6 @@ +## 1.0.2-rc.0 +- Clear build WARN + ## 1.0.1 - 发布正式版本1.0.1 diff --git a/ohos_msgpack/entry/oh-package.json5 b/ohos_msgpack/entry/oh-package.json5 index f96894480be6e613dacac257e9f61feaa4b5cb6a..8ee8c30ac606b51a276fb30ead88e530c604b4f9 100644 --- a/ohos_msgpack/entry/oh-package.json5 +++ b/ohos_msgpack/entry/oh-package.json5 @@ -5,7 +5,7 @@ "name": "entry", "description": "Please describe the basic information.", "main": "", - "version": "1.0.1", + "version": "1.0.2-rc.0", "dependencies": { "@ohos/msgpack": "file:../library" } diff --git a/ohos_msgpack/entry/src/main/ets/pages/Encoding64DemoFour.ets b/ohos_msgpack/entry/src/main/ets/pages/Encoding64DemoFour.ets index 9512acc973d11f646dffa3196756e5f9db9f9ab8..1d2ac753fd8bd9711b154f04e7de84ed974fce82 100644 --- a/ohos_msgpack/entry/src/main/ets/pages/Encoding64DemoFour.ets +++ b/ohos_msgpack/entry/src/main/ets/pages/Encoding64DemoFour.ets @@ -85,8 +85,15 @@ struct Encoding64DemoFour { } } -function data(): ESObject { - let data: ESObject = + +interface CustomData { + ints: number[]; + nums: number[]; + bigints: bigint[]; +} + +function data() { + let data: CustomData = { ints: [0, Number.MAX_SAFE_INTEGER, Number.MIN_SAFE_INTEGER], nums: [Number.NaN, Math.PI, Math.E, Number.POSITIVE_INFINITY, Number.NEGATIVE_INFINITY], diff --git a/ohos_msgpack/entry/src/main/ets/pages/Index.ets b/ohos_msgpack/entry/src/main/ets/pages/Index.ets index 41b838e9cf001bbd0f309c25180891acc24ccbe9..5b69dd1b16cf9554427f21f87d19c2ec99d5162d 100644 --- a/ohos_msgpack/entry/src/main/ets/pages/Index.ets +++ b/ohos_msgpack/entry/src/main/ets/pages/Index.ets @@ -54,7 +54,7 @@ struct Index { Button($r('app.string.Complex_encoding_decoding')) .margin({ top: 10 }) .onClick(() => { - router.push({ url: 'pages/MultiDecodePage' }) + router.pushUrl({ url: 'pages/MultiDecodePage' }) }) Button($r('app.string.Special_Character')) .margin({ top: 10 }) diff --git a/ohos_msgpack/entry/src/main/ets/pages/MultiDecodePage.ets b/ohos_msgpack/entry/src/main/ets/pages/MultiDecodePage.ets index 1c7ee0899185e4f4e6b9778f785c6228ea90a9ea..1722b56200ed5c1dc42dfa91f1a974b033265397 100644 --- a/ohos_msgpack/entry/src/main/ets/pages/MultiDecodePage.ets +++ b/ohos_msgpack/entry/src/main/ets/pages/MultiDecodePage.ets @@ -61,7 +61,7 @@ struct MultiDecodePage { bar, [1, 2, 3], ] - let encodedItems: Uint8Array[] = items.map((item: ESObject): Uint8Array => encode(item)); + let encodedItems: Uint8Array[] = items.map((item): Uint8Array => encode(item)); let encoded = new Uint8Array(encodedItems.reduce((p: number, c: Uint8Array) => p + c.byteLength, 0)); let offset = 0; for (let encodedItem of encodedItems) { diff --git a/ohos_msgpack/library/oh-package.json5 b/ohos_msgpack/library/oh-package.json5 index 0cd46613ce74557b619a51fdec6194b8b85eafbe..5e1d7cfd739b772a145b419054798e9b3a0f95b9 100644 --- a/ohos_msgpack/library/oh-package.json5 +++ b/ohos_msgpack/library/oh-package.json5 @@ -10,7 +10,7 @@ "main": "Index.ts", "type": "module", "repository": "https://gitee.com/openharmony-tpc/openharmony_tpc_samples/tree/master/ohos_msgpack", - "version": "1.0.1", + "version": "1.0.2-rc.0", "tags": [ "Tool" ], diff --git a/ohos_msgpack/library/src/main/ets/utils/utf8.ts b/ohos_msgpack/library/src/main/ets/utils/utf8.ts index b10106f9d3acd5c4e5b168971862684c4f2265cf..291edb5379e5c4591499d6611fa127418d81234e 100644 --- a/ohos_msgpack/library/src/main/ets/utils/utf8.ts +++ b/ohos_msgpack/library/src/main/ets/utils/utf8.ts @@ -167,7 +167,7 @@ const TEXT_DECODER_THRESHOLD = 200; export function utf8DecodeTD(bytes: Uint8Array, inputOffset: number, byteLength: number): string { const stringBytes = bytes.subarray(inputOffset, inputOffset + byteLength); - return sharedTextDecoder.decodeWithStream(stringBytes); + return sharedTextDecoder.decodeToString(stringBytes); } export function utf8Decode(bytes: Uint8Array, inputOffset: number, byteLength: number): string { diff --git a/ohos_msgpack/oh-package.json5 b/ohos_msgpack/oh-package.json5 index 1bbfbc86d5b2fa1903dae21dd86dff7535329a17..d3994631ed41242071ddaace1c4bb8251bd3c7a1 100644 --- a/ohos_msgpack/oh-package.json5 +++ b/ohos_msgpack/oh-package.json5 @@ -7,6 +7,6 @@ "name": "ohos_msgpack", "description": "Please describe the basic information.", "main": "", - "version": "1.0.1", + "version": "1.0.2-rc.0", "dependencies": {} }