-
-
Notifications
You must be signed in to change notification settings - Fork 986
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
Move REACT_NATIVE_VERSION to native-only code #2666
Merged
m-bert
merged 2 commits into
software-mansion:main
from
chriscoomber:fix-web-only-build-failure-issue-2660
Nov 6, 2023
Merged
Move REACT_NATIVE_VERSION to native-only code #2666
m-bert
merged 2 commits into
software-mansion:main
from
chriscoomber:fix-web-only-build-failure-issue-2660
Nov 6, 2023
Conversation
This file contains 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
m-bert
approved these changes
Nov 6, 2023
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @chriscoomber! Thanks for submitting this PR! Please make sure that CI passes and we're good to go 🟢
renovate bot
referenced
this pull request
in valora-inc/wallet
Jan 7, 2024
…4711) [![Mend Renovate](https://app.renovatebot.com/images/banner.svg)](https://renovatebot.com) This PR contains the following updates: | Package | Change | Age | Adoption | Passing | Confidence | |---|---|---|---|---|---| | [react-native-gesture-handler](https://togithub.com/software-mansion/react-native-gesture-handler) | [`^2.13.4` -> `^2.14.0`](https://renovatebot.com/diffs/npm/react-native-gesture-handler/2.13.4/2.14.0) | [![age](https://developer.mend.io/api/mc/badges/age/npm/react-native-gesture-handler/2.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![adoption](https://developer.mend.io/api/mc/badges/adoption/npm/react-native-gesture-handler/2.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![passing](https://developer.mend.io/api/mc/badges/compatibility/npm/react-native-gesture-handler/2.13.4/2.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | [![confidence](https://developer.mend.io/api/mc/badges/confidence/npm/react-native-gesture-handler/2.13.4/2.14.0?slim=true)](https://docs.renovatebot.com/merge-confidence/) | --- ### Release Notes <details> <summary>software-mansion/react-native-gesture-handler (react-native-gesture-handler)</summary> ### [`v2.14.0`](https://togithub.com/software-mansion/react-native-gesture-handler/releases/tag/2.14.0) [Compare Source](https://togithub.com/software-mansion/react-native-gesture-handler/compare/2.13.4...2.14.0) #### ❗ Important changes - Remove Gesture Handler limits on Android by [@​m-bert](https://togithub.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2672](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2672) - Add a new gesture relation - `blocksHandlers` - working like `reversed waitFor` by [@​j-piasecki](https://togithub.com/j-piasecki) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2627](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2627) - Support React Native 0.73 by [@​j-piasecki](https://togithub.com/j-piasecki) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2671](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2671) #### 🐛 Bug fixes - Fix double `onPress` by [@​m-bert](https://togithub.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2657](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2657) - Fix tvOS build by [@​m-bert](https://togithub.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2654](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2654) - Add a non-null assertion for `reactApplicationContext.javaScriptContextHolder` by [@​UNIDY2002](https://togithub.com/UNIDY2002) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2662](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2662) - Move REACT_NATIVE_VERSION to native-only code by [@​chriscoomber](https://togithub.com/chriscoomber) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2666](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2666) - Fix selection when TalkBack is enabled by [@​m-bert](https://togithub.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2669](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2669) - Fix inputs focus on safari by [@​m-bert](https://togithub.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2675](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2675) #### 🔢 Miscellaneous - Bump browserify-sign from 4.2.1 to 4.2.2 in /example by [@​dependabot](https://togithub.com/dependabot) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2661](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2661) - Change Alert to console.log in new docs by [@​m-bert](https://togithub.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2670](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2670) - Remove `handlersToCancel` on web. by [@​m-bert](https://togithub.com/m-bert) in [https://github.com/software-mansion/react-native-gesture-handler/pull/2679](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2679) #### New Contributors - [@​chriscoomber](https://togithub.com/chriscoomber) made their first contribution in [https://github.com/software-mansion/react-native-gesture-handler/pull/2666](https://togithub.com/software-mansion/react-native-gesture-handler/pull/2666) **Full Changelog**: software-mansion/react-native-gesture-handler@2.13.4...2.14.0 </details> --- ### Configuration 📅 **Schedule**: Branch creation - "after 5pm,every weekend" in timezone America/Los_Angeles, Automerge - "after 5pm,every weekend" in timezone America/Los_Angeles. 🚦 **Automerge**: Enabled. ♻ **Rebasing**: Whenever PR becomes conflicted, or you tick the rebase/retry checkbox. 🔕 **Ignore**: Close this PR and you won't be reminded about this update again. --- - [ ] <!-- rebase-check -->If you want to rebase/retry this PR, check this box --- This PR has been generated by [Mend Renovate](https://www.mend.io/free-developer-tools/renovate/). View repository job log [here](https://developer.mend.io/github/valora-inc/wallet). <!--renovate-debug:eyJjcmVhdGVkSW5WZXIiOiIzNy4xMjEuMCIsInVwZGF0ZWRJblZlciI6IjM3LjEyMS4wIiwidGFyZ2V0QnJhbmNoIjoibWFpbiJ9--> --------- Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com> Co-authored-by: valora-bot <[email protected]>
This was referenced Jul 30, 2024
Open
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.
Description
Fixes #2660
Depending on this package in a web-only app is causing a compile error. This is due to this package importing
react-native/package.json
, which for web-only builds doesn't exist. This import is only done to obtain the react-native version number, which isn't used for web anyway. So it seems easy enough to move this version number to a native-only file.I chose to export a function so that it's a logic error to use
getReactNativeVersion
on web, and an error is thrown (right now it's only used in one place, behind a check that makes sure it runs on native only). It might have been easier to just export a const, with fake values on web, but that would hide the error for a potentially more confusing error down the line.Test plan
Not tested, sorry. Would appreciate if someone could help out here.