react-native-update 10.25.4 → 10.26.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/context.ts +1 -1
- package/src/core.ts +3 -1
- package/src/provider.tsx +3 -2
package/package.json
CHANGED
package/src/context.ts
CHANGED
|
@@ -20,7 +20,7 @@ export const defaultContext = {
|
|
|
20
20
|
};
|
|
21
21
|
|
|
22
22
|
export const UpdateContext = createContext<{
|
|
23
|
-
checkUpdate: () => Promise<void>;
|
|
23
|
+
checkUpdate: () => Promise<void | CheckResult>;
|
|
24
24
|
switchVersion: () => Promise<void>;
|
|
25
25
|
switchVersionLater: () => Promise<void>;
|
|
26
26
|
markSuccess: () => void;
|
package/src/core.ts
CHANGED
|
@@ -4,7 +4,9 @@ const {
|
|
|
4
4
|
version: v,
|
|
5
5
|
} = require('react-native/Libraries/Core/ReactNativeVersion');
|
|
6
6
|
const RNVersion = `${v.major}.${v.minor}.${v.patch}`;
|
|
7
|
-
const isTurboModuleEnabled =
|
|
7
|
+
const isTurboModuleEnabled =
|
|
8
|
+
// https://github.com/facebook/react-native/pull/48362
|
|
9
|
+
(global as any).__turboModuleProxy || (global as any).RN$Bridgeless;
|
|
8
10
|
|
|
9
11
|
export const PushyModule =
|
|
10
12
|
Platform.OS === 'web'
|
package/src/provider.tsx
CHANGED
|
@@ -188,7 +188,7 @@ export const UpdateProvider = ({
|
|
|
188
188
|
} else {
|
|
189
189
|
Linking.openURL(downloadUrl);
|
|
190
190
|
}
|
|
191
|
-
return;
|
|
191
|
+
return info;
|
|
192
192
|
}
|
|
193
193
|
alertUpdate('提示', '您的应用版本已更新,点击更新下载安装新版本', [
|
|
194
194
|
{
|
|
@@ -209,7 +209,7 @@ export const UpdateProvider = ({
|
|
|
209
209
|
options.updateStrategy === 'silentAndLater'
|
|
210
210
|
) {
|
|
211
211
|
downloadUpdate(info);
|
|
212
|
-
return;
|
|
212
|
+
return info;
|
|
213
213
|
}
|
|
214
214
|
alertUpdate(
|
|
215
215
|
'提示',
|
|
@@ -226,6 +226,7 @@ export const UpdateProvider = ({
|
|
|
226
226
|
],
|
|
227
227
|
);
|
|
228
228
|
}
|
|
229
|
+
return info;
|
|
229
230
|
},
|
|
230
231
|
[
|
|
231
232
|
client,
|