react-native-update 8.3.0 → 8.4.0

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/lib/index.web.js CHANGED
@@ -15,4 +15,4 @@ export const downloadAndInstallApk = noop;
15
15
  export const setCustomEndpoints = noop;
16
16
  export const getCurrentVersionInfo = noop;
17
17
  export const simpleUpdate = (app) => app;
18
- export const onEvents = noop;
18
+ export const onPushyEvents = noop;
package/lib/main.ts CHANGED
@@ -73,7 +73,7 @@ if (!uuid) {
73
73
  const noop = () => {};
74
74
  let reporter: UpdateEventsListener = noop;
75
75
 
76
- export function onEvents(customReporter: UpdateEventsListener) {
76
+ export function onPushyEvents(customReporter: UpdateEventsListener) {
77
77
  reporter = customReporter;
78
78
  if (isRolledBack) {
79
79
  report({
@@ -16,20 +16,20 @@ import {
16
16
  switchVersionLater,
17
17
  markSuccess,
18
18
  downloadAndInstallApk,
19
- onEvents,
19
+ onPushyEvents,
20
20
  } from './main';
21
21
  import { UpdateEventsListener } from './type';
22
22
 
23
23
  export function simpleUpdate(
24
24
  WrappedComponent: ComponentType,
25
- options: { appKey?: string; onEvents?: UpdateEventsListener } = {},
25
+ options: { appKey?: string; onPushyEvents?: UpdateEventsListener } = {},
26
26
  ) {
27
- const { appKey, onEvents: eventListeners } = options;
27
+ const { appKey, onPushyEvents: eventListeners } = options;
28
28
  if (!appKey) {
29
29
  throw new Error('appKey is required for simpleUpdate()');
30
30
  }
31
31
  if (typeof eventListeners === 'function') {
32
- onEvents(eventListeners);
32
+ onPushyEvents(eventListeners);
33
33
  }
34
34
  return __DEV__
35
35
  ? WrappedComponent
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-update",
3
- "version": "8.3.0",
3
+ "version": "8.4.0",
4
4
  "description": "react-native hot update",
5
5
  "main": "lib/index.ts",
6
6
  "scripts": {