Skip to content

chore: move react-native-get-random-values to peerDependencies #3203

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

ivaylonikolov7
Copy link
Contributor

@ivaylonikolov7 ivaylonikolov7 commented Jul 1, 2025

Original contributor: @ahmadi-akbar

Description:
Makes react-native-get-random-values optional peer dependency.

Due to a problem with pull bot. I had to recreate #3201.

Related issue(s):
#3055

Fixes
#3055

Notes for reviewer:

Checklist

  • Documented (Code comments, README, etc.)
  • Tested (unit, integration, etc.)

Signed-off-by: Ivaylo Nikolov <ivaylo.nikolov@limechain.tech>
@ivaylonikolov7 ivaylonikolov7 requested review from a team as code owners July 1, 2025 22:38
@ivaylonikolov7 ivaylonikolov7 requested a review from agadzhalov July 1, 2025 22:38
@ivaylonikolov7 ivaylonikolov7 changed the title chore: update react-native-get-random-values to be peer dependency fix: update react-native-get-random-values to be peer dependency Jul 1, 2025
@lfdt-bot
Copy link
Contributor

lfdt-bot commented Jul 1, 2025

🎉 Snyk checks have passed. No issues have been found so far.

security/snyk check is complete. No issues have been found. (View Details)

@ivaylonikolov7 ivaylonikolov7 changed the title fix: update react-native-get-random-values to be peer dependency chore: move react-native-get-random-values to peerDependencies Jul 1, 2025
@ivaylonikolov7
Copy link
Contributor Author

ivaylonikolov7 commented Jul 1, 2025

@ahmadi-akbar I did some research on your solution. We could implement this in a future major version bump but for now this may not be possible as far as I understood

I believe merging this may introduce a breaking change, as existing expo users would need to update their code - for example, by installing an additional package. Upgrading to a new version could potentially break their current applications. Introducing a breaking change should be done only when bumping to a major version so currently this is not feasible.

@AdrianKBL, please correct me if I’m mistaken, but I assume this would affect you and other expo users as well?

Copy link

codecov bot commented Jul 1, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

see 11 files with indirect coverage changes

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@franfernandez20
Copy link

@ahmadi-akbar I did some research on your solution. We could implement this in a future major version bump but for now this may not be possible as far as I understood

I believe merging this may introduce a breaking change, as existing expo users would need to update their code - for example, by installing an additional package. Upgrading to a new version could potentially break their current applications. Introducing a breaking change should be done only when bumping to a major version so currently this is not feasible.

@AdrianKBL, please correct me if I’m mistaken, but I assume this would affect you and other expo users as well?

I understand the motivation behind this change, but yes, this will make the release not backward compatible for React Native and Expo users.

I suggest we clearly document this in the release notes, explicitly mentioning the impact on React Native users. Also, we should update the README (React Native section) to indicate that they now need to install this dependency manually.

@ivaylonikolov7
Copy link
Contributor Author

@franfernandez20

Even if we document it, I’m not sure we can avoid potential community backlash, since maintainers would still need to update their projects. Kabila was the first team that came to mind when I thought of Expo users—hence why I reached out to you. Would it be an issue on your end if we made this package an optional peer dependency?

@venilinvasilev
Copy link
Contributor

venilinvasilev commented Jul 9, 2025

First of all thank you for taking time to contribute to our repository @ahmadi-akbar! I've taken my time to review these changes.
Unfortunately I do not see how these changes, resolve the issue with the sdk having external dependencies which it should not have.
I've pulled this branch locally and confirmed that the sdk still has external dependencies like react/react-native etc...
To resolve this issue we need to remove the react-native-get-random-values dependency completely and change the sdk usage for expo applications thus introducing a breaking change. We can introduce breaking changes only in major versions as we are strictly following semantic versioning. WDYT? cc: @ahmadi-akbar

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants