react-native-update 10.35.5 → 10.35.7

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.
@@ -304,7 +304,7 @@ RCT_EXPORT_METHOD(setNeedUpdate:(NSDictionary *)options
304
304
  if (hash.length) {
305
305
  NSUserDefaults *defaults = [NSUserDefaults standardUserDefaults];
306
306
  NSString *lastVersion = nil;
307
- NSDictionary *pushyInfo = [defaults objectForKey:keyPushyInfo]
307
+ NSDictionary *pushyInfo = [defaults objectForKey:keyPushyInfo];
308
308
  if (pushyInfo) {
309
309
  lastVersion = pushyInfo[paramCurrentVersion];
310
310
  }
@@ -679,4 +679,4 @@ RCT_EXPORT_METHOD(markSuccess:(RCTPromiseResolveBlock)resolve
679
679
  }
680
680
  #endif
681
681
 
682
- @end
682
+ @end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "10.35.5",
3
+ "version": "10.35.7",
4
4
  "description": "react-native hot update",
5
5
  "main": "src/index",
6
6
  "scripts": {
package/src/provider.tsx CHANGED
@@ -13,7 +13,12 @@ import {
13
13
  Linking,
14
14
  } from 'react-native';
15
15
  import { Pushy, Cresc, sharedState } from './client';
16
- import { currentVersion, packageVersion, getCurrentVersionInfo, currentVersionInfo } from './core';
16
+ import {
17
+ currentVersion,
18
+ packageVersion,
19
+ getCurrentVersionInfo,
20
+ currentVersionInfo,
21
+ } from './core';
17
22
  import {
18
23
  CheckResult,
19
24
  ProgressData,
@@ -165,7 +170,7 @@ export const UpdateProvider = ({
165
170
  lastChecking.current = now;
166
171
  let rootInfo: CheckResult | undefined;
167
172
  try {
168
- rootInfo = await client.checkUpdate(extra);
173
+ rootInfo = { ...(await client.checkUpdate(extra)) };
169
174
  } catch (e: any) {
170
175
  setLastError(e);
171
176
  alertError(client.t('error_update_check_failed'), e.message);
@@ -175,7 +180,9 @@ export const UpdateProvider = ({
175
180
  if (!rootInfo) {
176
181
  return;
177
182
  }
178
- const versions = [rootInfo.expVersion, rootInfo].filter(Boolean) as VersionInfo[];
183
+ const versions = [rootInfo.expVersion, rootInfo].filter(
184
+ Boolean,
185
+ ) as VersionInfo[];
179
186
  delete rootInfo.expVersion;
180
187
  for (const versionInfo of versions) {
181
188
  const info: CheckResult = {