diff --git a/demos/example-vite/CHANGELOG.md b/demos/example-vite/CHANGELOG.md
index 8964b80..1f49a9d 100644
--- a/demos/example-vite/CHANGELOG.md
+++ b/demos/example-vite/CHANGELOG.md
@@ -1,5 +1,13 @@
# example-vite
+## 0.0.2
+
+### Patch Changes
+
+- Updated dependencies [7fb9df2]
+- Updated dependencies [7fb9df2]
+ - @journeyapps/powersync-sdk-web@0.1.2
+
## 0.0.1
### Patch Changes
diff --git a/demos/example-vite/package.json b/demos/example-vite/package.json
index b15ce3a..b0a538d 100644
--- a/demos/example-vite/package.json
+++ b/demos/example-vite/package.json
@@ -1,7 +1,7 @@
{
"name": "example-vite",
"private": true,
- "version": "0.0.1",
+ "version": "0.0.2",
"type": "module",
"scripts": {
"dev": "vite",
diff --git a/demos/example-webpack/CHANGELOG.md b/demos/example-webpack/CHANGELOG.md
index 04284aa..b905fa4 100644
--- a/demos/example-webpack/CHANGELOG.md
+++ b/demos/example-webpack/CHANGELOG.md
@@ -4,5 +4,13 @@
### Patch Changes
+- Updated dependencies [7fb9df2]
+- Updated dependencies [7fb9df2]
+ - @journeyapps/powersync-sdk-web@0.1.2
+
+## null
+
+### Patch Changes
+
- Updated dependencies [0e17713]
- @journeyapps/powersync-sdk-web@0.1.1
diff --git a/demos/powersync-nextjs-demo/CHANGELOG.md b/demos/powersync-nextjs-demo/CHANGELOG.md
index ab61c15..2535cf4 100644
--- a/demos/powersync-nextjs-demo/CHANGELOG.md
+++ b/demos/powersync-nextjs-demo/CHANGELOG.md
@@ -1,5 +1,14 @@
# @journeyapps/powersync-nextjs-demo
+## 0.1.6
+
+### Patch Changes
+
+- 7fb9df2: Autofocus inputs in creation dialogs for a better UX.
+- Updated dependencies [7fb9df2]
+- Updated dependencies [7fb9df2]
+ - @journeyapps/powersync-sdk-web@0.1.2
+
## 0.1.5
### Patch Changes
diff --git a/demos/powersync-nextjs-demo/package.json b/demos/powersync-nextjs-demo/package.json
index 76a6cea..6e8274c 100644
--- a/demos/powersync-nextjs-demo/package.json
+++ b/demos/powersync-nextjs-demo/package.json
@@ -1,6 +1,6 @@
{
"name": "@journeyapps/powersync-nextjs-demo",
- "version": "0.1.5",
+ "version": "0.1.6",
"private": true,
"scripts": {
"build": "next build",
@@ -14,7 +14,7 @@
"@emotion/react": "^11.11.1",
"@emotion/styled": "^11.11.0",
"@fontsource/roboto": "^5.0.8",
- "@journeyapps/powersync-react": "1.0.0",
+ "@journeyapps/powersync-react": "1.0.1",
"@journeyapps/powersync-sdk-web": "workspace:*",
"@journeyapps/wa-sqlite": "~0.1.0",
"@mui/icons-material": "^5.14.16",
diff --git a/demos/powersync-nextjs-demo/src/app/views/todo-lists/edit/page.tsx b/demos/powersync-nextjs-demo/src/app/views/todo-lists/edit/page.tsx
index 1d493e6..20048e6 100644
--- a/demos/powersync-nextjs-demo/src/app/views/todo-lists/edit/page.tsx
+++ b/demos/powersync-nextjs-demo/src/app/views/todo-lists/edit/page.tsx
@@ -126,7 +126,7 @@ const TodoEditSection = () => {
{'Create Todo Item'}
Enter a description for a new todo item
-
+
diff --git a/demos/powersync-nextjs-demo/src/app/views/todo-lists/page.tsx b/demos/powersync-nextjs-demo/src/app/views/todo-lists/page.tsx
index 28666a4..1d31ad8 100644
--- a/demos/powersync-nextjs-demo/src/app/views/todo-lists/page.tsx
+++ b/demos/powersync-nextjs-demo/src/app/views/todo-lists/page.tsx
@@ -103,7 +103,7 @@ export default function TodoListsPage() {
{'Create Todo List'}
Enter a name for a new todo list
-
+
diff --git a/packages/powersync-sdk-web/CHANGELOG.md b/packages/powersync-sdk-web/CHANGELOG.md
index 899a160..4c5aafb 100644
--- a/packages/powersync-sdk-web/CHANGELOG.md
+++ b/packages/powersync-sdk-web/CHANGELOG.md
@@ -1,5 +1,12 @@
# @journeyapps/powersync-sdk-web
+## 0.1.2
+
+### Patch Changes
+
+- 7fb9df2: Fix bug where opening multiple WA-SQLite instances would erase DB table change watches.
+- 7fb9df2: Update common SDK dependency to v1.0.1: Improved connector CRUD uploads to be triggered whenever an internal CRUD operation change is triggered. Improved CRUD upload debouncing to rather use a throttled approach - executing multiple continuous write/CRUD operations will now trigger a connector upload at most (every) 1 second (by default).
+
## 0.1.1
### Patch Changes
diff --git a/packages/powersync-sdk-web/package.json b/packages/powersync-sdk-web/package.json
index 570dd6d..47fd0df 100644
--- a/packages/powersync-sdk-web/package.json
+++ b/packages/powersync-sdk-web/package.json
@@ -1,6 +1,6 @@
{
"name": "@journeyapps/powersync-sdk-web",
- "version": "0.1.1",
+ "version": "0.1.2",
"description": "A Web SDK for JourneyApps PowerSync",
"main": "dist/index.js",
"types": "dist/index.d.ts",
@@ -41,7 +41,7 @@
"@journeyapps/wa-sqlite": "~0.1.0"
},
"dependencies": {
- "@journeyapps/powersync-sdk-common": "1.0.0",
+ "@journeyapps/powersync-sdk-common": "1.0.1",
"async-mutex": "^0.4.0",
"comlink": "^4.4.1",
"js-logger": "^1.6.1",
diff --git a/packages/powersync-sdk-web/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.ts b/packages/powersync-sdk-web/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.ts
index e107830..e4caf2c 100644
--- a/packages/powersync-sdk-web/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.ts
+++ b/packages/powersync-sdk-web/src/db/adapters/AbstractWebPowerSyncDatabaseOpenFactory.ts
@@ -65,6 +65,7 @@ export abstract class AbstractWebPowerSyncDatabaseOpenFactory extends AbstractPo
}
return {
+ ...this.options,
database: isServerSide ? new SSRDBAdapter() : this.openDB(),
schema: this.schema,
flags: resolvedFlags
diff --git a/packages/powersync-sdk-web/src/worker/db/open-db.ts b/packages/powersync-sdk-web/src/worker/db/open-db.ts
index afe7913..69dd176 100644
--- a/packages/powersync-sdk-web/src/worker/db/open-db.ts
+++ b/packages/powersync-sdk-web/src/worker/db/open-db.ts
@@ -24,6 +24,8 @@ export type WASQLiteExecuteMethod = (sql: string, params?: any[]) => Promise void;
export type OpenDB = (dbFileName: string) => DBWorkerInterface;
+const listeners = new Map();
+
export async function _openDB(dbFileName: string): Promise {
const { default: moduleFactory } = await import('@journeyapps/wa-sqlite/dist/wa-sqlite-async.mjs');
const module = await moduleFactory();
@@ -34,7 +36,6 @@ export async function _openDB(dbFileName: string): Promise {
sqlite3.vfs_register(vfs, true);
const db = await sqlite3.open_v2(dbFileName);
- const listeners = new Map();
sqlite3.register_table_onchange_hook(db, (opType: number, tableName: string, rowId: number) => {
Array.from(listeners.values()).forEach((l) => l(opType, tableName, rowId));
diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml
index 703778b..3243b5e 100644
--- a/pnpm-lock.yaml
+++ b/pnpm-lock.yaml
@@ -62,8 +62,8 @@ importers:
specifier: ^5.0.8
version: 5.0.8
'@journeyapps/powersync-react':
- specifier: 1.0.0
- version: 1.0.0(react@18.0.0)
+ specifier: 1.0.1
+ version: 1.0.1(react@18.0.0)
'@journeyapps/powersync-sdk-web':
specifier: workspace:*
version: link:../../packages/powersync-sdk-web
@@ -301,8 +301,8 @@ importers:
packages/powersync-sdk-web:
dependencies:
'@journeyapps/powersync-sdk-common':
- specifier: 1.0.0
- version: 1.0.0
+ specifier: 1.0.1
+ version: 1.0.1
async-mutex:
specifier: ^0.4.0
version: 0.4.0
@@ -2110,17 +2110,17 @@ packages:
resolution: {integrity: sha512-ZnQMnLV4e7hDlUvw8H+U8ASL02SS2Gn6+9Ac3wGGLIe7+je2AeAOxPY+izIPJDfFDb7eDjev0Us8MO1iFRN8hA==}
dev: true
- /@journeyapps/powersync-react@1.0.0(react@18.0.0):
- resolution: {integrity: sha512-WMSIScA4cZbBBFAD9p/v6vn/0ixv0tLaVMcx84pIkUSy9FNn8gI0G9ciwUIcyGSNI1sMnCjyH76NwXo48WtY5w==}
+ /@journeyapps/powersync-react@1.0.1(react@18.0.0):
+ resolution: {integrity: sha512-0DCF4C2OijDnxT03dEsrnP2Qhn4k/XwOzdQeLJR7aPS6vr3TTbn//TFSPO8caJmWfZnh3a65uSVlXOvodfpfXQ==}
peerDependencies:
react: '*'
dependencies:
- '@journeyapps/powersync-sdk-common': 1.0.0
+ '@journeyapps/powersync-sdk-common': 1.0.1
react: 18.0.0
dev: false
- /@journeyapps/powersync-sdk-common@1.0.0:
- resolution: {integrity: sha512-mVyIsWiSQPMvAcQ715x+qomYp9C2LZKi/k+w7ZMpWN3KrwIPNWskF6DYHGOwnl9J0uaDC74T9yrwmVganEa3JQ==}
+ /@journeyapps/powersync-sdk-common@1.0.1:
+ resolution: {integrity: sha512-MTAAHyL3jbvknXBuroDheoNDvyntH1Wt/HPLopnaFupg13eJRx/1vvAPd5KRmMwpPpGL+j7P5zMJ+YgvRYIXzw==}
dependencies:
async-mutex: 0.4.0
can-ndjson-stream: 1.0.2