Skip to content

Commit

Permalink
Merge branch 'main' into antonis/experimental-expo-sagp
Browse files Browse the repository at this point in the history
# Conflicts:
#	CHANGELOG.md
  • Loading branch information
antonis committed Feb 4, 2025
2 parents 2302390 + 153419c commit 56d4df1
Show file tree
Hide file tree
Showing 30 changed files with 263 additions and 324 deletions.
6 changes: 3 additions & 3 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ jobs:

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # [email protected].5
uses: github/codeql-action/init@dd746615b3b9d728a6a37ca2045b68ca76d4841a # [email protected].8
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -55,7 +55,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # [email protected].5
uses: github/codeql-action/autobuild@dd746615b3b9d728a6a37ca2045b68ca76d4841a # [email protected].8

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://docs.github.com/en/actions/reference/workflow-syntax-for-github-actions
Expand All @@ -66,4 +66,4 @@ jobs:
# make bootstrap
# make release
- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@f6091c0113d1dcf9b98e269ee48e8a7e51b7bdd4 # [email protected].5
uses: github/codeql-action/analyze@dd746615b3b9d728a6a37ca2045b68ca76d4841a # [email protected].8
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ jobs:
steps:
- name: Get auth token
id: token
uses: actions/create-github-app-token@c1a285145b9d317df6ced56c09f525b5c2b6f755 # v1.11.1
uses: actions/create-github-app-token@136412a57a7081aa63c935a2cc2918f76c34f514 # v1.11.2
with:
app-id: ${{ vars.SENTRY_RELEASE_BOT_CLIENT_ID }}
private-key: ${{ secrets.SENTRY_RELEASE_BOT_PRIVATE_KEY }}
Expand Down
23 changes: 19 additions & 4 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@

### Features

- Send Sentry react-native SDK version in the session replay event (#4450)
- Adds Sentry Android Gradle Plugin as an experimental Expo plugin feature ([#4440](https://github.com/getsentry/sentry-react-native/pull/4440))

To enable the plugin add the `enableAndroidGradlePlugin` in the `@sentry/react-native/expo` of the Expo application configuration.
Expand All @@ -29,6 +28,19 @@

To learn more about the available configuration options visit [the documentation](https://docs.sentry.io/platforms/react-native/manual-setup/expo/expo-sagp/).

### Dependencies

- Bump JavaScript SDK from v8.53.0 to v8.54.0 ([#4503](https://github.com/getsentry/sentry-react-native/pull/4503))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8540)
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.53.0...8.54.0)

## 6.6.0

### Features

- Send Sentry react-native SDK version in the session replay event (#4450)
- Send Sentry React Native SDK version in the Session Replay Events on iOS ([#4450](https://github.com/getsentry/sentry-react-native/pull/4450))

### Fixes

- Add mechanism field to unhandled rejection errors ([#4457](https://github.com/getsentry/sentry-react-native/pull/4457))
Expand All @@ -49,12 +61,15 @@
- Bump CLI from v2.39.1 to v2.41.1 ([#4412](https://github.com/getsentry/sentry-react-native/pull/4412), [#4468](https://github.com/getsentry/sentry-react-native/pull/4468), [#4473](https://github.com/getsentry/sentry-react-native/pull/4473))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2411)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.39.1...2.41.1)
- Bump JavaScript SDK from v8.47.0 to v8.52.0 ([#4421](https://github.com/getsentry/sentry-react-native/pull/4421), [#4449](https://github.com/getsentry/sentry-react-native/pull/4449), [#4453](https://github.com/getsentry/sentry-react-native/pull/4453), [#4480](https://github.com/getsentry/sentry-react-native/pull/4480), [#4491](https://github.com/getsentry/sentry-react-native/pull/4491))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8520)
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.47.0...8.52.0)
- Bump JavaScript SDK from v8.47.0 to v8.53.0 ([#4421](https://github.com/getsentry/sentry-react-native/pull/4421), [#4449](https://github.com/getsentry/sentry-react-native/pull/4449), [#4453](https://github.com/getsentry/sentry-react-native/pull/4453), [#4480](https://github.com/getsentry/sentry-react-native/pull/4480), [#4491](https://github.com/getsentry/sentry-react-native/pull/4491), [#4496](https://github.com/getsentry/sentry-react-native/pull/4496), [#4497](https://github.com/getsentry/sentry-react-native/pull/4497))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8530)
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.47.0...8.53.0)
- Bump Android SDK from v7.20.0 to v7.20.1 ([#4467](https://github.com/getsentry/sentry-react-native/pull/4467))
- [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#7201)
- [diff](https://github.com/getsentry/sentry-java/compare/7.20.0...7.20.1)
- Bump Cocoa SDK from v8.43.0 to v8.44.0 ([#4495](https://github.com/getsentry/sentry-react-native/pull/4495))
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8440)
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.43.0...8.44.0)

## 6.5.0

Expand Down
6 changes: 3 additions & 3 deletions dev-packages/e2e-tests/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "sentry-react-native-e2e-tests",
"version": "6.5.0",
"version": "6.6.0",
"private": true,
"description": "Sentry React Native End to End Tests Library",
"main": "dist/index.js",
Expand All @@ -13,8 +13,8 @@
"devDependencies": {
"@babel/preset-env": "^7.25.3",
"@babel/preset-typescript": "^7.18.6",
"@sentry/core": "8.52.0",
"@sentry/react-native": "6.5.0",
"@sentry/core": "8.54.0",
"@sentry/react-native": "6.6.0",
"@types/node": "^20.9.3",
"@types/react": "^18.2.64",
"appium": "2.4.1",
Expand Down
2 changes: 1 addition & 1 deletion dev-packages/type-check/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "sentry-react-native-type-check",
"private": true,
"version": "6.5.0",
"version": "6.6.0",
"scripts": {
"type-check": "./run-type-check.sh"
}
Expand Down
1 change: 1 addition & 0 deletions dev-packages/utils/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
module.exports = {};
62 changes: 62 additions & 0 deletions dev-packages/utils/metro.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
const path = require('path');
const exclusionList = require('metro-config/src/defaults/exclusionList');

/**
* Packages used by the sample apps
*/
const getMonorepoPackages = monorepoRoot => {
return {
'@sentry/react-native': path.resolve(monorepoRoot, 'packages/core'),
};
};

/**
* Block given packages present in the monorepo packages to avoid conflicts with the sample apps
*/
const getBlockList = (monorepoPackages, excludedPackages) => {
return Object.values(monorepoPackages)
.map(p => excludedPackages.map(e => new RegExp(`${p}/node_modules/${e}/.*`)))
.flat();
};

const withMonorepo = config => {
const projectRoot = config.projectRoot;
if (!projectRoot) {
throw new Error('projectRoot is required');
}

const monorepoRoot = path.resolve(projectRoot, '../..');
const monorepoPackages = getMonorepoPackages(monorepoRoot);

config.resolver = config.resolver || {};

const blockList = [
...((Array.isArray(config.resolver.blockList) && config.resolver.blockList) ||
(!!config.resolver.blockList && [config.resolver.blockList]) ||
[]),
...getBlockList(monorepoPackages, ['react-native', 'react']),
new RegExp('.*\\android\\.*'), // Required for Windows in order to run the Sample.
];
config.resolver.blockList = exclusionList(blockList);

config.watchFolders = [...(config.watchFolders || []), projectRoot, ...Object.values(monorepoPackages)];

config.resolver.extraNodeModules = {
...config.resolver.extraNodeModules,
...monorepoPackages,
'react-native': path.resolve(projectRoot, 'node_modules/react-native'),
react: path.resolve(projectRoot, 'node_modules/react'),
};

config.resolver.nodeModulesPaths = [
...(config.resolver.nodeModulesPaths || []),
path.resolve(projectRoot, 'node_modules'),
...Object.values(monorepoPackages).map(p => path.resolve(p, 'node_modules')),
];

return config;
};

module.exports = {
withMonorepo,
};
11 changes: 11 additions & 0 deletions dev-packages/utils/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
{
"name": "sentry-react-native-samples-utils",
"version": "6.6.0",
"description": "Internal Samples Utils",
"main": "index.js",
"license": "MIT",
"private": true,
"dependencies": {
"metro-config": "^0.81.0"
}
}
2 changes: 1 addition & 1 deletion lerna.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "node_modules/lerna/schemas/lerna-schema.json",
"version": "6.5.0",
"version": "6.6.0",
"packages": [
"packages/*",
"dev-packages/*",
Expand Down
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"packages/core",
"dev-packages/e2e-tests",
"dev-packages/type-check",
"dev-packages/utils",
"samples/react-native",
"samples/react-native-macos",
"samples/expo",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/RNSentry.podspec
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@ Pod::Spec.new do |s|

s.compiler_flags = other_cflags

s.dependency 'Sentry/HybridSDK', '8.43.0'
s.dependency 'Sentry/HybridSDK', '8.44.0'

if defined? install_modules_dependencies
# Default React Native dependencies for 0.71 and above (new and legacy architecture)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

class RNSentryVersion {
static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.5.0";
static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "6.6.0";
static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";
Expand Down
2 changes: 1 addition & 1 deletion packages/core/ios/RNSentryVersion.m
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,4 @@
NSString *const NATIVE_SDK_NAME = @"sentry.cocoa.react-native";
NSString *const REACT_NATIVE_SDK_NAME = @"sentry.javascript.react-native";
NSString *const REACT_NATIVE_SDK_PACKAGE_NAME = @"npm:@sentry/react-native";
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"6.5.0";
NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION = @"6.6.0";
20 changes: 10 additions & 10 deletions packages/core/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
"name": "@sentry/react-native",
"homepage": "https://github.com/getsentry/sentry-react-native",
"repository": "https://github.com/getsentry/sentry-react-native",
"version": "6.5.0",
"version": "6.6.0",
"description": "Official Sentry SDK for react-native",
"typings": "dist/js/index.d.ts",
"types": "dist/js/index.d.ts",
Expand Down Expand Up @@ -66,22 +66,22 @@
},
"dependencies": {
"@sentry/babel-plugin-component-annotate": "2.20.1",
"@sentry/browser": "8.52.0",
"@sentry/browser": "8.54.0",
"@sentry/cli": "2.41.1",
"@sentry/core": "8.52.0",
"@sentry/react": "8.52.0",
"@sentry/types": "8.52.0",
"@sentry/utils": "8.52.0"
"@sentry/core": "8.54.0",
"@sentry/react": "8.54.0",
"@sentry/types": "8.54.0",
"@sentry/utils": "8.54.0"
},
"devDependencies": {
"@babel/core": "^7.25.2",
"@expo/metro-config": "0.19.5",
"@mswjs/interceptors": "^0.25.15",
"@react-native/babel-preset": "0.76.3",
"@sentry-internal/eslint-config-sdk": "8.52.0",
"@sentry-internal/eslint-plugin-sdk": "8.52.0",
"@sentry-internal/typescript": "8.52.0",
"@sentry/wizard": "3.39.0",
"@sentry-internal/eslint-config-sdk": "8.54.0",
"@sentry-internal/eslint-plugin-sdk": "8.54.0",
"@sentry-internal/typescript": "8.54.0",
"@sentry/wizard": "3.40.0",
"@testing-library/react-native": "^12.7.2",
"@types/jest": "^29.5.3",
"@types/node": "^20.9.3",
Expand Down
2 changes: 1 addition & 1 deletion packages/core/src/js/version.ts
Original file line number Diff line number Diff line change
@@ -1,3 +1,3 @@
export const SDK_PACKAGE_NAME = 'npm:@sentry/react-native';
export const SDK_NAME = 'sentry.javascript.react-native';
export const SDK_VERSION = '6.5.0';
export const SDK_VERSION = '6.6.0';
2 changes: 1 addition & 1 deletion performance-tests/TestAppPlain/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "TestAppPlain",
"version": "6.5.0",
"version": "6.6.0",
"private": true,
"scripts": {
"android": "react-native run-android",
Expand Down
37 changes: 3 additions & 34 deletions performance-tests/TestAppSentry/metro.config.js
Original file line number Diff line number Diff line change
@@ -1,23 +1,12 @@
const path = require('path');
const exclusionList = require('metro-config/src/defaults/exclusionList');

const projectRoot = __dirname;
const monorepoRoot = path.resolve(projectRoot, '../..');

// Only list the packages within your monorepo that your app uses. No need to add anything else.
// If your monorepo tooling can give you the list of monorepo workspaces linked
// in your app workspace, you can automate this list instead of hardcoding them.
const monorepoPackages = {
'@sentry/react-native': path.resolve(monorepoRoot, 'packages/core'),
};
const { withMonorepo } = require('sentry-react-native-samples-utils/metro');

/**
* Metro configuration for React Native
* https://github.com/facebook/react-native
*
* @format
*/
module.exports = {
module.exports = withMonorepo({
transformer: {
getTransformOptions: async () => ({
transform: {
Expand All @@ -27,24 +16,4 @@ module.exports = {
}),
},
projectRoot: __dirname,
// 1. Watch the local app directory, and only the shared packages (limiting the scope and speeding it up)
// Note how we change this from `monorepoRoot` to `projectRoot`. This is part of the optimization!
watchFolders: [projectRoot, ...Object.values(monorepoPackages)],
resolver: {
blockList: exclusionList([
...Object.values(monorepoPackages).map(p => new RegExp(`${p}/node_modules/react-native/.*`)),
]),
// Add the monorepo workspaces as `extraNodeModules` to Metro.
// If your monorepo tooling creates workspace symlinks in the `node_modules` directory,
// you can either add symlink support to Metro or set the `extraNodeModules` to avoid the symlinks.
// See: https://metrobundler.dev/docs/configuration/#extranodemodules
extraNodeModules: {
...monorepoPackages,
'react-native': path.resolve(projectRoot, 'node_modules/react-native'),
},
nodeModulesPaths: [
path.resolve(projectRoot, 'node_modules'),
...Object.values(monorepoPackages).map(p => path.resolve(p, 'node_modules')),
],
},
};
});
7 changes: 4 additions & 3 deletions performance-tests/TestAppSentry/package.json
Original file line number Diff line number Diff line change
@@ -1,21 +1,22 @@
{
"name": "TestAppSentry",
"version": "6.5.0",
"version": "6.6.0",
"private": true,
"scripts": {
"android": "react-native run-android",
"ios": "react-native run-ios",
"start": "react-native start"
},
"dependencies": {
"@sentry/react-native": "6.5.0",
"@sentry/react-native": "6.6.0",
"react": "18.1.0",
"react-native": "0.70.15"
},
"devDependencies": {
"@babel/core": "^7.12.9",
"@babel/runtime": "^7.12.5",
"metro-react-native-babel-preset": "^0.72.3"
"metro-react-native-babel-preset": "^0.72.3",
"sentry-react-native-samples-utils": "workspace:^"
},
"jest": {
"preset": "react-native"
Expand Down
2 changes: 1 addition & 1 deletion performance-tests/metrics-ios.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,4 +11,4 @@ startupTimeTest:

binarySizeTest:
diffMin: 600 KiB
diffMax: 1100 KiB
diffMax: 1200 KiB
6 changes: 3 additions & 3 deletions samples/expo/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
"slug": "sentry-react-native-expo-sample",
"jsEngine": "hermes",
"scheme": "sentry-expo-sample",
"version": "6.5.0",
"version": "6.6.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
"userInterfaceStyle": "light",
Expand All @@ -19,15 +19,15 @@
"ios": {
"supportsTablet": true,
"bundleIdentifier": "io.sentry.expo.sample",
"buildNumber": "35"
"buildNumber": "36"
},
"android": {
"adaptiveIcon": {
"foregroundImage": "./assets/adaptive-icon.png",
"backgroundColor": "#ffffff"
},
"package": "io.sentry.expo.sample",
"versionCode": 35
"versionCode": 36
},
"web": {
"bundler": "metro",
Expand Down
Loading

0 comments on commit 56d4df1

Please sign in to comment.