react-native-update 10.37.2 → 10.37.3

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.
@@ -23,7 +23,7 @@ export function reactNativeUpdatePlugin() {
23
23
  }
24
24
 
25
25
  const metaContent = {
26
- pushy_build_time: Date.now(),
26
+ pushy_build_time: String(Date.now()),
27
27
  versionName,
28
28
  };
29
29
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.37.2",
3
+ "version": "10.37.3",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {
package/src/provider.tsx CHANGED
@@ -197,7 +197,9 @@ export const UpdateProvider = ({
197
197
  }
198
198
  log(`${info.name} in ${rollout}% rollout, continue`);
199
199
  }
200
- info.description = info.description ?? '';
200
+ if (info.update) {
201
+ info.description = info.description ?? '';
202
+ }
201
203
  updateInfoRef.current = info;
202
204
  setUpdateInfo(info);
203
205
  if (info.expired) {
@@ -250,7 +252,7 @@ export const UpdateProvider = ({
250
252
  client.t('alert_title'),
251
253
  client.t('alert_new_version_found', {
252
254
  name: info.name!,
253
- description: info.description,
255
+ description: info.description!,
254
256
  }),
255
257
  [
256
258
  { text: client.t('alert_cancel'), style: 'cancel' },
package/src/type.ts CHANGED
@@ -98,10 +98,10 @@ export interface ClientOptions {
98
98
  dismissErrorAfter?: number;
99
99
  debug?: boolean;
100
100
  throwError?: boolean;
101
- beforeCheckUpdate?: () => Promise<boolean>;
102
- beforeDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
103
- afterDownloadUpdate?: (info: CheckResult) => Promise<boolean>;
104
- onPackageExpired?: (info: CheckResult) => Promise<boolean>;
101
+ beforeCheckUpdate?: () => Promise<boolean> | boolean;
102
+ beforeDownloadUpdate?: (info: CheckResult) => Promise<boolean> | boolean;
103
+ afterDownloadUpdate?: (info: CheckResult) => Promise<boolean> | boolean;
104
+ onPackageExpired?: (info: CheckResult) => Promise<boolean> | boolean;
105
105
  overridePackageVersion?: string;
106
106
  }
107
107