Skip to content

Commit b5db66c

Browse files
authored
Merge branch 'reactnativecn:master' into master
2 parents 2e93541 + 43ed2f5 commit b5db66c

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

49 files changed

+1380
-1776
lines changed

.gitignore

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,3 +52,11 @@ Example/testHotUpdate/harmony
5252
Example/testHotUpdate/android/app/.cxx
5353
Example/harmony_use_pushy/libs
5454
**/mcp.json
55+
56+
57+
harmony/package
58+
**/oh_modules
59+
harmony/pushy/.preview
60+
Example/harmony_use_pushy/harmony/entry/src/main/resources/rawfile/meta.json
61+
**/.hvigor
62+
Example/harmony_use_pushy/harmony/entry/src/main/cpp/generated

.gitmodules

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,3 @@
44
[submodule "android/jni/HDiffPatch"]
55
path = android/jni/HDiffPatch
66
url = https://github.com/sisong/HDiffPatch.git
7-
[submodule "harmony/src/main/cpp/HDiffPatch"]
8-
path = harmony/src/main/cpp/HDiffPatch
9-
url = https://github.com/sisong/HDiffPatch.git
10-
[submodule "harmony/src/main/cpp/lzma"]
11-
path = harmony/src/main/cpp/lzma
12-
url = https://github.com/sisong/lzma.git

Example/expoUsePushy/app.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,8 @@
2020
"adaptiveIcon": {
2121
"foregroundImage": "./assets/adaptive-icon.png",
2222
"backgroundColor": "#ffffff"
23-
}
23+
},
24+
"package": "com.anonymous.expoUsePushy"
2425
},
2526
"web": {
2627
"favicon": "./assets/favicon.png"

Example/expoUsePushy/bun.lock

Lines changed: 645 additions & 432 deletions
Large diffs are not rendered by default.

Example/expoUsePushy/index.js

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1 @@
1-
import { registerRootComponent } from 'expo';
2-
3-
import App from './App';
4-
5-
// registerRootComponent calls AppRegistry.registerComponent('main', () => App);
6-
// It also ensures that whether you load the app in Expo Go or in a native build,
7-
// the environment is set up appropriately
8-
registerRootComponent(App);
1+
import 'expo-router/entry';

Example/expoUsePushy/package.json

Lines changed: 35 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,27 +1,50 @@
11
{
22
"name": "expousepushy",
3-
"version": "1.0.0",
43
"main": "index.js",
4+
"version": "1.0.0",
55
"scripts": {
66
"start": "expo start",
7+
"reset-project": "node ./scripts/reset-project.js",
78
"android": "expo run:android",
89
"ios": "expo run:ios",
9-
"web": "expo start --web"
10+
"web": "expo start --web",
11+
"lint": "expo lint"
1012
},
1113
"dependencies": {
12-
"@expo/metro-runtime": "~4.0.1",
13-
"expo": "~52.0.46",
14-
"expo-status-bar": "~2.0.1",
15-
"react": "18.3.1",
16-
"react-dom": "18.3.1",
17-
"react-native": "0.76.9",
18-
"react-native-update": "^10.30.3",
19-
"react-native-web": "~0.19.13"
14+
"@expo/vector-icons": "^14.1.0",
15+
"@react-navigation/bottom-tabs": "^7.3.10",
16+
"@react-navigation/elements": "^2.3.8",
17+
"@react-navigation/native": "^7.1.6",
18+
"expo": "~53.0.22",
19+
"expo-blur": "~14.1.5",
20+
"expo-constants": "~17.1.7",
21+
"expo-font": "~13.3.2",
22+
"expo-haptics": "~14.1.4",
23+
"expo-image": "~2.4.0",
24+
"expo-linking": "~7.1.7",
25+
"expo-router": "~5.1.5",
26+
"expo-splash-screen": "~0.30.10",
27+
"expo-status-bar": "~2.2.3",
28+
"expo-symbols": "~0.4.5",
29+
"expo-system-ui": "~5.0.11",
30+
"expo-web-browser": "~14.2.0",
31+
"react": "19.0.0",
32+
"react-dom": "19.0.0",
33+
"react-native": "0.79.6",
34+
"react-native-gesture-handler": "~2.24.0",
35+
"react-native-reanimated": "~3.17.4",
36+
"react-native-safe-area-context": "5.4.0",
37+
"react-native-screens": "~4.11.1",
38+
"react-native-update": "^10.34.4",
39+
"react-native-web": "~0.20.0",
40+
"react-native-webview": "13.13.5"
2041
},
2142
"devDependencies": {
2243
"@babel/core": "^7.25.2",
23-
"@types/react": "~18.3.12",
24-
"typescript": "^5.3.3"
44+
"@types/react": "~19.0.10",
45+
"typescript": "~5.8.3",
46+
"eslint": "^9.25.0",
47+
"eslint-config-expo": "~9.2.0"
2548
},
2649
"private": true
2750
}

Example/harmony_use_pushy/App.tsx

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
1-
/* eslint-disable react/no-unstable-nested-components */
21
/* eslint-disable react-native/no-inline-styles */
32
import React, {useState} from 'react';
43
import {StyleSheet, Text, View, TouchableOpacity, Image} from 'react-native';
54

65
import TestConsole from './TestConsole';
76

87
import _updateConfig from './update.json';
9-
import {PushyProvider, Pushy, usePushy} from 'react-native-update';
8+
import {UpdateProvider, Pushy, useUpdate} from 'react-native-update';
109
const {appKey} = _updateConfig.harmony;
1110

1211
function App() {
@@ -20,7 +19,7 @@ function App() {
2019
packageVersion,
2120
currentHash,
2221
progress: {received, total} = {},
23-
} = usePushy();
22+
} = useUpdate();
2423
const [useDefaultAlert, setUseDefaultAlert] = useState(false);
2524
const [showTestConsole, setShowTestConsole] = useState(false);
2625
const [showUpdateBanner, setShowUpdateBanner] = useState(false);
@@ -41,6 +40,7 @@ function App() {
4140
return (
4241
<View style={styles.container}>
4342
<Text style={styles.welcome}>欢迎使用Pushy热更新服务</Text>
43+
{/* <Image source={require('./gmail.png')} style={styles.image} /> */}
4444
{/* <Text style={styles.welcome}>😁hdiffFromAPP更新成功!!!</Text> */}
4545
{/* <Text style={styles.welcome}>😁hdiffFromPPk更新成功!!!</Text> */}
4646
<View style={{flexDirection: 'row'}}>
@@ -166,7 +166,7 @@ function App() {
166166
style={{marginRight: 20}}>
167167
<Text style={{color: '#2196F3'}}>下次再说</Text>
168168
</TouchableOpacity>
169-
<TouchableOpacity onPress={switchVersion}>
169+
<TouchableOpacity onPress={() => switchVersion()}>
170170
<Text style={{color: '#2196F3'}}>立即重启</Text>
171171
</TouchableOpacity>
172172
</View>
@@ -204,18 +204,22 @@ const styles = StyleSheet.create({
204204
color: '#333333',
205205
marginBottom: 5,
206206
},
207-
image: {},
207+
image: {
208+
width: 109,
209+
height: 40,
210+
},
208211
});
209212

210213
const pushyClient = new Pushy({
211214
appKey,
212215
debug: true,
216+
updateStrategy: null,
213217
});
214218

215219
export default function Root() {
216220
return (
217-
<PushyProvider client={pushyClient}>
221+
<UpdateProvider client={pushyClient}>
218222
<App />
219-
</PushyProvider>
223+
</UpdateProvider>
220224
);
221225
}

Example/harmony_use_pushy/Gemfile

Lines changed: 0 additions & 6 deletions
This file was deleted.

0 commit comments

Comments
 (0)