Skip to content

Commit

Permalink
Merge branch 'main' into capture-app-start-errors
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Feb 5, 2025
2 parents a1cb36d + 153419c commit 95c36ef
Show file tree
Hide file tree
Showing 36 changed files with 331 additions and 375 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@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # [email protected].1
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@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # [email protected].1
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@b6a472f63d85b9c78a3ac5e89422239fc15e9b3c # [email protected].1
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
44 changes: 31 additions & 13 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,30 @@
## Unreleased

### Changes

- Load `optionsFile` into the JS bundle during Metro bundle process ([#4476](https://github.com/getsentry/sentry-react-native/pull/4476))
- Add experimental version of `startWithConfigureOptions` for Apple platforms ([#4444](https://github.com/getsentry/sentry-react-native/pull/4444))
- Add experimental version of `init` with optional `OptionsConfiguration<SentryAndroidOptions>` for Android ([#4451](https://github.com/getsentry/sentry-react-native/pull/4451))
- Add initialization using `sentry.options.json` for Apple platforms ([#4447](https://github.com/getsentry/sentry-react-native/pull/4447))
- Add initialization using `sentry.options.json` for Android ([#4451](https://github.com/getsentry/sentry-react-native/pull/4451))

### Internal

- Extract iOS native initialization to standalone structures ([#4442](https://github.com/getsentry/sentry-react-native/pull/4442))
- Extract Android native initialization to standalone structures ([#4445](https://github.com/getsentry/sentry-react-native/pull/4445))

### 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

- Load `optionsFile` into the JS bundle during Metro bundle process ([#4476](https://github.com/getsentry/sentry-react-native/pull/4476))
- Send Sentry React Native SDK version in the Session Replay Events on iOS ([#4450](https://github.com/getsentry/sentry-react-native/pull/4450))

### Fixes

Expand All @@ -22,28 +43,25 @@

- Rename `navigation.processing` span to more expressive `Navigation dispatch to screen A mounted/navigation cancelled` ([#4423](https://github.com/getsentry/sentry-react-native/pull/4423))
- Add RN SDK package to `sdk.packages` for Cocoa ([#4381](https://github.com/getsentry/sentry-react-native/pull/4381))
- Add experimental version of `startWithConfigureOptions` for Apple platforms ([#4444](https://github.com/getsentry/sentry-react-native/pull/4444))
- Add experimental version of `init` with optional `OptionsConfiguration<SentryAndroidOptions>` for Android ([#4451](https://github.com/getsentry/sentry-react-native/pull/4451))
- Add initialization using `sentry.options.json` for Apple platforms ([#4447](https://github.com/getsentry/sentry-react-native/pull/4447))
- Add initialization using `sentry.options.json` for Android ([#4451](https://github.com/getsentry/sentry-react-native/pull/4451))

### Internal

- Initialize `RNSentryTimeToDisplay` during native module `init` on iOS ([#4443](https://github.com/getsentry/sentry-react-native/pull/4443))
- Extract iOS native initialization to standalone structures ([#4442](https://github.com/getsentry/sentry-react-native/pull/4442))
- Extract Android native initialization to standalone structures ([#4445](https://github.com/getsentry/sentry-react-native/pull/4445))

### Dependencies

- Bump CLI from v2.39.1 to v2.41.0 ([#4412](https://github.com/getsentry/sentry-react-native/pull/4412), [#4468](https://github.com/getsentry/sentry-react-native/pull/4468))
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2410)
- [diff](https://github.com/getsentry/sentry-cli/compare/2.39.1...2.41.0)
- Bump JavaScript SDK from v8.47.0 to v8.50.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))
- [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#8500)
- [diff](https://github.com/getsentry/sentry-javascript/compare/8.47.0...8.50.0)
- 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.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
2 changes: 1 addition & 1 deletion LICENSE.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
The MIT License (MIT)

Copyright (c) 2017-2024 Sentry
Copyright (c) 2017 Sentry

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
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.50.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
3 changes: 2 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
"devDependencies": {
"@expo/swiftlint": "^0.57.1",
"@naturalcycles/ktlint": "^1.13.0",
"@sentry/cli": "2.41.0",
"@sentry/cli": "2.41.1",
"clang-format": "^1.8.0",
"downlevel-dts": "^0.11.0",
"google-java-format": "^1.4.0",
Expand All @@ -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 @@ -48,12 +48,13 @@ final class RNSentryReplayOptions: XCTestCase {
}

func assertAllDefaultReplayOptionsAreNotNil(replayOptions: [String: Any]) {
XCTAssertEqual(replayOptions.count, 5)
XCTAssertEqual(replayOptions.count, 6)
XCTAssertNotNil(replayOptions["sessionSampleRate"])
XCTAssertNotNil(replayOptions["errorSampleRate"])
XCTAssertNotNil(replayOptions["maskAllImages"])
XCTAssertNotNil(replayOptions["maskAllText"])
XCTAssertNotNil(replayOptions["maskedViewClasses"])
XCTAssertNotNil(replayOptions["sdkInfo"])
}

func testSessionSampleRate() {
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
3 changes: 3 additions & 0 deletions packages/core/ios/RNSentryReplay.mm
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import "RNSentryReplay.h"
#import "RNSentryReplayBreadcrumbConverterHelper.h"
#import "RNSentryVersion.h"
#import "React/RCTTextView.h"
#import "Replay/RNSentryReplayMask.h"
#import "Replay/RNSentryReplayUnmask.h"
Expand Down Expand Up @@ -27,6 +28,8 @@ + (void)updateOptions:(NSMutableDictionary *)options
@"maskAllImages" : replayOptions[@"maskAllImages"] ?: [NSNull null],
@"maskAllText" : replayOptions[@"maskAllText"] ?: [NSNull null],
@"maskedViewClasses" : [RNSentryReplay getReplayRNRedactClasses:replayOptions],
@"sdkInfo" :
@ { @"name" : REACT_NATIVE_SDK_NAME, @"version" : REACT_NATIVE_SDK_PACKAGE_VERSION }
}
forKey:@"sessionReplay"];
}
Expand Down
1 change: 1 addition & 0 deletions packages/core/ios/RNSentryVersion.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import <Foundation/Foundation.h>

extern NSString *const NATIVE_SDK_NAME;
extern NSString *const REACT_NATIVE_SDK_NAME;
extern NSString *const REACT_NATIVE_SDK_PACKAGE_NAME;
extern NSString *const REACT_NATIVE_SDK_PACKAGE_VERSION;
3 changes: 2 additions & 1 deletion packages/core/ios/RNSentryVersion.m
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
#import "RNSentryVersion.h"

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";
22 changes: 11 additions & 11 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.50.0",
"@sentry/cli": "2.41.0",
"@sentry/core": "8.50.0",
"@sentry/react": "8.50.0",
"@sentry/types": "8.50.0",
"@sentry/utils": "8.50.0"
"@sentry/browser": "8.54.0",
"@sentry/cli": "2.41.1",
"@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.50.0",
"@sentry-internal/eslint-plugin-sdk": "8.50.0",
"@sentry-internal/typescript": "8.50.0",
"@sentry/wizard": "3.38.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
Loading

0 comments on commit 95c36ef

Please sign in to comment.