Skip to content

Commit 599b2d2

Browse files
fix: revert op-sqlite version to 15.0.7 and update related configurations
1 parent 4dc2920 commit 599b2d2

5 files changed

Lines changed: 54 additions & 68 deletions

File tree

.yarn/patches/@op-engineering-op-sqlite-npm-15.1.5-29351e9e0f.patch renamed to .yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch

Lines changed: 39 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
diff --git a/android/build.gradle b/android/build.gradle
2-
index 7df016db4507ab4a0c216622d15a9263b91f2cf2..dc94a38d57fd313e9bb40e0ef22f2e10034c57e6 100644
2+
index d36fd855813e87b17da43156be64782b325b2733..751355645c0b6e28e2df01e9bdc32f545d8dc83c 100644
33
--- a/android/build.gradle
44
+++ b/android/build.gradle
55
@@ -1,5 +1,4 @@
@@ -69,7 +69,7 @@ index 7df016db4507ab4a0c216622d15a9263b91f2cf2..dc94a38d57fd313e9bb40e0ef22f2e10
6969
println "[OP-SQLITE] using sqlcipher."
7070
} else if(useLibsql) {
7171
diff --git a/android/cpp-adapter.cpp b/android/cpp-adapter.cpp
72-
index 5912d7b1ce5947d49418c34b60d7abbaf0810157..f2cb85bf3f01964669a216d6de06f5bb5d8846d2 100644
72+
index 8feaf7719661ef248113f11b1643deedb4b510af..2393963bf982f80ccff2ed396f1538be7ee18fcb 100644
7373
--- a/android/cpp-adapter.cpp
7474
+++ b/android/cpp-adapter.cpp
7575
@@ -19,8 +19,8 @@ struct OPSQLiteBridge : jni::JavaClass<OPSQLiteBridge> {
@@ -79,7 +79,7 @@ index 5912d7b1ce5947d49418c34b60d7abbaf0810157..f2cb85bf3f01964669a216d6de06f5bb
7979
- makeNativeMethod("clearStateNativeJsi",
8080
- OPSQLiteBridge::clearStateNativeJsi)});
8181
+ makeNativeMethod("clearStateNativeJsi", OPSQLiteBridge::clearStateNativeJsi),
82-
+ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
82+
+ makeNativeMethod("deleteAllDBsJsi", OPSQLiteBridge::deleteAllDBsJsi)});
8383
}
8484

8585
private:
@@ -89,7 +89,7 @@ index 5912d7b1ce5947d49418c34b60d7abbaf0810157..f2cb85bf3f01964669a216d6de06f5bb
8989
}
9090
+
9191
+ static bool deleteAllDBsJsi(jni::alias_ref<jni::JObject> thiz) {
92-
+ return opsqlite::deleteAllDbs();
92+
+ return opsqlite::deleteAllDbs();
9393
+ }
9494
};
9595

@@ -118,20 +118,20 @@ index 44f86df6a21a6f7272b2c79b196586ef8fec886b..9d9f7100fd34361701b2addf09a4f36e
118118
val instance = OPSQLiteBridge()
119119
}
120120
diff --git a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
121-
index 49a01b9f92641ed8c4ab91efe5fac4d42a0d4894..bdfa8294b3c876b563b9f7ea1efabd243ac5b12e 100644
121+
index 688832fa2f9a7f91d16cd50495caa8c9f8873864..9ea814bfa63f27356e804b82e941b7121152db3a 100644
122122
--- a/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
123123
+++ b/android/src/main/java/com/op/sqlite/OPSQLiteModule.kt
124-
@@ -12,7 +12,7 @@ import java.io.InputStream
125-
import java.io.OutputStream
124+
@@ -13,7 +13,7 @@ import java.io.OutputStream
126125
import com.facebook.react.util.RNLog;
127126

127+
//@ReactModule(name = OPSQLiteModule.NAME)
128128
-internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
129129
+class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextBaseJavaModule(context) {
130130
override fun getName(): String {
131131
return NAME
132132
}
133-
@@ -54,6 +54,16 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
134-
throw Exception("Do not call getDylibPath on Android")
133+
@@ -56,6 +56,17 @@ internal class OPSQLiteModule(context: ReactApplicationContext?) : ReactContextB
134+
return true
135135
}
136136

137137
+ @ReactMethod(isBlockingSynchronousMethod = true)
@@ -143,15 +143,16 @@ index 49a01b9f92641ed8c4ab91efe5fac4d42a0d4894..bdfa8294b3c876b563b9f7ea1efabd24
143143
+ fun deleteAllDBs() {
144144
+ OPSQLiteBridge.instance.deleteAllDBs();
145145
+ }
146+
+
146147
+
147148
@ReactMethod
148149
fun moveAssetsDatabase(args: ReadableMap, promise: Promise) {
149150
val filename = args.getString("filename")!!
150151
diff --git a/cpp/DBHostObject.cpp b/cpp/DBHostObject.cpp
151-
index eadea09354386b93831e22acfc7511b473b351d5..5701d158f3aa614c7aff9e99ad5ea68a271782b5 100644
152+
index 85710eea286d45685aa526ed3851e8f1e1411039..8cf10f21ba467dea430aab106d43dd4e2adeacd6 100644
152153
--- a/cpp/DBHostObject.cpp
153154
+++ b/cpp/DBHostObject.cpp
154-
@@ -675,6 +675,10 @@ void DBHostObject::invalidate() {
155+
@@ -889,6 +889,10 @@ void DBHostObject::invalidate() {
155156
#endif
156157
}
157158

@@ -163,23 +164,23 @@ index eadea09354386b93831e22acfc7511b473b351d5..5701d158f3aa614c7aff9e99ad5ea68a
163164

164165
} // namespace opsqlite
165166
diff --git a/cpp/DBHostObject.h b/cpp/DBHostObject.h
166-
index 68a9bc496501307510db9c829886b0c73ac67a04..142e9d9b3398decd467b167f00350a63f46857f2 100644
167+
index cc174b7c8c5ce500a6ffe5dc6fe092d282d2554c..ff36f742a22b8a84f37d6dd28441dbe9d0c6c873 100644
167168
--- a/cpp/DBHostObject.h
168169
+++ b/cpp/DBHostObject.h
169-
@@ -68,6 +68,7 @@ public:
170-
void on_commit();
171-
void on_rollback();
172-
void invalidate();
173-
+ void drop();
174-
~DBHostObject() override;
170+
@@ -73,6 +73,7 @@ class JSI_EXPORT DBHostObject : public jsi::HostObject {
171+
void on_commit();
172+
void on_rollback();
173+
void invalidate();
174+
+ void drop();
175+
~DBHostObject() override;
175176

176-
private:
177-
diff --git a/cpp/OPSqlite.cpp b/cpp/OPSqlite.cpp
178-
index e33579af9527e8257b7c4fc38ef501a12fb848ce..791fa709faf35f60c9f9f3f1be43f814fef7dc45 100644
179-
--- a/cpp/OPSqlite.cpp
180-
+++ b/cpp/OPSqlite.cpp
181-
@@ -42,6 +42,13 @@ void invalidate() {
182-
dbs.clear();
177+
private:
178+
diff --git a/cpp/bindings.cpp b/cpp/bindings.cpp
179+
index 5e1c1de234e7bdb131769728fc862d389f9995a5..dc21c6503ffe18f3ae1cf99f327e8aa1fc587b71 100644
180+
--- a/cpp/bindings.cpp
181+
+++ b/cpp/bindings.cpp
182+
@@ -36,6 +36,13 @@ void invalidate() {
183+
dbs.clear();
183184
}
184185

185186
+bool deleteAllDbs() {
@@ -190,12 +191,12 @@ index e33579af9527e8257b7c4fc38ef501a12fb848ce..791fa709faf35f60c9f9f3f1be43f814
190191
+}
191192
+
192193
void install(jsi::Runtime &rt,
193-
const std::shared_ptr<react::CallInvoker> &_invoker,
194+
const std::shared_ptr<react::CallInvoker> &invoker,
194195
const char *base_path, const char *crsqlite_path,
195-
diff --git a/cpp/OPSqlite.hpp b/cpp/OPSqlite.hpp
196+
diff --git a/cpp/bindings.h b/cpp/bindings.h
196197
index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d88f260bf 100644
197-
--- a/cpp/OPSqlite.hpp
198-
+++ b/cpp/OPSqlite.hpp
198+
--- a/cpp/bindings.h
199+
+++ b/cpp/bindings.h
199200
@@ -14,6 +14,7 @@ void install(jsi::Runtime &rt,
200201
const char *base_path, const char *crsqlite_path,
201202
const char *sqlite_vec_path);
@@ -205,33 +206,18 @@ index 91511ab8dff0cbd34c6b8b844c1783c39d4317cb..cc73dfe4405d568cbfbbfa5a9c879a1d
205206

206207
} // namespace opsqlite
207208
diff --git a/op-sqlite.podspec b/op-sqlite.podspec
208-
index 32906a25cf057695d868bd0eaadb7b973b2aa8f7..4a1e452117fb7c61b33dd346aa120abfc691089e 100644
209+
index 375cc3ef0838a3cffb87ec970f636880a8676bb3..e6fce21630ed00aa863f2baae7b3d04de783dcb0 100644
209210
--- a/op-sqlite.podspec
210211
+++ b/op-sqlite.podspec
211-
@@ -1,12 +1,13 @@
212+
@@ -1,4 +1,3 @@
212213
-require "json"
213214
require_relative "./generate_tokenizers_header_file"
214215

215216
log_message = lambda do |message|
216-
puts "\e[34m#{message}\e[0m"
217+
@@ -39,11 +38,10 @@ else
218+
app_package = JSON.parse(File.read(File.join(__dir__, "example", "package.json")))
217219
end
218220

219-
+# NOTE: Disabled as redundant for now, re-enable if needed
220-
# In the sample app the dir is not inside of node_modules
221-
-is_user_app = __dir__.include?("node_modules")
222-
+# is_user_app = __dir__.include?("node_modules")
223-
+is_user_app = false
224-
package = JSON.parse(File.read(File.join(__dir__, "package.json")))
225-
app_package = nil
226-
package_json_path = nil
227-
@@ -32,13 +33,13 @@ else
228-
package_json_path = File.join(__dir__, "example", "package.json")
229-
end
230-
231-
-app_package = JSON.parse(File.read(package_json_path))
232-
+# NOTE: Disabled as redundant for now, re-enable if needed
233-
+# app_package = JSON.parse(File.read(package_json_path))
234-
235221
-op_sqlite_config = app_package["op-sqlite"]
236222
-use_sqlcipher = false
237223
+use_sqlcipher = true
@@ -242,7 +228,7 @@ index 32906a25cf057695d868bd0eaadb7b973b2aa8f7..4a1e452117fb7c61b33dd346aa120abf
242228
phone_version = false
243229
sqlite_flags = ""
244230
fts5 = false
245-
@@ -46,37 +47,6 @@ rtree = false
231+
@@ -51,37 +49,6 @@ rtree = false
246232
use_sqlite_vec = false
247233
tokenizers = []
248234

@@ -261,19 +247,19 @@ index 32906a25cf057695d868bd0eaadb7b973b2aa8f7..4a1e452117fb7c61b33dd346aa120abf
261247
-
262248
-if phone_version then
263249
- if use_sqlcipher then
264-
- raise "SQLCipher is not supported with phone version. It cannot load extensions."
250+
- raise "SQLCipher is not supported with phone version"
265251
- end
266252
-
267253
- if use_crsqlite then
268-
- raise "CRSQLite is not supported with phone version. It cannot load extensions."
254+
- raise "CRSQLite is not supported with phone version"
269255
- end
270256
-
271257
- if rtree then
272-
- raise "RTree is not supported with phone version. It cannot load extensions."
258+
- raise "RTree is not supported with phone version"
273259
- end
274260
-
275261
- if use_sqlite_vec then
276-
- raise "SQLite Vec is not supported with phone version. It cannot load extensions."
262+
- raise "SQLite Vec is not supported with phone version"
277263
- end
278264
-end
279265
-

example/ios/Podfile.lock

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ PODS:
3434
- RNCAsyncStorage
3535
- SSZipArchive
3636
- Yoga
37-
- op-sqlite (15.1.5):
37+
- op-sqlite (15.0.7):
3838
- DoubleConversion
3939
- glog
4040
- hermes-engine
@@ -1852,7 +1852,7 @@ SPEC CHECKSUMS:
18521852
glog: eb93e2f488219332457c3c4eafd2738ddc7e80b8
18531853
hermes-engine: 2771b98fb813fdc6f92edd7c9c0035ecabf9fee7
18541854
MendixNative: 5d4f642347f8d28bdf18e0af822bdb0ff830a430
1855-
op-sqlite: e8590c98ed3f69c072eea7949bfa214088d3f5c1
1855+
op-sqlite: 12554de3e1a0cb86cbad3cf1f0c50450f57d3855
18561856
OpenSSL-Universal: 6082b0bf950e5636fe0d78def171184e2b3899c2
18571857
RCT-Folly: e78785aa9ba2ed998ea4151e314036f6c49e6d82
18581858
RCTDeprecation: be794de7dc6ed8f9f7fbf525f86e7651b8b68746

example/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@
2222
"harness:ios:with:build": "yarn app:package:ios && yarn app:install:ios && yarn harness:ios"
2323
},
2424
"dependencies": {
25-
"@op-engineering/op-sqlite": "15.1.5",
25+
"@op-engineering/op-sqlite": "15.0.7",
2626
"@react-native-async-storage/async-storage": "2.1.1",
2727
"react": "19.0.0",
2828
"react-native": "0.78.2",

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@
6464
"@eslint/compat": "1.3.2",
6565
"@eslint/eslintrc": "3.3.1",
6666
"@eslint/js": "9.35.0",
67-
"@op-engineering/op-sqlite": "15.1.5",
67+
"@op-engineering/op-sqlite": "15.0.7",
6868
"@react-native-async-storage/async-storage": "2.1.1",
6969
"@react-native-community/cli": "18.0.1",
7070
"@react-native/babel-preset": "0.78.2",
@@ -176,6 +176,6 @@
176176
"version": "0.55.1"
177177
},
178178
"resolutions": {
179-
"@op-engineering/op-sqlite@15.1.5": "patch:@op-engineering/op-sqlite@npm%3A15.1.5#./.yarn/patches/@op-engineering-op-sqlite-npm-15.1.5-29351e9e0f.patch"
179+
"@op-engineering/op-sqlite@15.0.7": "patch:@op-engineering/op-sqlite@npm%3A15.0.7#./.yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch"
180180
}
181181
}

yarn.lock

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -3111,23 +3111,23 @@ __metadata:
31113111
languageName: node
31123112
linkType: hard
31133113

3114-
"@op-engineering/op-sqlite@npm:15.1.5":
3115-
version: 15.1.5
3116-
resolution: "@op-engineering/op-sqlite@npm:15.1.5"
3114+
"@op-engineering/op-sqlite@npm:15.0.7":
3115+
version: 15.0.7
3116+
resolution: "@op-engineering/op-sqlite@npm:15.0.7"
31173117
peerDependencies:
31183118
react: "*"
31193119
react-native: "*"
3120-
checksum: 10/61520373463c476191a6e6260ea67edf068bf927abf7137064dcd85f134282a4429b76ad3a3cf8a3a913cbbaf6da8219474692e9d4afef8a0171c4edd655a37d
3120+
checksum: 10/574fb9ad485f8d383efd8a5237bf80e4f152d8123be59f7820fa21b435ce504e4062bc8157d9e77b70e8339f2f81623f8d3662d3a06f0edaa85252a3eb788881
31213121
languageName: node
31223122
linkType: hard
31233123

3124-
"@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.1.5#./.yarn/patches/@op-engineering-op-sqlite-npm-15.1.5-29351e9e0f.patch::locator=mendix-native%40workspace%3A.":
3125-
version: 15.1.5
3126-
resolution: "@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.1.5#./.yarn/patches/@op-engineering-op-sqlite-npm-15.1.5-29351e9e0f.patch::version=15.1.5&hash=d88be6&locator=mendix-native%40workspace%3A."
3124+
"@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.0.7#./.yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch::locator=mendix-native%40workspace%3A.":
3125+
version: 15.0.7
3126+
resolution: "@op-engineering/op-sqlite@patch:@op-engineering/op-sqlite@npm%3A15.0.7#./.yarn/patches/@op-engineering-op-sqlite-npm-15.0.7-39fbf4933a.patch::version=15.0.7&hash=686531&locator=mendix-native%40workspace%3A."
31273127
peerDependencies:
31283128
react: "*"
31293129
react-native: "*"
3130-
checksum: 10/7172afb32afe368512981ce7e9873325915415b3c4da0cd1385a572cf9bb301c16ba9b4155827d20a39159f53b5a79d9052de727c412a5a5f2f5775ece464155
3130+
checksum: 10/8a8182fea37e02cf44b75aa2a77b5f9bbe698e698fa7fdfc1450bd9a3343e6ff765f5baecae98d20eae4410cfac5409f1e8069a438036d6d40eebed9ae1dbef8
31313131
languageName: node
31323132
linkType: hard
31333133

@@ -9713,7 +9713,7 @@ __metadata:
97139713
"@babel/core": "npm:7.25.2"
97149714
"@babel/preset-env": "npm:7.25.3"
97159715
"@babel/runtime": "npm:7.25.0"
9716-
"@op-engineering/op-sqlite": "npm:15.1.5"
9716+
"@op-engineering/op-sqlite": "npm:15.0.7"
97179717
"@react-native-async-storage/async-storage": "npm:2.1.1"
97189718
"@react-native-community/cli": "npm:18.0.1"
97199719
"@react-native-community/cli-platform-android": "npm:18.0.1"
@@ -9742,7 +9742,7 @@ __metadata:
97429742
"@eslint/compat": "npm:1.3.2"
97439743
"@eslint/eslintrc": "npm:3.3.1"
97449744
"@eslint/js": "npm:9.35.0"
9745-
"@op-engineering/op-sqlite": "npm:15.1.5"
9745+
"@op-engineering/op-sqlite": "npm:15.0.7"
97469746
"@react-native-async-storage/async-storage": "npm:2.1.1"
97479747
"@react-native-community/cli": "npm:18.0.1"
97489748
"@react-native/babel-preset": "npm:0.78.2"

0 commit comments

Comments
 (0)