@op-engineering/op-sqlite 15.1.5 → 15.1.6

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/op-sqlite.podspec CHANGED
@@ -14,8 +14,11 @@ package_json_path = nil
14
14
  # When installed on user node_modules lives inside node_modules/@op-engineering/op-sqlite
15
15
  # Find the users package.json by searching up through parent directories
16
16
  if is_user_app
17
- current_dir = File.dirname(File.expand_path(__dir__))
17
+ current_dir = File.expand_path(__dir__)
18
+ # Move one level up to the parent directory
19
+ current_dir = File.dirname(current_dir)
18
20
 
21
+ # Find the package.json by searching up through parent directories
19
22
  loop do
20
23
  package_path = File.join(current_dir, "package.json")
21
24
  if File.exist?(package_path)
@@ -23,11 +26,12 @@ if is_user_app
23
26
  break
24
27
  end
25
28
 
26
- break if File.dirname(current_dir) == current_dir # reached filesystem root
29
+ parent_dir = File.dirname(current_dir)
30
+ break if parent_dir == current_dir # reached filesystem root
27
31
  current_dir = parent_dir
28
32
  end
29
33
 
30
- raise "package.json not found? It's needed to read any op-sqlite config (if available)" if package_json_path.nil?
34
+ raise "package.json not found" if package_json_path.nil?
31
35
  else
32
36
  package_json_path = File.join(__dir__, "example", "package.json")
33
37
  end
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@op-engineering/op-sqlite",
3
- "version": "15.1.5",
3
+ "version": "15.1.6",
4
4
  "description": "Fastest SQLite for React Native",
5
5
  "main": "./lib/module/index.js",
6
6
  "types": "./lib/typescript/src/index.d.ts",