feat(expo): Automatically detect Release name and version for Expo Web #4967
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
This PR is an alternative to #4910 implementing automatic detection of the application name and version to form a Sentry Release for Expo Web.
The automatic release enabled the Expo Web to get automatic Session and Replays, without warnings and errors about missing release.
This PR uses the Expo Config retrieval from the previous PR, https://github.com/getsentry/sentry-react-native/pull/4910/files#diff-046edcb66effc01d1cb5c9b13fda59fe16c771580a217bc3f972f2f8ce576a03R38.
But implements a different way to inject the release into the JS bundle. It creates a new Virtual JS Module which adds the release value to the global vars.
This module is only added for web bundles, both dev and release.
💡 Motivation and Context
💚 How did you test it?
unit tests + sample app
📝 Checklist
sendDefaultPII
is enabled