expo-sqlite-mock 2.2.0 → 3.0.0
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/README.md +5 -1
- package/package.json +11 -11
- package/src/ExpoSQLiteNext.ts +8 -7
package/README.md
CHANGED
|
@@ -7,7 +7,8 @@ Use [expo-sqlite](https://docs.expo.dev/versions/latest/sdk/sqlite/) with jest.
|
|
|
7
7
|
|
|
8
8
|
## Notice
|
|
9
9
|
|
|
10
|
-
- **~
|
|
10
|
+
- **~3.0.0** is for expo-sqlite ~53.
|
|
11
|
+
- **~2.0.0** is for expo-sqlite ~52.
|
|
11
12
|
- **~1.0.0** is for expo-sqlite ~51.
|
|
12
13
|
|
|
13
14
|
## Usage
|
|
@@ -52,6 +53,9 @@ it("test", async () => {
|
|
|
52
53
|
|
|
53
54
|
## Changelog
|
|
54
55
|
|
|
56
|
+
- **3.0.0**
|
|
57
|
+
- Compatible with expo-sqlite ~15 and expo ~53.
|
|
58
|
+
|
|
55
59
|
- **2.2.0**
|
|
56
60
|
- Compatible with drizzle
|
|
57
61
|
- Clean up the code
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-sqlite-mock",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "3.0.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"homepage": "https://github.com/zfben/expo-sqlite-mock",
|
|
6
6
|
"repository": {
|
|
@@ -24,9 +24,9 @@
|
|
|
24
24
|
],
|
|
25
25
|
"peerDependencies": {
|
|
26
26
|
"better-sqlite3": "*",
|
|
27
|
-
"jest": "
|
|
27
|
+
"jest": "~29",
|
|
28
28
|
"expo-sqlite": "*",
|
|
29
|
-
"expo": ">=
|
|
29
|
+
"expo": ">=53"
|
|
30
30
|
},
|
|
31
31
|
"devDependencies": {
|
|
32
32
|
"typescript": "*",
|
|
@@ -34,14 +34,14 @@
|
|
|
34
34
|
"expo-sqlite": "*",
|
|
35
35
|
"better-sqlite3": "*",
|
|
36
36
|
"@types/better-sqlite3": "*",
|
|
37
|
-
"@types/react": "
|
|
38
|
-
"react": "
|
|
39
|
-
"react-test-renderer": "
|
|
40
|
-
"react-native": "~0.
|
|
41
|
-
"@testing-library/react-native": "
|
|
42
|
-
"jest-expo": "~
|
|
43
|
-
"@types/jest": "
|
|
44
|
-
"jest": "
|
|
37
|
+
"@types/react": "*",
|
|
38
|
+
"react": "*",
|
|
39
|
+
"react-test-renderer": "*",
|
|
40
|
+
"react-native": "~0.80",
|
|
41
|
+
"@testing-library/react-native": "~13",
|
|
42
|
+
"jest-expo": "~53",
|
|
43
|
+
"@types/jest": "~29",
|
|
44
|
+
"jest": "~29",
|
|
45
45
|
"drizzle-orm": "*"
|
|
46
46
|
}
|
|
47
47
|
}
|
package/src/ExpoSQLiteNext.ts
CHANGED
|
@@ -1,14 +1,15 @@
|
|
|
1
1
|
import sqlite3 from 'better-sqlite3'
|
|
2
2
|
|
|
3
|
-
import type { SQLiteOpenOptions } from 'expo-sqlite/src/NativeDatabase'
|
|
4
3
|
import type {
|
|
5
|
-
|
|
4
|
+
SQLiteBindValue,
|
|
5
|
+
SQLiteOpenOptions,
|
|
6
6
|
SQLiteBindParams,
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
7
|
+
SQLiteRunResult, } from 'expo-sqlite'
|
|
8
|
+
|
|
9
|
+
type SQLiteBindBlobParams = Record<string, Uint8Array>
|
|
10
|
+
type SQLiteBindPrimitiveParams = Record<string, Exclude<SQLiteBindValue, Uint8Array>>
|
|
11
|
+
type SQLiteColumnNames = string[]
|
|
12
|
+
type SQLiteColumnValues = any[]
|
|
12
13
|
|
|
13
14
|
const dbs: NativeDatabase[] = []
|
|
14
15
|
|