Skip to content

Commit db7d0d3

Browse files
authored
Merge branch 'main' into bucket-priorities-in-yjs
2 parents d62d1e7 + 7397bd9 commit db7d0d3

File tree

82 files changed

+2567
-725
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

82 files changed

+2567
-725
lines changed

.changeset/friendly-chairs-camp.md

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

.changeset/grumpy-panthers-own.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@powersync/react-native': patch
3+
'@powersync/node': patch
4+
'@powersync/web': patch
5+
---
6+
7+
Update package description

.changeset/mighty-spies-fail.md

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

.changeset/tame-boats-hammer.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@powersync/node': patch
3+
---
4+
5+
Update readme to reflect alpha status.

.changeset/yellow-countries-warn.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@powersync/node': patch
3+
---
4+
5+
Update readme to refer to Node.js docs

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,6 +18,10 @@ _[PowerSync](https://www.powersync.com) is a sync engine for building local-firs
1818

1919
- JS Web SDK implementation (extension of `packages/common`)
2020

21+
- [packages/node](./packages/node/README.md)
22+
23+
- Node.js client implementation (extension of `packages/common`)
24+
2125
- [packages/react](./packages/react/README.md)
2226

2327
- React integration for PowerSync.
@@ -80,6 +84,10 @@ Demo applications are located in the [`demos/`](./demos/) directory. Also see ou
8084

8185
- [demos/example-capacitor](./demos/example-capacitor/README.md) A Capacitor example app using the PowerSync Web SDK.
8286

87+
### Node
88+
89+
- [demos/example-node](./demos/example-node/README.md) A small CLI example built using the PowerSync SDK for Node.js.
90+
8391
## Tools
8492

8593
- [tools/diagnostics-app](./tools/diagnostics-app): A standalone web app that presents stats about a user's local database (incl. tables and sync buckets).

demos/django-react-native-todolist/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@
1010
"dependencies": {
1111
"@azure/core-asynciterator-polyfill": "^1.0.2",
1212
"@expo/vector-icons": "^14.0.0",
13-
"@journeyapps/react-native-quick-sqlite": "^2.3.0",
13+
"@journeyapps/react-native-quick-sqlite": "^2.4.2",
1414
"@powersync/common": "workspace:*",
1515
"@powersync/react": "workspace:*",
1616
"@powersync/react-native": "workspace:*",

demos/example-node/.env

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
BACKEND=http://localhost:6060
2+
SYNC_SERVICE=http://localhost:8080

demos/example-node/README.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
## Node.js Demo
2+
3+
This demonstrates a small Node.js client opening a database and connecting PowerSync.
4+
5+
This demo is configured to talk to an example backend [you can host yourself](https://github.com/powersync-ja/self-host-demo). To get started:
6+
7+
1. Start one of the Node.js backend examples from [the self-host-demo repository](https://github.com/powersync-ja/self-host-demo).
8+
2. If necessary, change `.env` to point to the started backend and sync service.
9+
3. Run `pnpm install` and `pnpm build:packages` in the root of this repo.
10+
4. In this directory, run `pnpm run start`.
11+
12+
This opens the local database, connects to PowerSync, waits for a first sync and then runs a simple query.
13+
Results from the query are printed every time it changes. Try:
14+
15+
1. Updating a row in the backend database and see changes reflected in the running client.
16+
2. Enter `add('my list')` and see the new list show up in the backend database.

demos/example-node/package.json

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
{
2+
"name": "example-node",
3+
"version": "1.0.0",
4+
"description": "",
5+
"type": "module",
6+
"private": true,
7+
"scripts": {
8+
"build": "tsc -b",
9+
"watch": "tsc -b -w",
10+
"start": "node --loader ts-node/esm -r dotenv/config src/main.ts"
11+
},
12+
"dependencies": {
13+
"@powersync/node": "workspace:*",
14+
"dotenv": "^16.4.7"
15+
},
16+
"devDependencies": {
17+
"ts-node": "^10.9.2",
18+
"typescript": "^5.8.2"
19+
}
20+
}

0 commit comments

Comments
 (0)