Skip to content
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 bson to a normal dependency to prevent issues in yarn #6043

Merged
merged 1 commit into from
Aug 8, 2023

Conversation

takameyer
Copy link
Contributor

@takameyer takameyer commented Aug 7, 2023

What, How & Why?

When using yarn as a dependency manager, peerDependencies are not automatically installed. This causes errors with our bson dependency, as many users will not have this package as a direct dependency.
Therefore bson has been removed from the peerDependencies and is now a direct dependency of realm. This has the effect that users can't enforce which version of bson Realm should use, but it's a better compromise than getting runtime crashes where they are forced to add bson as a dependency.

This closes #6040

☑️ ToDos

  • 📝 Changelog entry
  • 📝 Compatibility label is updated or copied from previous entry
  • 📝 Update COMPATIBILITY.md
  • 🚦 Tests
  • 🔀 Executed flexible sync tests locally if modifying flexible sync
  • 📦 Updated internal package version in consuming package.jsons (if updating internal packages)
  • 📱 Check the React Native/other sample apps work if necessary
  • 📝 Public documentation PR created or is not necessary
  • 💥 Breaking label has been applied or is not necessary

If this PR adds or changes public API's:

  • typescript definitions file is updated
  • jsdoc files updated

Copy link
Member

@kraenhansen kraenhansen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sad that we need to enforce this restriction, but your analysis, conclusion and suggested changes are sound to me 👍

@takameyer takameyer merged commit 99c70a7 into main Aug 8, 2023
8 checks passed
@takameyer takameyer deleted the andrew/bson-fix branch August 8, 2023 07:36
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 15, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

v12 RC with Yarn: Unable to resolve "bson" from "node_modules/realm/dist/bundle.react-native.js"
2 participants