Skip to content

fix(expo): Make getSentryExpoConfig options param optional #3514

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Jan 10, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 7 additions & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,11 @@
# Changelog

## Unreleased

### Fixes

- Make `getSentryExpoConfig` options parameter optional ([#3514](https://github.com/getsentry/sentry-react-native/pull/3514))

## 5.16.0-alpha.3

This release is compatible with `[email protected]` and newer.
Expand All @@ -12,7 +18,7 @@ This release is compatible with `[email protected]` and newer.

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

- Add `npx sentry-expo-upload-sourcemaps` for simple EAS Update (expo export) source maps upload to Sentry ([#3491](https://github.com/getsentry/sentry-react-native/pull/3491), [#3510](https://github.com/getsentry/sentry-react-native/pull/3510))
Expand Down
2 changes: 1 addition & 1 deletion src/js/tools/sentryMetroSerializer.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ const DEBUG_ID_COMMENT = '//# debugId=';
/**
* This function returns Default Expo configuration with Sentry plugins.
*/
export function getSentryExpoConfig(projectRoot: string, options: DefaultConfigOptions): MetroConfig {
export function getSentryExpoConfig(projectRoot: string, options: DefaultConfigOptions = {}): MetroConfig {
const { getDefaultConfig } = loadExpoMetroConfigModule();
return getDefaultConfig(projectRoot, {
...options,
Expand Down