@op-engineering/op-sqlite 11.2.13 → 11.2.14

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/cpp/bindings.cpp CHANGED
@@ -90,7 +90,7 @@ void install(jsi::Runtime &rt,
90
90
  return false;
91
91
  #endif
92
92
  });
93
-
93
+
94
94
  auto is_ios_embedded = HOST_STATIC_FN("isIOSEmbedded") {
95
95
  #ifdef OP_SQLITE_USE_PHONE_VERSION
96
96
  return true;
package/cpp/bridge.cpp CHANGED
@@ -67,14 +67,15 @@ std::string opsqlite_get_db_path(std::string const &db_name,
67
67
  if (location == ":memory:") {
68
68
  return location;
69
69
  }
70
- char resolved_location[PATH_MAX];
71
- realpath(location.c_str(), resolved_location);
72
- std::string resolved_location_string = std::string(resolved_location);
73
70
 
74
71
  // Will return false if the directory already exists, no need to check
75
- std::filesystem::create_directories(resolved_location);
72
+ std::filesystem::create_directories(location);
76
73
 
77
- return resolved_location_string + "/" + db_name;
74
+ if (!location.empty() && location.back() != '/') {
75
+ return location + "/" + db_name;
76
+ }
77
+
78
+ return location + db_name;
78
79
  }
79
80
 
80
81
  #ifdef OP_SQLITE_USE_SQLCIPHER
@@ -26,14 +26,14 @@ std::string opsqlite_get_db_path(std::string const &db_name,
26
26
  return location;
27
27
  }
28
28
 
29
- char resolved_location[PATH_MAX];
30
- realpath(location.c_str(), resolved_location);
31
- std::string resolved_location_string = std::string(resolved_location);
32
-
33
29
  // Will return false if the directory already exists, no need to check
34
- std::filesystem::create_directories(resolved_location);
30
+ std::filesystem::create_directories(location);
31
+
32
+ if (!location.empty() && location.back() != '/') {
33
+ return location + "/" + db_name;
34
+ }
35
35
 
36
- return resolved_location_string + "/" + db_name;
36
+ return location + db_name;
37
37
  }
38
38
 
39
39
  DB opsqlite_libsql_open_sync(std::string const &name,
@@ -18,7 +18,7 @@
18
18
  <string>1.0.0</string>
19
19
  <key>CFBundleShortVersionString</key>
20
20
  <string>1.0.0</string>
21
- <key>MinimumOSVersion</key>
22
- <string>8.0</string>
21
+ <key>MinimumOSVersion</key>
22
+ <string>13.0</string>
23
23
  </dict>
24
24
  </plist>
@@ -18,7 +18,7 @@
18
18
  <string>1.0.0</string>
19
19
  <key>CFBundleShortVersionString</key>
20
20
  <string>1.0.0</string>
21
- <key>MinimumOSVersion</key>
22
- <string>8.0</string>
21
+ <key>MinimumOSVersion</key>
22
+ <string>13.0</string>
23
23
  </dict>
24
24
  </plist>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@op-engineering/op-sqlite",
3
- "version": "11.2.13",
3
+ "version": "11.2.14",
4
4
  "description": "Next generation SQLite for React Native",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",