@powersync/react-native 1.16.1 → 1.16.2
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 +25 -14
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
|
|
5
5
|
# PowerSync SDK for React Native
|
|
6
6
|
|
|
7
|
-
|
|
7
|
+
_[PowerSync](https://www.powersync.com) is a sync engine for building local-first apps with instantly-responsive UI/UX and simplified state transfer. Syncs between SQLite on the client-side and Postgres, MongoDB or MySQL on the server-side._
|
|
8
8
|
|
|
9
9
|
This package (`packages/react-native`) is the PowerSync SDK for React Native clients. It is an extension of `packages/common`.
|
|
10
10
|
|
|
@@ -71,13 +71,24 @@ module.exports = function (api) {
|
|
|
71
71
|
};
|
|
72
72
|
```
|
|
73
73
|
|
|
74
|
-
|
|
74
|
+
### Expo EAS config (optional)
|
|
75
|
+
|
|
76
|
+
If you are using this library in an Expo project and encounter issues with multiple versions of SQLite3, the conflict might be due to `expo-updates` also depending on SQLite. To resolve this, you can configure Expo to use the third-party SQLite pod.
|
|
77
|
+
|
|
78
|
+
Update your `ios/Podfile.properties.json` to include the following configuration:
|
|
79
|
+
|
|
80
|
+
```json
|
|
81
|
+
{
|
|
82
|
+
"expo.updates.useThirdPartySQLitePod": "true"
|
|
83
|
+
}
|
|
84
|
+
```
|
|
85
|
+
|
|
86
|
+
### Metro config (optional)
|
|
75
87
|
|
|
76
88
|
When using a bare React Native app without a framework like Expo, the `@powersync/react-native` package does not work well with inline requires.
|
|
77
89
|
|
|
78
90
|
If you see the following error message
|
|
79
91
|
|
|
80
|
-
|
|
81
92
|
```bash
|
|
82
93
|
Super expression must either be null or a function
|
|
83
94
|
```
|
|
@@ -86,17 +97,17 @@ then you will need to add this to your `metro.config.js`:
|
|
|
86
97
|
|
|
87
98
|
```js
|
|
88
99
|
const config = {
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
|
|
99
|
-
|
|
100
|
+
transformer: {
|
|
101
|
+
getTransformOptions: async () => ({
|
|
102
|
+
transform: {
|
|
103
|
+
inlineRequires: {
|
|
104
|
+
blockList: {
|
|
105
|
+
[require.resolve('@powersync/react-native')]: true
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
}
|
|
109
|
+
})
|
|
110
|
+
}
|
|
100
111
|
};
|
|
101
112
|
```
|
|
102
113
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@powersync/react-native",
|
|
3
|
-
"version": "1.16.
|
|
3
|
+
"version": "1.16.2",
|
|
4
4
|
"publishConfig": {
|
|
5
5
|
"registry": "https://registry.npmjs.org/",
|
|
6
6
|
"access": "public"
|
|
@@ -25,7 +25,7 @@
|
|
|
25
25
|
"homepage": "https://docs.powersync.com/",
|
|
26
26
|
"peerDependencies": {
|
|
27
27
|
"@journeyapps/react-native-quick-sqlite": "^2.2.0",
|
|
28
|
-
"@powersync/common": "^1.22.
|
|
28
|
+
"@powersync/common": "^1.22.1",
|
|
29
29
|
"react": "*",
|
|
30
30
|
"react-native": "*"
|
|
31
31
|
},
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
}
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@powersync/common": "1.22.
|
|
38
|
+
"@powersync/common": "1.22.1",
|
|
39
39
|
"@powersync/react": "1.5.1"
|
|
40
40
|
},
|
|
41
41
|
"devDependencies": {
|