@sentry/react-native 7.0.0-rc.2 → 7.0.1

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.
Files changed (43) hide show
  1. package/RNSentry.podspec +3 -1
  2. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +2 -5
  3. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  4. package/dist/js/client.d.ts.map +1 -1
  5. package/dist/js/client.js +6 -3
  6. package/dist/js/client.js.map +1 -1
  7. package/dist/js/integrations/default.js +4 -4
  8. package/dist/js/integrations/default.js.map +1 -1
  9. package/dist/js/options.d.ts +1 -1
  10. package/dist/js/options.d.ts.map +1 -1
  11. package/dist/js/options.js.map +1 -1
  12. package/dist/js/tools/utils.d.ts.map +1 -1
  13. package/dist/js/tools/utils.js +39 -10
  14. package/dist/js/tools/utils.js.map +1 -1
  15. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  16. package/dist/js/tools/vendor/metro/utils.js +28 -6
  17. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  18. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  19. package/dist/js/tracing/timetodisplay.js +1 -11
  20. package/dist/js/tracing/timetodisplay.js.map +1 -1
  21. package/dist/js/utils/environment.d.ts.map +1 -1
  22. package/dist/js/utils/environment.js +2 -1
  23. package/dist/js/utils/environment.js.map +1 -1
  24. package/dist/js/utils/worldwide.d.ts +1 -0
  25. package/dist/js/utils/worldwide.d.ts.map +1 -1
  26. package/dist/js/utils/worldwide.js.map +1 -1
  27. package/dist/js/version.d.ts +1 -1
  28. package/dist/js/version.d.ts.map +1 -1
  29. package/dist/js/version.js +1 -1
  30. package/dist/js/version.js.map +1 -1
  31. package/ios/RNSentry+fetchNativeStack.m +101 -0
  32. package/ios/RNSentry.h +5 -0
  33. package/ios/RNSentry.mm +23 -81
  34. package/ios/RNSentryVersion.m +1 -1
  35. package/package.json +15 -14
  36. package/plugin/build/withSentryAndroid.js +7 -7
  37. package/plugin/build/withSentryAndroidGradlePlugin.d.ts +3 -2
  38. package/plugin/build/withSentryAndroidGradlePlugin.js +11 -22
  39. package/scripts/expo-upload-sourcemaps.js +1 -1
  40. package/scripts/sentry_utils.rb +4 -0
  41. package/ts3.8/dist/js/options.d.ts +1 -1
  42. package/ts3.8/dist/js/utils/worldwide.d.ts +1 -0
  43. package/ts3.8/dist/js/version.d.ts +1 -1
@@ -3,7 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.withSentryAndroidGradlePlugin = exports.sentryAndroidGradlePluginVersion = void 0;
4
4
  const config_plugins_1 = require("@expo/config-plugins");
5
5
  const utils_1 = require("./utils");
6
- exports.sentryAndroidGradlePluginVersion = '5.8.0';
6
+ exports.sentryAndroidGradlePluginVersion = '5.9.0';
7
7
  /**
8
8
  * Adds the Sentry Android Gradle Plugin to the project.
9
9
  * https://docs.sentry.io/platforms/react-native/manual-setup/manual-setup/#enable-sentry-agp
@@ -11,32 +11,26 @@ exports.sentryAndroidGradlePluginVersion = '5.8.0';
11
11
  function withSentryAndroidGradlePlugin(config, { includeProguardMapping = true, dexguardEnabled = false, autoUploadProguardMapping = true, uploadNativeSymbols = true, autoUploadNativeSymbols = true, includeNativeSources = true, includeSourceContext = false, } = {}) {
12
12
  // Modify android/build.gradle
13
13
  const withSentryProjectBuildGradle = (config) => {
14
- return (0, config_plugins_1.withProjectBuildGradle)(config, (projectBuildGradle) => {
15
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
14
+ return (0, config_plugins_1.withProjectBuildGradle)(config, projectBuildGradle => {
16
15
  if (!projectBuildGradle.modResults?.contents) {
17
16
  (0, utils_1.warnOnce)('android/build.gradle content is missing or undefined.');
18
- return config;
17
+ return projectBuildGradle;
19
18
  }
20
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
21
19
  if (projectBuildGradle.modResults.language !== 'groovy') {
22
20
  (0, utils_1.warnOnce)('Cannot configure Sentry in android/build.gradle because it is not in Groovy.');
23
- return config;
21
+ return projectBuildGradle;
24
22
  }
25
23
  const dependency = `classpath("io.sentry:sentry-android-gradle-plugin:${exports.sentryAndroidGradlePluginVersion}")`;
26
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
27
24
  if (projectBuildGradle.modResults.contents.includes(dependency)) {
28
25
  (0, utils_1.warnOnce)('sentry-android-gradle-plugin dependency in already in android/build.gradle.');
29
- return config;
26
+ return projectBuildGradle;
30
27
  }
31
28
  try {
32
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
33
29
  const updatedContents = projectBuildGradle.modResults.contents.replace(/dependencies\s*{/, `dependencies {\n ${dependency}`);
34
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
35
30
  if (updatedContents === projectBuildGradle.modResults.contents) {
36
31
  (0, utils_1.warnOnce)('Failed to inject the dependency. Could not find `dependencies` in build.gradle.');
37
32
  }
38
33
  else {
39
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
40
34
  projectBuildGradle.modResults.contents = updatedContents;
41
35
  }
42
36
  }
@@ -48,11 +42,10 @@ function withSentryAndroidGradlePlugin(config, { includeProguardMapping = true,
48
42
  };
49
43
  // Modify android/app/build.gradle
50
44
  const withSentryAppBuildGradle = (config) => {
51
- return (0, config_plugins_1.withAppBuildGradle)(config, (config) => {
52
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
53
- if (config.modResults.language !== 'groovy') {
45
+ return (0, config_plugins_1.withAppBuildGradle)(config, appBuildGradle => {
46
+ if (appBuildGradle.modResults.language !== 'groovy') {
54
47
  (0, utils_1.warnOnce)('Cannot configure Sentry in android/app/build.gradle because it is not in Groovy.');
55
- return config;
48
+ return appBuildGradle;
56
49
  }
57
50
  const sentryPlugin = 'apply plugin: "io.sentry.android.gradle"';
58
51
  const sentryConfig = `
@@ -71,19 +64,15 @@ function withSentryAndroidGradlePlugin(config, { includeProguardMapping = true,
71
64
  enabled = false
72
65
  }
73
66
  }`;
74
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
75
- let contents = config.modResults.contents;
76
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
67
+ let contents = appBuildGradle.modResults.contents;
77
68
  if (!contents.includes(sentryPlugin)) {
78
69
  contents = `${sentryPlugin}\n${contents}`;
79
70
  }
80
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
81
71
  if (!contents.includes('sentry {')) {
82
72
  contents = `${contents}\n${sentryConfig}`;
83
73
  }
84
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
85
- config.modResults.contents = contents;
86
- return config;
74
+ appBuildGradle.modResults.contents = contents;
75
+ return appBuildGradle;
87
76
  });
88
77
  };
89
78
  return withSentryAppBuildGradle(withSentryProjectBuildGradle(config));
@@ -234,7 +234,7 @@ if (numAssetsUploaded === totalAssets) {
234
234
  console.log('✅ Uploaded bundles and sourcemaps to Sentry successfully.');
235
235
  } else {
236
236
  console.warn(
237
- `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--dump-sourcemap` flag.' : ''
237
+ `⚠️ Uploaded ${numAssetsUploaded} of ${totalAssets} bundles and sourcemaps. ${numAssetsUploaded === 0 ? 'Ensure you are running `expo export` with the `--source-maps` flag.' : ''
238
238
  }`,
239
239
  );
240
240
  }
@@ -36,3 +36,7 @@ end
36
36
  def should_use_folly_flags(rn_version)
37
37
  return (rn_version[:major] == 0 && rn_version[:minor] < 80)
38
38
  end
39
+
40
+ def is_new_hermes_runtime(rn_version)
41
+ return (rn_version[:major] >= 1 || (rn_version[:major] == 0 && rn_version[:minor] >= 81))
42
+ end
@@ -6,7 +6,7 @@ import type { TouchEventBoundaryProps } from './touchevents';
6
6
  type ProfilerProps = React.ComponentProps<typeof Profiler>;
7
7
  type BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];
8
8
  type BrowserExperiments = NonNullable<BrowserOptions['_experiments']>;
9
- type SharedExperimentsSubset = Pick<BrowserExperiments, 'enableLogs' | 'beforeSendLog'>;
9
+ type SharedExperimentsSubset = BrowserExperiments;
10
10
  export interface BaseReactNativeOptions {
11
11
  /**
12
12
  * Enables native transport + device info + offline caching.
@@ -18,6 +18,7 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
18
18
  };
19
19
  Promise: unknown;
20
20
  __turboModuleProxy: unknown;
21
+ RN$Bridgeless: unknown;
21
22
  nativeFabricUIManager: unknown;
22
23
  ErrorUtils?: ErrorUtils;
23
24
  expo?: ExpoGlobalObject;
@@ -1,4 +1,4 @@
1
1
  export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
2
2
  export declare const SDK_NAME = "sentry.javascript.react-native";
3
- export declare const SDK_VERSION = "7.0.0-rc.2";
3
+ export declare const SDK_VERSION = "7.0.1";
4
4
  //# sourceMappingURL=version.d.ts.map