@sentiance-react-native/legacy 6.0.0-beta.13 → 6.0.0-beta.16

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.js CHANGED
@@ -1,9 +1,11 @@
1
- import legacy from './legacy';
2
- import core from '@sentiance-react-native/core';
3
- import crashDetection from '@sentiance-react-native/crash-detection';
1
+ const legacy = require('./legacy');
2
+ const core = require('@sentiance-react-native/core');
3
+ const crashDetection = require('@sentiance-react-native/crash-detection');
4
4
 
5
5
  var RNSentiance = {};
6
- RNSentiance.TransportMode = core.transportModes;
6
+ if (core) {
7
+ RNSentiance.TransportMode = core.transportModes;
8
+ }
7
9
 
8
10
  const {
9
11
  userLinkCallback,
@@ -122,4 +124,4 @@ RNSentiance.disableNativeInitialization = disableNativeInitialization;
122
124
  RNSentiance.addListener = addListener
123
125
  RNSentiance.removeListeners = removeListeners
124
126
 
125
- export default RNSentiance;
127
+ module.exports = RNSentiance;
@@ -1,23 +1,25 @@
1
- import {NativeModules, Platform} from 'react-native'
2
- import {varToString} from '@sentiance-react-native/core/lib/utils'
1
+ const {NativeModules, Platform} = require('react-native');
2
+ const {varToString} = require('@sentiance-react-native/core/lib/utils');
3
3
 
4
4
  const {RNSentiance, SentianceCore} = NativeModules;
5
5
 
6
- var legacyModule
6
+ let legacyModule = {};
7
7
  if (Platform.OS === 'ios') {
8
8
  if (!SentianceCore) {
9
9
  const nativeModuleName = varToString({SentianceCore});
10
10
  console.error(`Could not locate the native ${nativeModuleName} module.
11
11
  Make sure that your native code is properly linked, and that the module name you specified is correct.`);
12
+ } else {
13
+ legacyModule = SentianceCore
12
14
  }
13
- legacyModule = SentianceCore
14
15
  } else {
15
16
  if (!RNSentiance) {
16
17
  const nativeModuleName = varToString({RNSentiance});
17
18
  console.error(`Could not locate the native ${nativeModuleName} module.
18
19
  Make sure that your native code is properly linked, and that the module name you specified is correct.`);
20
+ } else {
21
+ legacyModule = RNSentiance
19
22
  }
20
- legacyModule = RNSentiance
21
23
  }
22
24
 
23
- export default legacyModule
25
+ module.exports = legacyModule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentiance-react-native/legacy",
3
- "version": "6.0.0-beta.13",
3
+ "version": "6.0.0-beta.16",
4
4
  "description": "React Native Sentiance - This module provides a legacy API.",
5
5
  "main": "lib/index.js",
6
6
  "typings": "lib/index.d.ts",
@@ -14,7 +14,7 @@
14
14
  "sentiance"
15
15
  ],
16
16
  "peerDependencies": {
17
- "@sentiance-react-native/crash-detection": "6.0.0-beta.13"
17
+ "@sentiance-react-native/crash-detection": "6.0.0-beta.16"
18
18
  },
19
19
  "author": "",
20
20
  "license": "",