Skip to content

Conversation

mugikhan
Copy link
Contributor

@mugikhan mugikhan commented Oct 15, 2024

Description

Currently the require('@journeyapps/react-native-quick-sqlite') call is resolved by metro as soon as the bundle is loaded into an app. This causes issues when using op-sqlite as RNQS is not required and should not be installed.
Wrapping the require call into a try catch ensures it is not called when the bundle is loaded and caters for handling any errors should the RNQS package not be installed.

Work done

  • Wrap require call in try catch for better error handling
  • Fix double slash in export statement
  • Fix expo package versions using expo install --fix

Copy link

changeset-bot bot commented Oct 15, 2024

🦋 Changeset detected

Latest commit: a3f625e

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@powersync/react-native Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

@mugikhan mugikhan merged commit b4f4d34 into main Oct 15, 2024
5 checks passed
@mugikhan mugikhan deleted the fix/op-sqlite-inline-require branch October 15, 2024 09:17
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.

2 participants