@syncular/testkit 0.2.1 → 0.3.1

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 CHANGED
@@ -176,7 +176,7 @@ mounting hooks against a test client is a one-liner. `syncWrapper` builds the
176
176
 
177
177
  ```tsx
178
178
  import { renderHook, act, waitFor } from '@testing-library/react';
179
- import { useSyncQuery } from '@syncular/react';
179
+ import { useRawSql } from '@syncular/react';
180
180
  import { createTestSync } from '@syncular/testkit';
181
181
  import { syncWrapper } from '@syncular/testkit/react';
182
182
 
@@ -186,7 +186,7 @@ client.api.subscribe({ id: 's', table: 'notes', scopes: { list_id: ['x'] } });
186
186
  await client.sync();
187
187
 
188
188
  const { result } = renderHook(
189
- () => useSyncQuery('SELECT * FROM notes'),
189
+ () => useRawSql('SELECT * FROM notes'),
190
190
  { wrapper: syncWrapper(client) },
191
191
  );
192
192
 
package/dist/react.js CHANGED
@@ -11,14 +11,14 @@
11
11
  * `render` want, so a test never hand-writes the provider element.
12
12
  *
13
13
  * import { renderHook, waitFor } from '@testing-library/react';
14
- * import { useSyncQuery } from '@syncular/react';
14
+ * import { useRawSql } from '@syncular/react';
15
15
  * import { createTestSync } from '@syncular/testkit';
16
16
  * import { syncWrapper } from '@syncular/testkit/react';
17
17
  *
18
18
  * const sync = await createTestSync({ schema });
19
19
  * const client = await sync.client('a');
20
20
  * const { result } = renderHook(
21
- * () => useSyncQuery('SELECT * FROM notes'),
21
+ * () => useRawSql('SELECT * FROM notes'),
22
22
  * { wrapper: syncWrapper(client) },
23
23
  * );
24
24
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@syncular/testkit",
3
- "version": "0.2.1",
3
+ "version": "0.3.1",
4
4
  "description": "Syncular test kit: in-process loopback server + clients for integration scenarios",
5
5
  "license": "Apache-2.0",
6
6
  "author": "Benjamin Kniffler",
@@ -28,7 +28,7 @@
28
28
  "exports": {
29
29
  ".": {
30
30
  "bun": "./src/index.ts",
31
- "browser": "./src/index.ts",
31
+ "browser": "./dist/index.js",
32
32
  "import": {
33
33
  "types": "./dist/index.d.ts",
34
34
  "default": "./dist/index.js"
@@ -36,7 +36,7 @@
36
36
  },
37
37
  "./react": {
38
38
  "bun": "./src/react.ts",
39
- "browser": "./src/react.ts",
39
+ "browser": "./dist/react.js",
40
40
  "import": {
41
41
  "types": "./dist/react.d.ts",
42
42
  "default": "./dist/react.js"
@@ -44,7 +44,7 @@
44
44
  },
45
45
  "./faults": {
46
46
  "bun": "./src/faults.ts",
47
- "browser": "./src/faults.ts",
47
+ "browser": "./dist/faults.js",
48
48
  "import": {
49
49
  "types": "./dist/faults.d.ts",
50
50
  "default": "./dist/faults.js"
package/src/react.ts CHANGED
@@ -11,14 +11,14 @@
11
11
  * `render` want, so a test never hand-writes the provider element.
12
12
  *
13
13
  * import { renderHook, waitFor } from '@testing-library/react';
14
- * import { useSyncQuery } from '@syncular/react';
14
+ * import { useRawSql } from '@syncular/react';
15
15
  * import { createTestSync } from '@syncular/testkit';
16
16
  * import { syncWrapper } from '@syncular/testkit/react';
17
17
  *
18
18
  * const sync = await createTestSync({ schema });
19
19
  * const client = await sync.client('a');
20
20
  * const { result } = renderHook(
21
- * () => useSyncQuery('SELECT * FROM notes'),
21
+ * () => useRawSql('SELECT * FROM notes'),
22
22
  * { wrapper: syncWrapper(client) },
23
23
  * );
24
24
  *