@evolu/react-native 9.0.0 → 10.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/dist/SqliteLive.d.ts.map +1 -1
- package/dist/SqliteLive.js +5 -1
- package/package.json +11 -11
- package/src/SqliteLive.ts +8 -1
package/dist/SqliteLive.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"SqliteLive.d.ts","sourceRoot":"","sources":["../src/SqliteLive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,MAAM,EAKP,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,eAAO,MAAM,UAAU,
|
|
1
|
+
{"version":3,"file":"SqliteLive.d.ts","sourceRoot":"","sources":["../src/SqliteLive.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,MAAM,EACN,MAAM,EAKP,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,KAAK,MAAM,cAAc,CAAC;AAGtC,eAAO,MAAM,UAAU,oCAiCtB,CAAC"}
|
package/dist/SqliteLive.js
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import { Config, Sqlite, isSqlMutation, maybeLogSqliteQueryExecutionTime, valuesToSqliteValues, } from "@evolu/common";
|
|
2
2
|
import * as Effect from "effect/Effect";
|
|
3
3
|
import * as Layer from "effect/Layer";
|
|
4
|
-
import * as ExpoSQLite from "expo-sqlite
|
|
4
|
+
import * as ExpoSQLite from "expo-sqlite";
|
|
5
5
|
export const SqliteLive = Layer.effect(Sqlite, Effect.gen(function* () {
|
|
6
6
|
const config = yield* Config;
|
|
7
7
|
const db = ExpoSQLite.openDatabaseSync(`evolu1-${config.name}.db`);
|
|
@@ -18,5 +18,9 @@ export const SqliteLive = Layer.effect(Sqlite, Effect.gen(function* () {
|
|
|
18
18
|
}),
|
|
19
19
|
// RN doesn't need the "last" mode because there are no tabs.
|
|
20
20
|
transaction: () => mutex.withPermits(1),
|
|
21
|
+
export: () => Effect.sync(() => {
|
|
22
|
+
throw new Error("expo-sqlite/next does not support serializeSync");
|
|
23
|
+
return db.serializeSync();
|
|
24
|
+
}),
|
|
21
25
|
});
|
|
22
26
|
}));
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@evolu/react-native",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "10.0.0",
|
|
4
4
|
"description": "Evolu for React Native",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"evolu",
|
|
@@ -35,21 +35,21 @@
|
|
|
35
35
|
},
|
|
36
36
|
"devDependencies": {
|
|
37
37
|
"eslint": "^8.57.0",
|
|
38
|
-
"expo": "^
|
|
39
|
-
"expo-sqlite": "
|
|
40
|
-
"react-native": "0.
|
|
38
|
+
"expo": "^51.0.0",
|
|
39
|
+
"expo-sqlite": "^14.0.3",
|
|
40
|
+
"react-native": "^0.74.1",
|
|
41
41
|
"typescript": "^5.4.5",
|
|
42
|
-
"vitest": "^1.
|
|
43
|
-
"@evolu/common": "5.
|
|
44
|
-
"@evolu/common-react": "8.0.
|
|
42
|
+
"vitest": "^1.6.0",
|
|
43
|
+
"@evolu/common": "5.1.0",
|
|
44
|
+
"@evolu/common-react": "8.0.3",
|
|
45
45
|
"@evolu/tsconfig": "0.0.2",
|
|
46
46
|
"eslint-config-evolu": "1.0.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@evolu/common-react": "^8.0.
|
|
50
|
-
"expo": "^
|
|
51
|
-
"expo-sqlite": "
|
|
52
|
-
"react-native": "^0.
|
|
49
|
+
"@evolu/common-react": "^8.0.3",
|
|
50
|
+
"expo": "^51.0.0",
|
|
51
|
+
"expo-sqlite": "^14.0.3",
|
|
52
|
+
"react-native": "^0.74.1"
|
|
53
53
|
},
|
|
54
54
|
"publishConfig": {
|
|
55
55
|
"access": "public"
|
package/src/SqliteLive.ts
CHANGED
|
@@ -8,7 +8,7 @@ import {
|
|
|
8
8
|
} from "@evolu/common";
|
|
9
9
|
import * as Effect from "effect/Effect";
|
|
10
10
|
import * as Layer from "effect/Layer";
|
|
11
|
-
import * as ExpoSQLite from "expo-sqlite
|
|
11
|
+
import * as ExpoSQLite from "expo-sqlite";
|
|
12
12
|
|
|
13
13
|
export const SqliteLive = Layer.effect(
|
|
14
14
|
Sqlite,
|
|
@@ -32,8 +32,15 @@ export const SqliteLive = Layer.effect(
|
|
|
32
32
|
);
|
|
33
33
|
return { rows: [], changes };
|
|
34
34
|
}),
|
|
35
|
+
|
|
35
36
|
// RN doesn't need the "last" mode because there are no tabs.
|
|
36
37
|
transaction: () => mutex.withPermits(1),
|
|
38
|
+
|
|
39
|
+
export: () =>
|
|
40
|
+
Effect.sync(() => {
|
|
41
|
+
throw new Error("expo-sqlite/next does not support serializeSync");
|
|
42
|
+
return db.serializeSync();
|
|
43
|
+
}),
|
|
37
44
|
});
|
|
38
45
|
}),
|
|
39
46
|
);
|