Skip to content

Commit a248f18

Browse files
committed
use latest rnoh package
1 parent 268f39f commit a248f18

File tree

11 files changed

+31
-34
lines changed

11 files changed

+31
-34
lines changed

Example/harmony_use_pushy/bun.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"@react-native-oh/react-native-harmony": "^0.72.59",
88
"react": "18.2.0",
99
"react-native": "0.72.5",
10-
"react-native-update": "^10.34.9",
10+
"react-native-update": "^10.35.0",
1111
},
1212
"devDependencies": {
1313
"@babel/core": "^7.20.0",
@@ -1399,7 +1399,7 @@
13991399

14001400
"react-native": ["[email protected]", "", { "dependencies": { "@jest/create-cache-key-function": "^29.2.1", "@react-native-community/cli": "11.3.7", "@react-native-community/cli-platform-android": "11.3.7", "@react-native-community/cli-platform-ios": "11.3.7", "@react-native/assets-registry": "^0.72.0", "@react-native/codegen": "^0.72.7", "@react-native/gradle-plugin": "^0.72.11", "@react-native/js-polyfills": "^0.72.1", "@react-native/normalize-colors": "^0.72.0", "@react-native/virtualized-lists": "^0.72.8", "abort-controller": "^3.0.0", "anser": "^1.4.9", "base64-js": "^1.1.2", "deprecated-react-native-prop-types": "4.1.0", "event-target-shim": "^5.0.1", "flow-enums-runtime": "^0.0.5", "invariant": "^2.2.4", "jest-environment-node": "^29.2.1", "jsc-android": "^250231.0.0", "memoize-one": "^5.0.0", "metro-runtime": "0.76.8", "metro-source-map": "0.76.8", "mkdirp": "^0.5.1", "nullthrows": "^1.1.1", "pretty-format": "^26.5.2", "promise": "^8.3.0", "react-devtools-core": "^4.27.2", "react-refresh": "^0.4.0", "react-shallow-renderer": "^16.15.0", "regenerator-runtime": "^0.13.2", "scheduler": "0.24.0-canary-efb381bbf-20230505", "stacktrace-parser": "^0.1.10", "use-sync-external-store": "^1.0.0", "whatwg-fetch": "^3.0.0", "ws": "^6.2.2", "yargs": "^17.6.2" }, "peerDependencies": { "react": "18.2.0" }, "bin": { "react-native": "cli.js" } }, "sha512-oIewslu5DBwOmo7x5rdzZlZXCqDIna0R4dUwVpfmVteORYLr4yaZo5wQnMeR+H7x54GaMhmgeqp0ZpULtulJFg=="],
14011401

1402-
"react-native-update": ["react-native-update@10.34.9", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-Bk9Wr6R3XTz4OwKnmcxm4S1heuZMFvdW+544Kcc5KMN/D8JHrf656yK35TYTNhRJPjq6oEsGfLDxgbQWSPtbIg=="],
1402+
"react-native-update": ["react-native-update@10.35.0", "", { "dependencies": { "nanoid": "^3.3.3", "react-native-url-polyfill": "^2.0.0" }, "peerDependencies": { "react": ">=16.8.0", "react-native": ">=0.59.0" } }, "sha512-jTFtTAmOec05Gf06ununz+bLFkLC7bu7GV2y5/VjEx3XDhk+/ohvpefIFYuaDub23+0Tbq85aIg9WlDa72tReQ=="],
14031403

14041404
"react-native-url-polyfill": ["[email protected]", "", { "dependencies": { "whatwg-url-without-unicode": "8.0.0-3" }, "peerDependencies": { "react-native": "*" } }, "sha512-My330Do7/DvKnEvwQc0WdcBnFPploYKp9CYlefDXzIdEaA+PAhDYllkvGeEroEzvc4Kzzj2O4yVdz8v6fjRvhA=="],
14051405

Example/harmony_use_pushy/harmony/build-profile.json5

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,9 @@
1010
buildOption: {
1111
strictMode: {
1212
caseSensitiveCheck: true,
13-
useNormalizedOHMUrl: true,
13+
useNormalizedOHMUrl: true
1414
},
15+
"nativeCompiler": "BiSheng"
1516
},
1617
},
1718
],

Example/harmony_use_pushy/harmony/entry/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
author: '',
77
license: '',
88
dependencies: {
9-
'@rnoh/react-native-openharmony': '0.72.38',
9+
'@rnoh/react-native-openharmony': '0.72.96',
1010
pushy: 'file:../../node_modules/react-native-update/harmony/pushy',
1111
},
1212
}

Example/harmony_use_pushy/harmony/entry/src/main/ets/pages/Index.ets

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@ struct Index {
5454
enableCAPIArchitecture: true,
5555
arkTsComponentNames: arkTsComponentNames,
5656
},
57-
initialProps: { "foo": "bar" } as Record<string, string>,
5857
appKey: "harmony_use_pushy",
5958
wrappedCustomRNComponentBuilder: wrappedCustomRNComponentBuilder,
6059
onSetUp: (rnInstance) => {

Example/harmony_use_pushy/harmony/oh-package.json5

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,6 @@
1313
},
1414
},
1515
overrides: {
16-
'@rnoh/react-native-openharmony': '0.72.38',
16+
'@rnoh/react-native-openharmony': '0.72.96',
1717
},
1818
}

Example/harmony_use_pushy/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
"@react-native-oh/react-native-harmony": "^0.72.59",
1919
"react": "18.2.0",
2020
"react-native": "0.72.5",
21-
"react-native-update": "^10.34.9"
21+
"react-native-update": "^10.35.0"
2222
},
2323
"devDependencies": {
2424
"@babel/core": "^7.20.0",

harmony/pushy/oh-package-lock.json5

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

harmony/pushy/oh-package.json5

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
{
2-
"license": "MIT",
3-
"types": "",
4-
"devDependencies": {},
5-
"name": "pushy",
6-
"description": "",
7-
"main": "index.ets",
8-
"version": "3.1.0-0.0.7",
9-
"dependencies": {
10-
"@rnoh/react-native-openharmony":"^0.72.38"
2+
license: 'MIT',
3+
types: '',
4+
devDependencies: {},
5+
name: 'pushy',
6+
description: '',
7+
main: 'index.ets',
8+
version: '10.35.1',
9+
dependencies: {
10+
'@rnoh/react-native-openharmony': '^0.72.96',
1111
},
12-
"modelVersion": "5.0.0"
12+
modelVersion: '5.0.0',
1313
}

harmony/pushy/src/main/ets/PushyFileJSBundleProvider.ets

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,18 @@ export class PushyFileJSBundleProvider extends JSBundleProvider {
2323
}
2424

2525
async getBundle(): Promise<FileJSBundle> {
26+
if (!this.path) {
27+
throw new JSBundleProviderError({
28+
whatHappened: 'No pushy bundle found. using default bundle',
29+
})
30+
}
2631
try {
2732
const status = await fs.access(this.path, fs.OpenMode.READ_ONLY);
2833
if (status) {
2934
return {
3035
filePath: this.path
3136
}
3237
}
33-
throw new Error('Update bundle not found');
3438
} catch (error) {
3539
throw new JSBundleProviderError({
3640
whatHappened: `Couldn't load JSBundle from ${this.path}`,

harmony/pushy/src/main/ets/UpdateContext.ts

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -189,18 +189,11 @@ export class UpdateContext {
189189
}
190190
}
191191

192-
public static getBundleUrl(
193-
context: common.UIAbilityContext,
194-
defaultAssetsUrl?: string,
195-
) {
196-
return new UpdateContext(context).getBundleUrl(defaultAssetsUrl);
197-
}
198-
199-
public getBundleUrl(defaultAssetsUrl?: string) {
192+
public getBundleUrl() {
200193
UpdateContext.isUsingBundleUrl = true;
201194
const currentVersion = this.getCurrentVersion();
202195
if (!currentVersion) {
203-
return defaultAssetsUrl;
196+
return '';
204197
}
205198
if (!this.isFirstTime()) {
206199
if (!this.preferences.getSync('firstTimeOk', true)) {
@@ -222,7 +215,7 @@ export class UpdateContext {
222215
version = this.rollBack();
223216
}
224217
}
225-
return defaultAssetsUrl;
218+
return '';
226219
}
227220

228221
getPackageVersion(): string {

0 commit comments

Comments
 (0)