Skip to content

Commit

Permalink
Merge pull request #47 from powersync-ja/feat/support-new-arch-interop
Browse files Browse the repository at this point in the history
Support React Native New Architecture
  • Loading branch information
mugikhan authored Sep 20, 2024
2 parents 58d5038 + 16328d9 commit e971eeb
Show file tree
Hide file tree
Showing 7 changed files with 1,700 additions and 1,168 deletions.
5 changes: 5 additions & 0 deletions .changeset/perfect-kangaroos-tan.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@journeyapps/react-native-quick-sqlite': minor
---

- Remove use of nativeCallSyncHook() for new architecture support.
2 changes: 1 addition & 1 deletion .ruby-version
Original file line number Diff line number Diff line change
@@ -1 +1 @@
2.6.10
3.3.0
2 changes: 1 addition & 1 deletion Gemfile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
source 'https://rubygems.org'
# You may use http://rbenv.org/ or https://rvm.io/ to install and use this version
ruby '2.7.6'
ruby '3.3.0'
gem 'cocoapods', '~> 1.11', '>= 1.11.3'
6 changes: 3 additions & 3 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,10 +49,10 @@
"homepage": "https://github.com/powersync-ja/react-native-quick-sqlite#readme",
"devDependencies": {
"@changesets/cli": "^2.26.2",
"prettier": "^3.2.4",
"prettier": "^3.3.3",
"react": "18.2.0",
"react-native": "0.71.0",
"react-native-builder-bob": "^0.18.2",
"react-native": "0.74.5",
"react-native-builder-bob": "^0.30.1",
"typescript": "^4.8.4"
},
"peerDependencies": {
Expand Down
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ if (global.__QuickSQLiteProxy == null) {
}

// Check if we are running on-device (JSI)
if (global.nativeCallSyncHook == null || QuickSQLiteModule.install == null) {
if (QuickSQLiteModule.install == null) {
throw new Error(
'Failed to install react-native-quick-sqlite: React Native is not running on-device. QuickSQLite can only be used when synchronous method invocations (JSI) are possible. If you are using a remote debugger (e.g. Chrome), switch to an on-device debugger (e.g. Flipper) instead.'
);
Expand Down
4 changes: 2 additions & 2 deletions tests/scripts/test.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,8 +10,8 @@ const _ = require('lodash');
const chalk = require('chalk');
const { program } = require('commander');

const DEFAULT_AVD_NAME = 'macOS-avd-x86_64-29';
const DEFAULT_SIMULATOR_NAME = 'iPhone 11';
const DEFAULT_AVD_NAME = 'Pixel_3a_API_34_extension_level_7_arm64-v8a';
const DEFAULT_SIMULATOR_NAME = 'iPhone 15 Pro Max';
const DEFAULT_PORT = 4243;
const TEST_TIMEOUT = 1_800_000; // 30 minutes

Expand Down
2,847 changes: 1,687 additions & 1,160 deletions yarn.lock

Large diffs are not rendered by default.

0 comments on commit e971eeb

Please sign in to comment.