Skip to content

Commit cab2bb6

Browse files
Merge remote-tracking branch 'origin/main' into watches
2 parents 37120f6 + 565b0e4 commit cab2bb6

File tree

32 files changed

+230
-126
lines changed

32 files changed

+230
-126
lines changed

.changeset/chilled-birds-cheer.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/dull-mugs-carry.md

Lines changed: 0 additions & 10 deletions
This file was deleted.

.changeset/healthy-carrots-exercise.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/lazy-onions-dance.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/light-clocks-hang.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

.changeset/tall-dolphins-sleep.md

Lines changed: 0 additions & 8 deletions
This file was deleted.

demos/react-supabase-todolist/src/app/views/sql-console/page.tsx

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,7 @@
11
import { NavigationPage } from '@/components/navigation/NavigationPage';
2-
import { Box, Button, Grid, TextField, styled } from '@mui/material';
2+
import { Alert, Box, Button, Grid, TextField, styled } from '@mui/material';
33
import { DataGrid } from '@mui/x-data-grid';
44
import { useQuery } from '@powersync/react';
5-
import { ArrayComparator } from '@powersync/web';
65
import React from 'react';
76

87
export type LoginFormParams = {
@@ -17,7 +16,7 @@ const DEFAULT_QUERY = /* sql */ `
1716
lists
1817
`;
1918

20-
const TableDisplay = React.memo(({ data }: { data: any[] }) => {
19+
const TableDisplay = React.memo(({ data }: { data: ReadonlyArray<any> }) => {
2120
const queryDataGridResult = React.useMemo(() => {
2221
const firstItem = data?.[0];
2322
return {
@@ -55,7 +54,7 @@ export default function SQLConsolePage() {
5554
const inputRef = React.useRef<HTMLInputElement>();
5655
const [query, setQuery] = React.useState(DEFAULT_QUERY);
5756

58-
const { data } = useQuery(query, [], {
57+
const { data, error } = useQuery(query, [], {
5958
/**
6059
* We don't use the isFetching status here, we can avoid re-renders if we don't report on it.
6160
*/
@@ -64,9 +63,10 @@ export default function SQLConsolePage() {
6463
* The query here will only emit results when the query data set changes.
6564
* Result sets are compared by serializing each item to JSON and comparing the strings.
6665
*/
67-
comparator: new ArrayComparator({
68-
compareBy: (item) => JSON.stringify(item)
69-
})
66+
differentiator: {
67+
identify: (item: any) => JSON.stringify(item),
68+
compareBy: (item: any) => JSON.stringify(item)
69+
}
7070
});
7171

7272
return (
@@ -101,6 +101,7 @@ export default function SQLConsolePage() {
101101
</Button>
102102
</S.CenteredGrid>
103103
</S.CenteredGrid>
104+
{error ? <Alert severity="error">{error.message}</Alert> : null}
104105
<TableDisplay data={data} />
105106
</S.MainContainer>
106107
</NavigationPage>

packages/attachments/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@
2929
"test": "pnpm build && vitest"
3030
},
3131
"peerDependencies": {
32-
"@powersync/common": "workspace:^1.33.0"
32+
"@powersync/common": "workspace:^1.33.1"
3333
},
3434
"devDependencies": {
3535
"@powersync/common": "workspace:*",

packages/common/CHANGELOG.md

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,16 @@
11
# @powersync/common
22

3+
## 1.33.1
4+
5+
### Patch Changes
6+
7+
- ffe3095: Improve websocket keepalive logic to reduce keepalive errors.
8+
- 36d8f28: Remove unused compaction logic.
9+
- 53236a8: Rust client: Properly upload CRUD entries made while offline.
10+
- b7255b7: Rust sync client: Fix `connect()` resolving before a connection is made.
11+
- 70a9cf5: Added CommonJs output for common package. Ensuring default export entry is last so that require statements don't use .mjs output instead of .cjs.
12+
- d1b7fcb: Rust sync client: Fix reported `lastSyncedAt` values in sync status.
13+
314
## 1.33.0
415

516
### Minor Changes

packages/common/package.json

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@powersync/common",
3-
"version": "1.33.0",
3+
"version": "1.33.1",
44
"publishConfig": {
55
"registry": "https://registry.npmjs.org/",
66
"access": "public"
@@ -13,8 +13,9 @@
1313
"exports": {
1414
".": {
1515
"import": "./dist/bundle.mjs",
16-
"default": "./dist/bundle.mjs",
17-
"types": "./lib/index.d.ts"
16+
"require": "./dist/bundle.cjs",
17+
"types": "./lib/index.d.ts",
18+
"default": "./dist/bundle.mjs"
1819
}
1920
},
2021
"author": "JOURNEYAPPS",

0 commit comments

Comments
 (0)