@datadog/mobile-react-native 2.12.3 → 2.12.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.
@@ -7,4 +7,4 @@
7
7
  package com.datadog.reactnative
8
8
 
9
9
  // This is automatically updated by the update-version.sh script
10
- internal const val SDK_VERSION = "2.12.3"
10
+ internal const val SDK_VERSION = "2.12.4"
@@ -6,8 +6,17 @@
6
6
 
7
7
  import org.apache.tools.ant.taskdefs.condition.Os
8
8
 
9
- afterEvaluate {
9
+ interface InjectedExecOps {
10
+ @Inject //@javax.inject.Inject
11
+ ExecOperations getExecOps()
12
+ }
10
13
 
14
+ def isDryRun = (
15
+ System.getenv("DATADOG_SOURCEMAPS_DRY_RUN")?.toBoolean() ?:
16
+ (project.hasProperty("datadogSourcemapsDryRun") && project.property("datadogSourcemapsDryRun") == "true")
17
+ )
18
+
19
+ afterEvaluate {
11
20
  def androidExtension = extensions.findByName("android")
12
21
 
13
22
  if (androidExtension == null || android.applicationVariants == null) {
@@ -93,7 +102,13 @@ afterEvaluate {
93
102
  copyDebugId(packagerOutputSourceMapFile.absolutePath, jsOutputSourceMapFile.absolutePath, reactRoot)
94
103
  }
95
104
 
96
- runShellCommand(uploadSourcemap(jsBundleFile), reactRoot)
105
+ def uploadCommand = uploadSourcemap(jsBundleFile);
106
+ if (isDryRun) {
107
+ logger.lifecycle("Dry run mode enabled, not uploading sourcemaps to Datadog.")
108
+ uploadCommand += ["--dry-run"]
109
+ }
110
+
111
+ runShellCommand(uploadCommand, reactRoot)
97
112
  }
98
113
  }
99
114
 
@@ -294,9 +309,11 @@ private def getReactConfig(File buildDir, variant) {
294
309
  def targetPath = variant.name
295
310
  reactConfig['bundleTaskName'] = "createBundle${targetName}JsAndAssets"
296
311
  reactConfig['bundleFileResolver'] = getBundleFileResolver([
312
+ "$buildDir/generated/assets/react/${targetName.toLowerCase()}", // RN 0.82+
297
313
  "$buildDir/ASSETS/createBundle${targetName}JsAndAssets", // Android Gradle Plugin 7.3
298
314
  "$buildDir/generated/assets/createBundle${targetName}JsAndAssets" // Android Gradle Plugin 7.4 and up
299
315
  ] as String[], bundleAssetName)
316
+
300
317
  reactConfig['bundleAssetName'] = bundleAssetName
301
318
  reactConfig['targetPath'] = targetPath
302
319
  reactConfig['targetName'] = targetName
@@ -339,7 +356,8 @@ private def runShellCommand(
339
356
  def errorStream = new ByteArrayOutputStream()
340
357
 
341
358
  try {
342
- def result = exec {
359
+ def injected = project.objects.newInstance(InjectedExecOps)
360
+ def result = injected.execOps.exec {
343
361
  workingDir = workingDirectory
344
362
  standardOutput = outputStream
345
363
  errorOutput = errorStream
@@ -360,7 +378,7 @@ private def runShellCommand(
360
378
  def errorStreamContent = errorStream.toString("UTF-8")
361
379
  def standardStreamContent = outputStream.toString("UTF-8")
362
380
  logger.error("Exception raised during command execution," +
363
- " stderr=${errorStreamContent}, stdout=${standardStreamContent}")
381
+ " stderr=${errorStreamContent}, stdout=${standardStreamContent}, exception=${e}")
364
382
  throw e
365
383
  }
366
384
  }
@@ -7,4 +7,4 @@
7
7
  import Foundation
8
8
 
9
9
  // This is automatically updated by the update-version.sh script
10
- let SdkVersion = "2.12.3"
10
+ let SdkVersion = "2.12.4"
@@ -5,5 +5,5 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = void 0;
7
7
  // generated by genversion
8
- const version = exports.version = '2.12.3';
8
+ const version = exports.version = '2.12.4';
9
9
  //# sourceMappingURL=version.js.map
@@ -1,3 +1,3 @@
1
1
  // generated by genversion
2
- export const version = '2.12.3';
2
+ export const version = '2.12.4';
3
3
  //# sourceMappingURL=version.js.map
@@ -1,2 +1,2 @@
1
- export declare const version = "2.12.3";
1
+ export declare const version = "2.12.4";
2
2
  //# sourceMappingURL=version.d.ts.map
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@datadog/mobile-react-native",
3
- "version": "2.12.3",
3
+ "version": "2.12.4",
4
4
  "description": "A client-side React Native module to interact with Datadog",
5
5
  "keywords": [
6
6
  "datadog",
@@ -118,5 +118,5 @@
118
118
  "dependencies": {
119
119
  "big-integer": "^1.6.52"
120
120
  },
121
- "gitHead": "842123f32b952c593ae1339b50a328f94c391929"
121
+ "gitHead": "e75fa3f5cd464f3790c61a195f7ecb93681aed9f"
122
122
  }
package/src/version.ts CHANGED
@@ -1,2 +1,2 @@
1
1
  // generated by genversion
2
- export const version = '2.12.3';
2
+ export const version = '2.12.4';