Skip to content

Commit cc1e311

Browse files
committed
Merge branch 'main' into feat/queue-read-connections-op-sqlite
2 parents 0b7c030 + 8613a5b commit cc1e311

File tree

3 files changed

+33
-6
lines changed

3 files changed

+33
-6
lines changed

.github/workflows/audit.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
name: Audit
2+
3+
on:
4+
push:
5+
6+
concurrency:
7+
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
8+
cancel-in-progress: true
9+
10+
jobs:
11+
audit:
12+
runs-on: ubuntu-latest
13+
steps:
14+
- name: Checkout Repo
15+
uses: actions/checkout@v4
16+
- uses: pnpm/action-setup@v4
17+
name: Install pnpm
18+
with:
19+
version: 9
20+
run_install: false
21+
- name: Audit for vulnerabilities
22+
run: npx audit-ci@^7 --config ./audit-ci.jsonc

audit-ci.jsonc

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
{
2+
"critical": true,
3+
"package-manager": "auto",
4+
"registry": "https://registry.npmjs.org"
5+
}

packages/tanstack-react-query/README.md

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11
# TanStack Query Integration for PowerSync
22

3-
`@powersync/tanstack-react-query` provides seamless integration between PowerSync's Web SDK and [TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview) for React. It wraps TanStack's `useQuery` and `useSuspenseQuery` hooks to work easily with PowerSync's SQL queries. This combines PowerSync's existing watched queries with TanStack's features like the [paginated queries](https://tanstack.com/query/latest/docs/framework/react/guides/paginated-queries), [caching](https://tanstack.com/query/latest/docs/framework/react/guides/caching), and [Suspense](https://tanstack.com/query/latest/docs/framework/react/guides/suspense).
3+
`@powersync/tanstack-react-query` provides seamless integration between PowerSync's Web SDK and [TanStack Query](https://tanstack.com/query/latest/docs/framework/react/overview) for React. It wraps TanStack's `useQuery` and `useSuspenseQuery` hooks to work easily with PowerSync's SQL queries. This combines PowerSync's existing watched queries with TanStack Query's features like the [paginated queries](https://tanstack.com/query/latest/docs/framework/react/guides/paginated-queries), [caching](https://tanstack.com/query/latest/docs/framework/react/guides/caching), and [Suspense](https://tanstack.com/query/latest/docs/framework/react/guides/suspense).
44

55
## Note: Alpha Release
66

77
This package is currently in an alpha release.
88

9-
## Getting started
9+
## Getting Started
1010

11-
To use `@powersync/tanstack-react-query`, you need to set up both the `PowerSync context` and the `TanStack React Query client` in your application.
11+
To use `@powersync/tanstack-react-query`, you need to set up both the `PowerSyncContext` and the TanStack `QueryClientProvider` in your application.
1212

1313
```JSX
1414
// App.jsx
@@ -22,7 +22,7 @@ import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
2222

2323
export const App = () => {
2424
const powerSync = React.useMemo(() => {
25-
// Setup PowerSync client
25+
// Set up PowerSync client
2626
}, [])
2727
const queryClient = React.useMemo(() => new QueryClient(), [])
2828

@@ -40,7 +40,7 @@ export const App = () => {
4040

4141
### useQuery
4242

43-
The `useQuery` hook from `@powersync/tanstack-react-query` works similarly to the standard `TanStack React Query` `useQuery` hook but integrates with PowerSync for watched query functionality. Queries automatically update when dependent tables change.
43+
The `useQuery` hook from `@powersync/tanstack-react-query` works similarly to the standard TanStack React Query `useQuery` hook but integrates with PowerSync for watched query functionality. Queries automatically update when dependent tables change.
4444

4545
```JSX
4646
// TodoListDisplay.jsx
@@ -127,7 +127,7 @@ return <></>
127127
}
128128
```
129129
130-
### Kysley Support
130+
### Kysely Support
131131
132132
You are also able to use a compilable query (e.g. [Kysely queries](https://github.com/powersync-ja/powersync-js/tree/main/packages/kysely-driver)) as a query argument in place of a SQL statement string.
133133

0 commit comments

Comments
 (0)