@bravemobile/react-native-code-push 9.0.0-beta.2 → 9.0.0-beta.4

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 :`, error);
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
 
@@ -69,9 +69,9 @@ gradle.projectsEvaluated {
69
69
 
70
70
  def nodeModulesPath;
71
71
  if (project.hasProperty('nodeModulesPath')) {
72
- nodeModulesPath = "${project.nodeModulesPath}/react-native-code-push"
72
+ nodeModulesPath = "${project.nodeModulesPath}/@bravemobile/react-native-code-push"
73
73
  } else {
74
- nodeModulesPath = findNodeModulePath(projectDir, "react-native-code-push")
74
+ nodeModulesPath = findNodeModulePath(projectDir, "@bravemobile/react-native-code-push")
75
75
  }
76
76
 
77
77
  def targetName = variant.name.capitalize()
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@bravemobile/react-native-code-push",
3
- "version": "9.0.0-beta.2",
3
+ "version": "9.0.0-beta.4",
4
4
  "description": "React Native plugin for the CodePush service",
5
5
  "main": "CodePush.js",
6
6
  "typings": "typings/react-native-code-push.d.ts",
@@ -57,7 +57,14 @@ export interface CodePushOptions extends SyncOptions {
57
57
  /**
58
58
  * Specifies a function to get the release history.
59
59
  *
60
- * (If you want to use `updateChecker`, pass no-op function.)
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
  /**