@bravemobile/react-native-code-push 9.0.0-beta.2 → 9.0.0-beta.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.
package/CodePush.js
CHANGED
|
@@ -131,7 +131,8 @@ async function checkForUpdate(deploymentKey = null, handleBinaryVersionMismatchC
|
|
|
131
131
|
return mapToRemotePackageMetadata(updateInfo, config.deploymentKey);
|
|
132
132
|
}
|
|
133
133
|
} catch (error) {
|
|
134
|
-
log(`An error has occurred at update checker
|
|
134
|
+
log(`An error has occurred at update checker :`);
|
|
135
|
+
console.error(error)
|
|
135
136
|
// update will not happen
|
|
136
137
|
return undefined;
|
|
137
138
|
}
|
|
@@ -631,6 +632,10 @@ function codePushify(options = {}) {
|
|
|
631
632
|
);
|
|
632
633
|
}
|
|
633
634
|
|
|
635
|
+
if (options.updateChecker && !options.releaseHistoryFetcher) {
|
|
636
|
+
throw new Error('If you want to use `updateChecker`, pass a no-op function to releaseHistoryFetcher option. (e.g. `releaseHistoryFetcher: async () => ({})`)');
|
|
637
|
+
}
|
|
638
|
+
|
|
634
639
|
sharedCodePushOptions.setReleaseHistoryFetcher(options.releaseHistoryFetcher);
|
|
635
640
|
sharedCodePushOptions.setUpdateChecker(options.updateChecker);
|
|
636
641
|
|
package/package.json
CHANGED
|
@@ -57,7 +57,14 @@ export interface CodePushOptions extends SyncOptions {
|
|
|
57
57
|
/**
|
|
58
58
|
* Specifies a function to get the release history.
|
|
59
59
|
*
|
|
60
|
-
*
|
|
60
|
+
* If you want to use `updateChecker`, pass no-op function like below.
|
|
61
|
+
* But it is deprecated and will be removed in the next major version.
|
|
62
|
+
*
|
|
63
|
+
* ```ts
|
|
64
|
+
* const codePushOptions: {
|
|
65
|
+
* releaseHistoryFetcher: async () => ({}), // This will not be called
|
|
66
|
+
* }
|
|
67
|
+
* ```
|
|
61
68
|
*/
|
|
62
69
|
releaseHistoryFetcher: (updateRequest: UpdateCheckRequest) => Promise<ReleaseHistoryInterface>;
|
|
63
70
|
/**
|