Skip to content

Commit

Permalink
Merge branch 'expo' into kw-add-dynamic-default-integrations
Browse files Browse the repository at this point in the history
  • Loading branch information
krystofwoldrich committed Jan 9, 2024
2 parents e22570f + 6bd18dc commit ecde2d0
Show file tree
Hide file tree
Showing 79 changed files with 5,508 additions and 5,132 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/buildandtest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- uses: actions/cache@v3
id: cache
with:
Expand Down Expand Up @@ -86,7 +86,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- uses: actions/cache@v3
id: cache
with:
Expand Down Expand Up @@ -129,7 +129,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- uses: actions/cache@v3
id: cache
with:
Expand Down Expand Up @@ -205,7 +205,7 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- name: Cache Dependencies
uses: actions/cache@v3
id: cache
Expand Down
6 changes: 5 additions & 1 deletion .github/workflows/codegen.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,11 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- uses: actions/setup-java@v3
with:
java-version: '17'
distribution: "adopt"
- uses: actions/cache@v3
id: cache
with:
Expand Down
32 changes: 19 additions & 13 deletions .github/workflows/e2e.yml
Original file line number Diff line number Diff line change
Expand Up @@ -40,10 +40,10 @@ jobs:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- uses: actions/setup-java@v3
with:
java-version: "11"
java-version: '17'
distribution: "adopt"
- name: Install Global Dependencies
run: yarn global add react-native-cli @sentry/cli yalc
Expand All @@ -63,7 +63,7 @@ jobs:
run: yalc publish
- uses: actions/setup-node@v4
with:
node-version: 16
node-version: 18
- uses: actions/cache@v3
id: app-plain-cache
with:
Expand Down Expand Up @@ -148,7 +148,7 @@ jobs:
strategy:
fail-fast: false # keeps matrix running if one fails
matrix:
rn-version: ['0.65.3', '0.72.4']
rn-version: ['0.65.3', '0.73.0']
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['dev', 'production']
Expand Down Expand Up @@ -200,20 +200,21 @@ jobs:
echo "SENTRY_DIST=$SENTRY_DIST"
- uses: actions/setup-node@v4
if: ${{ matrix.rn-version == '0.65.3' }}
with:
node-version: 16

- uses: actions/setup-node@v4
if: ${{ matrix.rn-version != '0.65.3' }}
with:
node-version: 18

- uses: actions/setup-java@v3
if: ${{ matrix.rn-version == '0.65.3' }}
with:
java-version: '11'
distribution: 'adopt'

- uses: actions/setup-java@v3
if: ${{ matrix.rn-version != '0.65.3' }}
with:
java-version: '17'
distribution: 'adopt'

- name: Setup Global Tools
run: |
yarn global add yalc semver
Expand Down Expand Up @@ -252,6 +253,11 @@ jobs:
- name: Package SDK
run: yalc publish

- uses: actions/setup-node@v4
if: ${{ matrix.rn-version == '0.65.3' }}
with:
node-version: 16

- name: Download Plain RN ${{ matrix.rn-version }} App
working-directory: test/react-native/versions
run: git clone $RN_DIFF_REPOSITORY --branch release/${{ matrix.rn-version }} --single-branch ${{ matrix.rn-version }}
Expand Down Expand Up @@ -385,7 +391,7 @@ jobs:
strategy:
fail-fast: false # keeps matrix running if one fails
matrix:
rn-version: ['0.65.3', '0.72.4']
rn-version: ['0.65.3', '0.73.0']
rn-architecture: ['legacy', 'new']
platform: ['android', 'ios']
build-type: ['production']
Expand Down Expand Up @@ -427,7 +433,7 @@ jobs:
- uses: actions/setup-node@v4
if: ${{ matrix.rn-version == '0.65.3' }}
with:
node-version: 16
node-version: 18

- uses: actions/setup-node@v4
if: ${{ matrix.rn-version != '0.65.3' }}
Expand All @@ -436,7 +442,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: NPM cache E2E Tests Library
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/native-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Gradle cache
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/sample-application.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@ jobs:

- uses: actions/setup-java@v3
with:
java-version: '11'
java-version: '17'
distribution: 'adopt'

- name: Install Global Dependencies
Expand Down
20 changes: 20 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,30 @@

## Unreleased

This release is compatible with `expo@50.0.0-preview.6` and newer.

- `withSentryExpoSerializers` changes to `getSentryExpoConfig` ([#3501](https://github.com/getsentry/sentry-react-native/pull/3501))
- `getSentryExpoConfig` accepts the same parameters as `getDefaultConfig` from `expo/metro-config` and returns Metro configuration
- This also works for EAS Updates (and expo export). Debug ID is generated by `expo/metro-config` and used by Sentry.

```js
const { getSentryExpoConfig } = require("@sentry/react-native/metro");
const config = getSentryExpoConfig(config);
```

- Resolve Default Integrations based on current platform ([#3465](https://github.com/getsentry/sentry-react-native/pull/3465))
- Native Integrations are only added if Native Module is available
- Web Integrations only for React Native Web builds

- Includes fixes from version 5.15.2

## 5.15.2

### Fixes

- Stop sending navigation route params for auto-generated transactions, as they may contain PII or other sensitive data ([#3487](https://github.com/getsentry/sentry-react-native/pull/3487))
- Further details and other strategies to mitigate this issue can be found on our [trouble shooting guide page](https://docs.sentry.io/platforms/react-native/troubleshooting/#routing-transaction-data-contains-sensitive-information)

## 5.16.0-alpha.2

### Features
Expand Down
6 changes: 4 additions & 2 deletions RNSentryCocoaTester/Podfile
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
require_relative '../node_modules/react-native/scripts/react_native_pods'

platform :ios, '12.4'
platform :ios, '13.4'

target 'RNSentryCocoaTesterTests' do
use_react_native!()
use_react_native!(
:hermes_enabled => false,
)
pod 'RNSentry', :path => '../RNSentry.podspec'
pod 'OCMock', '3.9.1'
end
18 changes: 0 additions & 18 deletions RNSentryCocoaTester/RNSentryCocoaTester.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,6 @@
30F19D4E16BEEFEC68733838 /* [CP] Check Pods Manifest.lock */,
3360898929524164007C7730 /* Sources */,
BB7D14838753E6599863899B /* Frameworks */,
E56C5E3822DFF9C2796CEB4A /* [CP] Embed Pods Frameworks */,
CC7959F3721CB3AD7CB6A047 /* [CP] Copy Pods Resources */,
);
buildRules = (
Expand Down Expand Up @@ -170,23 +169,6 @@
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests-resources.sh\"\n";
showEnvVarsInLog = 0;
};
E56C5E3822DFF9C2796CEB4A /* [CP] Embed Pods Frameworks */ = {
isa = PBXShellScriptBuildPhase;
buildActionMask = 2147483647;
files = (
);
inputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests-frameworks-${CONFIGURATION}-input-files.xcfilelist",
);
name = "[CP] Embed Pods Frameworks";
outputFileListPaths = (
"${PODS_ROOT}/Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests-frameworks-${CONFIGURATION}-output-files.xcfilelist",
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
shellScript = "\"${PODS_ROOT}/Target Support Files/Pods-RNSentryCocoaTesterTests/Pods-RNSentryCocoaTesterTests-frameworks.sh\"\n";
showEnvVarsInLog = 0;
};
/* End PBXShellScriptBuildPhase section */

/* Begin PBXSourcesBuildPhase section */
Expand Down
7 changes: 4 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@
"build:sdk": "tsc -p tsconfig.build.json",
"build:sdk:watch": "tsc -p tsconfig.build.json -w --preserveWatchOutput",
"build:tools": "tsc -p tsconfig.build.tools.json",
"build:tools:watch": "tsc -p tsconfig.build.tools.json -w --preserveWatchOutput",
"build:plugin": "EXPO_NONINTERACTIVE=true expo-module build plugin",
"downlevel": "downlevel-dts dist ts3.8/dist --to=3.8",
"clean": "rimraf dist coverage && yarn clean:plugin",
Expand Down Expand Up @@ -73,7 +74,7 @@
},
"devDependencies": {
"@babel/core": "^7.23.5",
"@expo/metro-config": "^0.10.7",
"@expo/metro-config": "0.16.0",
"@sentry-internal/eslint-config-sdk": "7.81.1",
"@sentry-internal/eslint-plugin-sdk": "7.81.1",
"@sentry-internal/typescript": "7.80.0",
Expand All @@ -88,15 +89,15 @@
"eslint": "^7.6.0",
"eslint-plugin-react": "^7.20.6",
"eslint-plugin-react-native": "^3.8.1",
"expo": "^49.0.21",
"expo": "50.0.0-preview.8",
"expo-module-scripts": "^3.1.0",
"jest": "^29.6.2",
"jest-environment-jsdom": "^29.6.2",
"madge": "^6.1.0",
"metro": "0.76",
"prettier": "^2.0.5",
"react": "18.2.0",
"react-native": "0.72.6",
"react-native": "0.73.0",
"replace-in-file": "^7.0.1",
"rimraf": "^4.1.1",
"ts-jest": "^29.1.1",
Expand Down
10 changes: 10 additions & 0 deletions samples/expo/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -33,3 +33,13 @@ yarn-error.*

# typescript
*.tsbuildinfo

# Generated by expo-cli
/android
/ios

# @generated expo-cli sync-2b81b286409207a5da26e14c78851eb30d8ccbdb
# The following patterns were generated by expo-cli

expo-env.d.ts
# @end expo-cli
9 changes: 7 additions & 2 deletions samples/expo/app.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
"name": "sentry-react-native-expo-sample",
"slug": "sentry-react-native-expo-sample",
"jsEngine": "hermes",
"scheme": "sentry-expo-sample",
"version": "1.0.0",
"orientation": "portrait",
"icon": "./assets/icon.png",
Expand All @@ -27,10 +28,13 @@
"package": "io.sentry.expo.sample"
},
"web": {
"bundler": "metro",
"output": "static",
"favicon": "./assets/favicon.png"
},
"experiments": {
"tsconfigPaths": true
"tsconfigPaths": true,
"typedRoutes": true
},
"plugins": [
[
Expand All @@ -41,7 +45,8 @@
"organization": "sentry-sdks"
}
],
"./withSampleSentry.js"
"./withSampleSentry.js",
"expo-router"
]
}
}
59 changes: 59 additions & 0 deletions samples/expo/app/(tabs)/_layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
import React from 'react';
import FontAwesome from '@expo/vector-icons/FontAwesome';
import { Link, Tabs } from 'expo-router';
import { Pressable } from 'react-native';

import Colors from '@/constants/Colors';
import { useColorScheme } from '@/components/useColorScheme';
import { useClientOnlyValue } from '@/components/useClientOnlyValue';

// You can explore the built-in icon families and icons on the web at https://icons.expo.fyi/
function TabBarIcon(props: {
name: React.ComponentProps<typeof FontAwesome>['name'];
color: string;
}) {
return <FontAwesome size={28} style={{ marginBottom: -3 }} {...props} />;
}

export default function TabLayout() {
const colorScheme = useColorScheme();

return (
<Tabs
screenOptions={{
tabBarActiveTintColor: Colors[colorScheme ?? 'light'].tint,
// Disable the static render of the header on web
// to prevent a hydration error in React Navigation v6.
headerShown: useClientOnlyValue(false, true),
}}>
<Tabs.Screen
name="index"
options={{
title: 'Tab One',
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
headerRight: () => (
<Link href="/modal" asChild>
<Pressable>
{({ pressed }) => (
<FontAwesome
name="info-circle"
size={25}
color={Colors[colorScheme ?? 'light'].text}
style={{ marginRight: 15, opacity: pressed ? 0.5 : 1 }}
/>
)}
</Pressable>
</Link>
),
}}
/>
<Tabs.Screen
name="two"
options={{
title: 'Tab Two',
tabBarIcon: ({ color }) => <TabBarIcon name="code" color={color} />,
}}
/>
</Tabs>
);
}
Loading

0 comments on commit ecde2d0

Please sign in to comment.