mixpanel-react-native 1.3.5 → 1.3.6
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/.github/workflows/release.yml +4 -4
- package/CHANGELOG.md +34 -0
- package/MixpanelReactNative.podspec +1 -1
- package/Samples/ContextAPIMixpanel/yarn.lock +1 -1
- package/Samples/MixpanelDemo/yarn.lock +1 -1
- package/Samples/SimpleMixpanel/App.js +1 -1
- package/Samples/SimpleMixpanel/yarn.lock +1464 -1405
- package/__tests__/index.test.js +1 -1
- package/android/src/main/java/com/mixpanel/reactnative/MixpanelReactNativeModule.java +3 -3
- package/docs/Mixpanel.html +1 -1
- package/docs/MixpanelGroup.html +1 -1
- package/docs/People.html +1 -1
- package/docs/index.html +1 -1
- package/docs/index.js.html +1 -1
- package/ios/MixpanelReactNative.swift +3 -3
- package/package.json +24 -25
- package/release.py +3 -3
package/__tests__/index.test.js
CHANGED
|
@@ -9,7 +9,7 @@ import { NativeModules } from 'react-native';
|
|
|
9
9
|
|
|
10
10
|
test(`it calls MixpanelReactNative initialize`, async () => {
|
|
11
11
|
const mixpanel = await Mixpanel.init("token");
|
|
12
|
-
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.3.
|
|
12
|
+
expect(NativeModules.MixpanelReactNative.initialize).toBeCalledWith("token", false, {"$lib_version": "1.3.6", "mp_lib": "react-native"});
|
|
13
13
|
});
|
|
14
14
|
|
|
15
15
|
test(`it calls MixpanelReactNative setServerURL`, async () => {
|
|
@@ -34,9 +34,9 @@ public class MixpanelReactNativeModule extends ReactContextBaseJavaModule {
|
|
|
34
34
|
|
|
35
35
|
@ReactMethod
|
|
36
36
|
public void initialize(String token, boolean optOutTrackingDefault, ReadableMap metadata, Promise promise) throws JSONException {
|
|
37
|
-
JSONObject
|
|
38
|
-
AutomaticProperties.setAutomaticProperties(
|
|
39
|
-
MixpanelAPI.getInstance(this.mReactContext, token, optOutTrackingDefault);
|
|
37
|
+
JSONObject mixpanelProperties = ReactNativeHelper.reactToJSON(metadata);
|
|
38
|
+
AutomaticProperties.setAutomaticProperties(mixpanelProperties);
|
|
39
|
+
MixpanelAPI.getInstance(this.mReactContext, token, optOutTrackingDefault, mixpanelProperties);
|
|
40
40
|
promise.resolve(null);
|
|
41
41
|
}
|
|
42
42
|
|
package/docs/Mixpanel.html
CHANGED
|
@@ -4014,7 +4014,7 @@ To clear all superProperties, use clearSuperProperties()
|
|
|
4014
4014
|
<br class="clear">
|
|
4015
4015
|
|
|
4016
4016
|
<footer>
|
|
4017
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on
|
|
4017
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jan 13 2022 14:18:25 GMT-0800 (Pacific Standard Time)
|
|
4018
4018
|
</footer>
|
|
4019
4019
|
|
|
4020
4020
|
<script> prettyPrint(); </script>
|
package/docs/MixpanelGroup.html
CHANGED
|
@@ -957,7 +957,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
957
957
|
<br class="clear">
|
|
958
958
|
|
|
959
959
|
<footer>
|
|
960
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on
|
|
960
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jan 13 2022 14:18:25 GMT-0800 (Pacific Standard Time)
|
|
961
961
|
</footer>
|
|
962
962
|
|
|
963
963
|
<script> prettyPrint(); </script>
|
package/docs/People.html
CHANGED
|
@@ -1625,7 +1625,7 @@ If the property exists and is not list-valued, the union will be ignored.
|
|
|
1625
1625
|
<br class="clear">
|
|
1626
1626
|
|
|
1627
1627
|
<footer>
|
|
1628
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on
|
|
1628
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jan 13 2022 14:18:25 GMT-0800 (Pacific Standard Time)
|
|
1629
1629
|
</footer>
|
|
1630
1630
|
|
|
1631
1631
|
<script> prettyPrint(); </script>
|
package/docs/index.html
CHANGED
|
@@ -175,7 +175,7 @@ Please refer to our <a href="https://mixpanel.com/legal/app-store-privacy-detai
|
|
|
175
175
|
<br class="clear">
|
|
176
176
|
|
|
177
177
|
<footer>
|
|
178
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on
|
|
178
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jan 13 2022 14:18:25 GMT-0800 (Pacific Standard Time)
|
|
179
179
|
</footer>
|
|
180
180
|
|
|
181
181
|
<script> prettyPrint(); </script>
|
package/docs/index.js.html
CHANGED
|
@@ -888,7 +888,7 @@ class ObjectHelper {
|
|
|
888
888
|
<br class="clear">
|
|
889
889
|
|
|
890
890
|
<footer>
|
|
891
|
-
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on
|
|
891
|
+
Documentation generated by <a href="https://github.com/jsdoc/jsdoc">JSDoc 3.6.6</a> on Thu Jan 13 2022 14:18:25 GMT-0800 (Pacific Standard Time)
|
|
892
892
|
</footer>
|
|
893
893
|
|
|
894
894
|
<script> prettyPrint(); </script>
|
|
@@ -18,9 +18,9 @@ open class MixpanelReactNative: NSObject {
|
|
|
18
18
|
resolver resolve: RCTPromiseResolveBlock,
|
|
19
19
|
rejecter reject: RCTPromiseRejectBlock) -> Void {
|
|
20
20
|
AutomaticProperties.setAutomaticProperties(properties)
|
|
21
|
-
Mixpanel.initialize(token: token, flushInterval: Constants.DEFAULT_FLUSH_INTERVAL,
|
|
22
|
-
|
|
23
|
-
|
|
21
|
+
Mixpanel.initialize(token: token, flushInterval: Constants.DEFAULT_FLUSH_INTERVAL,
|
|
22
|
+
instanceName: token, optOutTrackingByDefault: optOutTrackingByDefault,
|
|
23
|
+
superProperties: MixpanelTypeHandler.processProperties(properties: properties, includeLibInfo: true))
|
|
24
24
|
resolve(true)
|
|
25
25
|
}
|
|
26
26
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "mixpanel-react-native",
|
|
3
|
-
"version": "1.3.
|
|
3
|
+
"version": "1.3.6",
|
|
4
4
|
"description": "Official React Native Tracking Library for Mixpanel Analytics",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"scripts": {
|
|
@@ -31,31 +31,30 @@
|
|
|
31
31
|
"mp_lib": "react-native"
|
|
32
32
|
},
|
|
33
33
|
"devDependencies": {
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
"react-test-renderer": "16.13.1"
|
|
34
|
+
"@babel/core": "^7.12.3",
|
|
35
|
+
"@babel/runtime": "^7.12.1",
|
|
36
|
+
"@react-native-community/eslint-config": "^2.0.0",
|
|
37
|
+
"babel-jest": "^26.6.0",
|
|
38
|
+
"eslint": "^7.11.0",
|
|
39
|
+
"jest": "^26.6.0",
|
|
40
|
+
"metro-react-native-babel-preset": "^0.63.0",
|
|
41
|
+
"react-test-renderer": "16.13.1",
|
|
42
|
+
"react-native": "^0.63.3"
|
|
44
43
|
},
|
|
45
44
|
"jest": {
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
45
|
+
"modulePathIgnorePatterns": [
|
|
46
|
+
"<rootDir>/MixpanelDemo/"
|
|
47
|
+
],
|
|
48
|
+
"testMatch": [
|
|
49
|
+
"<rootDir>/__tests__/index.test.js"
|
|
50
|
+
],
|
|
51
|
+
"setupFiles": [
|
|
52
|
+
"<rootDir>/__tests__/jest_setup.js"
|
|
53
|
+
],
|
|
54
|
+
"verbose": true,
|
|
55
|
+
"preset": "react-native",
|
|
56
|
+
"transform": {
|
|
57
|
+
"^.+\\.js$": "<rootDir>/node_modules/react-native/jest/preprocessor.js"
|
|
58
|
+
}
|
|
60
59
|
}
|
|
61
60
|
}
|
package/release.py
CHANGED
|
@@ -11,9 +11,9 @@ args = parser.parse_args()
|
|
|
11
11
|
def bump_version():
|
|
12
12
|
replace_version('package.json', "\"version\": \"" + args.old + "\"", "\"version\": \"" + args.new + "\"")
|
|
13
13
|
replace_version('__tests__/index.test.js', "\"$lib_version\": \"" + args.old + "\"", "\"$lib_version\": \"" + args.new + "\"")
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
14
|
+
subprocess.call('cd Samples/MixpanelDemo;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
15
|
+
subprocess.call('cd Samples/SimpleMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
16
|
+
subprocess.call('cd Samples/ContextAPIMixpanel;yarn upgrade mixpanel-react-native --latest', shell=True)
|
|
17
17
|
subprocess.call('git add package.json', shell=True)
|
|
18
18
|
subprocess.call('git add __tests__/index.test.js', shell=True)
|
|
19
19
|
subprocess.call('git add Samples/MixpanelDemo/yarn.lock', shell=True)
|