-
Notifications
You must be signed in to change notification settings - Fork 24.4k
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
feat: prevent removing globalEvalWithSourceUrl in RELEASE builds #34319
feat: prevent removing globalEvalWithSourceUrl in RELEASE builds #34319
Conversation
@motiz88 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
@motiz88 has imported this pull request. If you are a Meta employee, you can view this diff on Phabricator. |
Base commit: 1e4ebf2 |
Base commit: 9797388 |
This pull request was successfully merged by @EvanBacon in 333583b. When will my fix make it into a release? | Upcoming Releases |
…ebook#34319) Summary: Expo Go was using `nativeInjectHMRUpdate` for [snack](https://snack.expo.io/) to provide stack traces to OTA errors. `nativeInjectHMRUpdate` was replaced with `globalEvalWithSourceUrl` [here](facebook@71c84cf). The issue with `globalEvalWithSourceUrl` is that it is stripped in RELEASE builds, and Expo Go is installed via the App Store, making it a release build. I propose we keep the method, `eval` is still exposed in production so there's no increase in security risk, simply provides a better DX for multipurpose development clients. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Added] - Expose `globalEvalWithSourceUrl` in production builds. [iOS] [Added] - Expose `globalEvalWithSourceUrl` in production builds. Pull Request resolved: facebook#34319 Test Plan: - Function should be available as `global.globalEvalWithSourceUrl` in a production build. Reviewed By: christophpurrer Differential Revision: D38312111 Pulled By: motiz88 fbshipit-source-id: adcd83ad1103c8fd4c6d5d7aec765f27881e0432
…ebook#34319) Summary: Expo Go was using `nativeInjectHMRUpdate` for [snack](https://snack.expo.io/) to provide stack traces to OTA errors. `nativeInjectHMRUpdate` was replaced with `globalEvalWithSourceUrl` [here](facebook@71c84cf). The issue with `globalEvalWithSourceUrl` is that it is stripped in RELEASE builds, and Expo Go is installed via the App Store, making it a release build. I propose we keep the method, `eval` is still exposed in production so there's no increase in security risk, simply provides a better DX for multipurpose development clients. ## Changelog <!-- Help reviewers and the release process by writing your own changelog entry. For an example, see: https://reactnative.dev/contributing/changelogs-in-pull-requests --> [Android] [Added] - Expose `globalEvalWithSourceUrl` in production builds. [iOS] [Added] - Expose `globalEvalWithSourceUrl` in production builds. Pull Request resolved: facebook#34319 Test Plan: - Function should be available as `global.globalEvalWithSourceUrl` in a production build. Reviewed By: christophpurrer Differential Revision: D38312111 Pulled By: motiz88 fbshipit-source-id: adcd83ad1103c8fd4c6d5d7aec765f27881e0432
Summary
Expo Go was using
nativeInjectHMRUpdate
for snack to provide stack traces to OTA errors.nativeInjectHMRUpdate
was replaced withglobalEvalWithSourceUrl
here. The issue withglobalEvalWithSourceUrl
is that it is stripped in RELEASE builds, and Expo Go is installed via the App Store, making it a release build.I propose we keep the method,
eval
is still exposed in production so there's no increase in security risk, simply provides a better DX for multipurpose development clients.Changelog
[Android] [Added] - Expose
globalEvalWithSourceUrl
in production builds.[iOS] [Added] - Expose
globalEvalWithSourceUrl
in production builds.Test Plan
global.globalEvalWithSourceUrl
in a production build.