@dynatrace/react-native-plugin 2.291.2 → 2.293.2

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/README.md CHANGED
@@ -31,8 +31,8 @@ If you want to start using this plugin and are not a Dynatrace customer yet, hea
31
31
  ## Agent Versions
32
32
  This agent versions are configured in this plugin:
33
33
 
34
- * Android Agent: 8.291.1.1002
35
- * iOS Agent: 8.291.1.1004
34
+ * Android Agent: 8.293.1.1003
35
+ * iOS Agent: 8.293.1.1003
36
36
 
37
37
  ## Quick Setup
38
38
 
@@ -1414,6 +1414,11 @@ If you are struggling with a problem, submit a support ticket to Dynatrace (supp
1414
1414
  <br/><br/>
1415
1415
  ## Changelog
1416
1416
 
1417
+ 2.293.2
1418
+ * Update Android (8.293.1.1003) & iOS Agent (8.293.1.1003)
1419
+ * Preventing double instrumentation of touchables
1420
+ * Fixed instrumentation of Text component because of missing static access
1421
+
1417
1422
  2.291.2
1418
1423
  * Update Android (8.291.1.1002) & iOS Agent (8.291.1.1004)
1419
1424
  * Updated the way we report unhandled errors without a stacktrace
@@ -70,7 +70,7 @@ repositories {
70
70
  }
71
71
 
72
72
  dependencies {
73
- implementation 'com.dynatrace.agent:agent-android:8.291.1.1002'
73
+ implementation 'com.dynatrace.agent:agent-android:8.293.1.1003'
74
74
  implementation "com.facebook.react:react-native:${safeExtGet('reactNative', '+')}"
75
75
  }
76
76
 
@@ -1,3 +1,3 @@
1
1
  dependencies {
2
- classpath 'com.dynatrace.tools.android:gradle-plugin:8.291.1.1002'
2
+ classpath 'com.dynatrace.tools.android:gradle-plugin:8.293.1.1003'
3
3
  }
@@ -10,13 +10,18 @@ const TouchableHelper = (Dynatrace, Logger) => ({
10
10
  : props.onPress;
11
11
  const nameOfAction = this._findActionName(props, children);
12
12
  const isButton = this._isPropsButton(props);
13
- return (event) => {
13
+ const wrappedFunction = (event) => {
14
14
  if (nameOfAction == null) {
15
15
  Logger.logDebug('TouchableHelper: Skipping creation of action as no name was found!');
16
16
  if (origFunction != null) {
17
17
  return origFunction(event);
18
18
  }
19
19
  }
20
+ else if (origFunction != null && origFunction._dtWrapped !== undefined
21
+ && origFunction._dtWrapped === true) {
22
+ Logger.logDebug(`TouchableHelper: Skip wrapping of ${nameOfAction} onPress as it is already wrapped!`);
23
+ return origFunction(event);
24
+ }
20
25
  else if (!ConfigurationHandler_1.ConfigurationHandler.isConfigurationAvailable()) {
21
26
  Logger.logInfo('TouchableHelper: React Native plugin has not been started yet! Touch will not be reported!');
22
27
  if (origFunction != null) {
@@ -35,7 +40,7 @@ const TouchableHelper = (Dynatrace, Logger) => ({
35
40
  const returnValue = origFunction(event);
36
41
  if (_isPromise(returnValue)) {
37
42
  isSyncError = false;
38
- return returnValue.finally(() => {
43
+ return Promise.resolve(returnValue).finally(() => {
39
44
  action.leaveAction();
40
45
  });
41
46
  }
@@ -55,6 +60,8 @@ const TouchableHelper = (Dynatrace, Logger) => ({
55
60
  }
56
61
  }
57
62
  };
63
+ wrappedFunction._dtWrapped = true;
64
+ return wrappedFunction;
58
65
  },
59
66
  _findActionName(props, children) {
60
67
  if ((0, IDynatraceProperties_1.isDynatraceNaming)(props)) {
@@ -1,5 +1,5 @@
1
1
  "use strict";
2
- var _a, _b, _c;
2
+ var _a, _b, _c, _d;
3
3
  Object.defineProperty(exports, "__esModule", { value: true });
4
4
  exports.Pressable = exports.Text = exports.TouchableWithoutFeedback = exports.TouchableNativeFeedback = exports.TouchableHighlight = exports.TouchableOpacity = exports.Button = void 0;
5
5
  const ReactNative = require("react-native");
@@ -36,7 +36,14 @@ else {
36
36
  }
37
37
  exports.TouchableWithoutFeedback = React.forwardRef((props, ref) => React.createElement(ReactNative.TouchableWithoutFeedback, Object.assign({}, props, { ref: ref })));
38
38
  exports.TouchableWithoutFeedback._dtInfo = { type: Types_1.Types.TouchableWithoutFeedback };
39
- exports.Text = React.forwardRef((props, ref) => React.createElement(ReactNative.Text, Object.assign({}, props, { ref: ref })));
40
- exports.Text._dtInfo = { type: Types_1.Types.Text };
39
+ if (typeof ReactNative.Text === 'object') {
40
+ exports.Text = Object.assign({ _dtInfo: { type: Types_1.Types.Text } }, ReactNative.Text);
41
+ }
42
+ else {
43
+ exports.Text = (_d = class Text extends ReactNative.Text {
44
+ },
45
+ _d._dtInfo = { type: Types_1.Types.Text },
46
+ _d);
47
+ }
41
48
  exports.Pressable = React.forwardRef((props, ref) => React.createElement(ReactNative.Pressable, Object.assign({}, props, { ref: ref })));
42
49
  exports.Pressable._dtInfo = { type: Types_1.Types.Pressable };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@dynatrace/react-native-plugin",
3
- "version": "2.291.2",
3
+ "version": "2.293.2",
4
4
  "description": "This plugin gives you the ability to use the Dynatrace Mobile agent in your react native application.",
5
5
  "main": "index.js",
6
6
  "types": "typings/react-native-dynatrace.d.ts",
@@ -71,8 +71,8 @@
71
71
  "author": "Dynatrace",
72
72
  "license": "SEE LICENSE IN LICENSE.md",
73
73
  "dependencies": {
74
- "@babel/runtime": "^7.24.5",
75
- "jscodeshift": "^0.15.2",
74
+ "@babel/runtime": "^7.24.7",
75
+ "jscodeshift": "^0.16.1",
76
76
  "plist": "^3.1.0",
77
77
  "proxy-polyfill": "^0.3.2",
78
78
  "semver": "^7.6.2"
@@ -111,7 +111,7 @@ Pod::Spec.new do |s|
111
111
  #
112
112
 
113
113
  s.dependency "React"
114
- s.dependency 'Dynatrace', '~> 8.291.1.1004'
114
+ s.dependency 'Dynatrace', '~> 8.293.1.1003'
115
115
 
116
116
  # Allows for better compatibility for older and newer versions
117
117
  if defined?(install_modules_dependencies)