@powersync/react-native 0.0.0-dev-20240715141803 → 0.0.0-dev-20240718080705

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.
Files changed (3) hide show
  1. package/README.md +6 -34
  2. package/dist/index.js +0 -28
  3. package/package.json +5 -5
package/README.md CHANGED
@@ -4,7 +4,7 @@
4
4
 
5
5
  # PowerSync SDK for React Native
6
6
 
7
- *[PowerSync](https://www.powersync.com) is a Postgres-SQLite sync layer, which helps developers to create local-first real-time reactive apps that work seamlessly both online and offline.*
7
+ _[PowerSync](https://www.powersync.com) is a Postgres-SQLite sync layer, which helps developers to create local-first real-time reactive apps that work seamlessly both online and offline._
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
 
@@ -30,10 +30,11 @@ npx expo install @journeyapps/react-native-quick-sqlite
30
30
 
31
31
  ## Install Polyfills
32
32
 
33
- This package connects to a PowerSync instance via HTTP streams (enabled by default) or WebSockets.
34
- * Both connection methods require the [React Native Common Polyfills](#react-native-common-polyfills), as detailed below.
35
- * The WebSocket method requires an [additional polyfill](#web-sockets-buffer) for the `Buffer` interface.
36
- * Other polyfills are required for [watched queries](#babel-plugins-watched-queries) using the Async Iterator response format.
33
+ This package connects to a PowerSync instance via HTTP streams (enabled by default) or WebSockets.
34
+
35
+ - Both connection methods require the [React Native Common Polyfills](#react-native-common-polyfills), as detailed below.
36
+ - The WebSocket method requires an [additional polyfill](#web-sockets-buffer) for the `Buffer` interface.
37
+ - Other polyfills are required for [watched queries](#babel-plugins-watched-queries) using the Async Iterator response format.
37
38
 
38
39
  ### React Native Common Polyfills
39
40
 
@@ -62,37 +63,8 @@ import 'react-native-polyfill-globals/auto';
62
63
 
63
64
  HTTP connections require the HTTP streaming polyfills included in the [common section](#react-native-common-polyfills). See additional [setup](https://docs.powersync.com/client-sdk-references/react-native-and-expo#android-flipper-network-plugin) required for Android.
64
65
 
65
- ### WebSocket Connections: Buffer
66
-
67
- Note: Beta Release - WebSockets are currently in a beta release. It should be safe to use in production if sufficient testing is done on the client side.
68
-
69
- Our WebSocket implementation supports binary payloads which are encoded as BSON documents.
70
-
71
- This requires support for the `Buffer` interface.
72
-
73
- Apply the `Buffer` polyfill
74
-
75
- ```bash
76
- npx expo install @craftzdog/react-native-buffer
77
- ```
78
-
79
- ```javascript
80
- import { Buffer } from '@craftzdog/react-native-buffer';
81
-
82
- if (typeof global.Buffer == 'undefined') {
83
- // @ts-ignore If using TypeScript
84
- global.Buffer = Buffer;
85
- }
86
- ```
87
-
88
66
  This library uses `RSocket` for reactive WebSocket streams which requires `process.nextTick` to be available. Apply a polyfill if not available.
89
67
 
90
- ```javascript
91
- if (typeof process.nextTick == 'undefined') {
92
- process.nextTick = setImmediate;
93
- }
94
- ```
95
-
96
68
  ### Babel Plugins: Watched Queries
97
69
 
98
70
  Watched queries can be used with either a callback response or Async Iterator response.
package/dist/index.js CHANGED
@@ -15442,34 +15442,6 @@ function streamBrandCheckException(name) {
15442
15442
  return new TypeError("TransformStream.prototype.".concat(name, " can only be used on a TransformStream"));
15443
15443
  }
15444
15444
 
15445
- var exports$1 = {
15446
- ReadableStream: ReadableStream,
15447
- ReadableStreamDefaultController: ReadableStreamDefaultController,
15448
- ReadableByteStreamController: ReadableByteStreamController,
15449
- ReadableStreamBYOBRequest: ReadableStreamBYOBRequest,
15450
- ReadableStreamDefaultReader: ReadableStreamDefaultReader,
15451
- ReadableStreamBYOBReader: ReadableStreamBYOBReader,
15452
- WritableStream: WritableStream,
15453
- WritableStreamDefaultController: WritableStreamDefaultController,
15454
- WritableStreamDefaultWriter: WritableStreamDefaultWriter,
15455
- ByteLengthQueuingStrategy: ByteLengthQueuingStrategy,
15456
- CountQueuingStrategy: CountQueuingStrategy,
15457
- TransformStream: TransformStream,
15458
- TransformStreamDefaultController: TransformStreamDefaultController
15459
- };
15460
- // Add classes to global scope
15461
- if (typeof globals !== 'undefined') {
15462
- for (var prop in exports$1) {
15463
- if (Object.prototype.hasOwnProperty.call(exports$1, prop)) {
15464
- Object.defineProperty(globals, prop, {
15465
- value: exports$1[prop],
15466
- writable: true,
15467
- configurable: true
15468
- });
15469
- }
15470
- }
15471
- }
15472
-
15473
15445
  var encoding$1 = {exports: {}};
15474
15446
 
15475
15447
  var encodingIndexes = {exports: {}};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@powersync/react-native",
3
- "version": "0.0.0-dev-20240715141803",
3
+ "version": "0.0.0-dev-20240718080705",
4
4
  "publishConfig": {
5
5
  "registry": "https://registry.npmjs.org/",
6
6
  "access": "public"
@@ -23,13 +23,13 @@
23
23
  },
24
24
  "homepage": "https://docs.powersync.com/",
25
25
  "peerDependencies": {
26
- "@journeyapps/react-native-quick-sqlite": "^1.1.6",
27
- "@powersync/common": "0.0.0-dev-20240715141803",
26
+ "@journeyapps/react-native-quick-sqlite": "^1.1.8",
27
+ "@powersync/common": "0.0.0-dev-20240718080705",
28
28
  "react": "*",
29
29
  "react-native": "*"
30
30
  },
31
31
  "dependencies": {
32
- "@powersync/common": "0.0.0-dev-20240715141803",
32
+ "@powersync/common": "0.0.0-dev-20240718080705",
33
33
  "@powersync/react": "1.3.5"
34
34
  },
35
35
  "devDependencies": {
@@ -37,7 +37,7 @@
37
37
  "bson": "^6.6.0",
38
38
  "react-native-fetch-api": "^3.0.0",
39
39
  "@craftzdog/react-native-buffer": "^6.0.5",
40
- "@journeyapps/react-native-quick-sqlite": "^1.1.6",
40
+ "@journeyapps/react-native-quick-sqlite": "^1.1.8",
41
41
  "@rollup/plugin-alias": "^5.1.0",
42
42
  "@rollup/plugin-commonjs": "^25.0.7",
43
43
  "@rollup/plugin-inject": "^5.0.5",