fix(metro): Fixes TS errors with custom Metro configurations in Expo SDK 54#5246
Merged
fix(metro): Fixes TS errors with custom Metro configurations in Expo SDK 54#5246
Conversation
…tions with Expo SDK 54
Contributor
Android (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b3b5b0d | 399.82 ms | 419.20 ms | 19.38 ms |
| a0b15d6 | 423.06 ms | 437.77 ms | 14.71 ms |
| 2b89ce9 | 413.69 ms | 442.58 ms | 28.89 ms |
| bfe454a+dirty | 573.44 ms | 579.46 ms | 6.02 ms |
| 5c16cdc+dirty | 423.48 ms | 452.35 ms | 28.88 ms |
| c4e097a | 338.06 ms | 439.36 ms | 101.30 ms |
| 6479fd5+dirty | 412.95 ms | 434.02 ms | 21.07 ms |
| 000da7a | 454.46 ms | 445.00 ms | -9.46 ms |
| 534ba8c | 484.00 ms | 499.93 ms | 15.93 ms |
| 7480abe+dirty | 411.60 ms | 405.81 ms | -5.78 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| b3b5b0d | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| a0b15d6 | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| 2b89ce9 | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| bfe454a+dirty | 17.75 MiB | 19.69 MiB | 1.94 MiB |
| 5c16cdc+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| c4e097a | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 6479fd5+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 000da7a | 17.75 MiB | 19.68 MiB | 1.94 MiB |
| 534ba8c | 17.75 MiB | 20.15 MiB | 2.41 MiB |
| 7480abe+dirty | 17.75 MiB | 19.68 MiB | 1.94 MiB |
Contributor
Android (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bfe454a+dirty | 372.42 ms | 424.52 ms | 52.10 ms |
| 5c16cdc+dirty | 375.45 ms | 426.62 ms | 51.17 ms |
| 6479fd5+dirty | 393.06 ms | 434.04 ms | 40.98 ms |
| 000da7a+dirty | 347.89 ms | 381.98 ms | 34.09 ms |
| 7480abe+dirty | 363.80 ms | 431.34 ms | 67.54 ms |
| 8a4ce6f+dirty | 401.11 ms | 381.92 ms | -19.19 ms |
| 8d89cc9+dirty | 357.69 ms | 415.79 ms | 58.10 ms |
| 9f211e3+dirty | 371.00 ms | 432.51 ms | 61.51 ms |
| 6fee48d+dirty | 370.23 ms | 427.86 ms | 57.63 ms |
| 955f2eb+dirty | 388.13 ms | 433.56 ms | 45.44 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| bfe454a+dirty | 7.15 MiB | 8.42 MiB | 1.26 MiB |
| 5c16cdc+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 6479fd5+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 000da7a+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 7480abe+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 8a4ce6f+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 8d89cc9+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 9f211e3+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 6fee48d+dirty | 7.15 MiB | 8.41 MiB | 1.26 MiB |
| 955f2eb+dirty | 7.15 MiB | 8.42 MiB | 1.27 MiB |
Contributor
iOS (new) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f70acbf+dirty | 1239.00 ms | 1242.53 ms | 3.53 ms |
| c7f264b+dirty | 1229.78 ms | 1225.84 ms | -3.94 ms |
| 46da307+dirty | 1213.45 ms | 1207.96 ms | -5.49 ms |
| 20d5eaa+dirty | 1224.67 ms | 1223.16 ms | -1.51 ms |
| c9e95bd+dirty | 1205.83 ms | 1207.38 ms | 1.55 ms |
| 1853710+dirty | 1213.67 ms | 1226.35 ms | 12.67 ms |
| b3b5b0d+dirty | 1235.16 ms | 1238.61 ms | 3.45 ms |
| 8ece263+dirty | 1206.90 ms | 1211.45 ms | 4.55 ms |
| bc9680d+dirty | 1228.57 ms | 1233.64 ms | 5.07 ms |
| ba75c7c+dirty | 1236.14 ms | 1240.69 ms | 4.55 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f70acbf+dirty | 3.19 MiB | 4.54 MiB | 1.36 MiB |
| c7f264b+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| 46da307+dirty | 3.19 MiB | 4.44 MiB | 1.25 MiB |
| 20d5eaa+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| c9e95bd+dirty | 3.19 MiB | 4.44 MiB | 1.25 MiB |
| 1853710+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| b3b5b0d+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| 8ece263+dirty | 3.19 MiB | 4.48 MiB | 1.29 MiB |
| bc9680d+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
| ba75c7c+dirty | 3.19 MiB | 4.38 MiB | 1.19 MiB |
Contributor
iOS (legacy) Performance metrics 🚀
|
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f70acbf+dirty | 1235.71 ms | 1243.14 ms | 7.43 ms |
| c7f264b+dirty | 1211.82 ms | 1218.04 ms | 6.22 ms |
| 46da307+dirty | 1217.08 ms | 1224.16 ms | 7.08 ms |
| 20d5eaa+dirty | 1231.12 ms | 1226.00 ms | -5.12 ms |
| c9e95bd+dirty | 1240.19 ms | 1246.33 ms | 6.14 ms |
| 1853710+dirty | 1224.35 ms | 1230.18 ms | 5.84 ms |
| b3b5b0d+dirty | 1227.71 ms | 1239.50 ms | 11.79 ms |
| 8ece263+dirty | 1217.29 ms | 1213.35 ms | -3.94 ms |
| bc9680d+dirty | 1221.41 ms | 1241.47 ms | 20.06 ms |
| ba75c7c+dirty | 1235.86 ms | 1226.45 ms | -9.41 ms |
App size
| Revision | Plain | With Sentry | Diff |
|---|---|---|---|
| f70acbf+dirty | 2.63 MiB | 3.98 MiB | 1.34 MiB |
| c7f264b+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| 46da307+dirty | 2.63 MiB | 3.87 MiB | 1.24 MiB |
| 20d5eaa+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| c9e95bd+dirty | 2.63 MiB | 3.87 MiB | 1.24 MiB |
| 1853710+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| b3b5b0d+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| 8ece263+dirty | 2.63 MiB | 3.91 MiB | 1.28 MiB |
| bc9680d+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
| ba75c7c+dirty | 2.63 MiB | 3.81 MiB | 1.18 MiB |
lucas-zimerman
approved these changes
Oct 8, 2025
Collaborator
lucas-zimerman
left a comment
There was a problem hiding this comment.
Looking good!
This is optional, but would it be possible to also include a type test to validates it's working with the new format and also the old ones? That could be done on a follow-up PR.
Contributor
Author
thank you @lucas-zimerman. I'll iterate on a new PR for this. |
antonis
added a commit
that referenced
this pull request
Feb 27, 2026
Adds type compatibility tests validating the fix from #5246: - New format: a function with the flexible `Record<string, unknown>` signature (Expo SDK 54 style, accommodating diverged Metro types) - Old format: the classic wrapping pattern where users call `expo/metro-config`'s getDefaultConfig and return a modified config Follows up on the type-test suggestion in #5246 (comment) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
10 tasks
antonis
added a commit
that referenced
this pull request
Feb 27, 2026
…fig (#5733) * test(metro): Add type tests for SentryExpoConfigOptions.getDefaultConfig Adds type compatibility tests validating the fix from #5246: - New format: a function with the flexible `Record<string, unknown>` signature (Expo SDK 54 style, accommodating diverged Metro types) - Old format: the classic wrapping pattern where users call `expo/metro-config`'s getDefaultConfig and return a modified config Follows up on the type-test suggestion in #5246 (comment) Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> * Fix lint issue --------- Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
📢 Type of change
📜 Description
Fixes TypeScript errors when using custom Metro configurations with Expo SDK 54 by relaxing
getDefaultConfigtypes.The
getDefaultConfigoption inSentryExpoConfigOptionsnow uses flexible typing to accommodate Metro bundler type differences between@expo/metroand the standalone metro package.This fixes TypeScript errors when using custom Metro configurations with Expo SDK 54, where Metro type definitions have diverged from earlier versions.
💡 Motivation and Context
Fixes #5176
💚 How did you test it?
Manual with an Expo 54 project and the exact config from #5176
📝 Checklist
sendDefaultPIIis enabled🔮 Next steps