Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/early-guests-jam.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@powersync/op-sqlite': patch
---

Update op-sqlite to v10.1.0 for compatibility with React Native >0.76
6 changes: 3 additions & 3 deletions packages/powersync-op-sqlite/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@
"access": "public"
},
"peerDependencies": {
"@op-engineering/op-sqlite": "^9.2.1",
"@op-engineering/op-sqlite": "^10.1.0",
"@powersync/common": "workspace:^1.21.0",
"react": "*",
"react-native": "*"
Expand All @@ -75,7 +75,7 @@
"async-lock": "^1.4.0"
},
"devDependencies": {
"@op-engineering/op-sqlite": "^9.2.1",
"@op-engineering/op-sqlite": "^10.1.0",
"@react-native/eslint-config": "^0.73.1",
"@types/async-lock": "^1.4.0",
"@types/react": "^18.2.44",
Expand Down Expand Up @@ -133,4 +133,4 @@
"javaPackageName": "com.powersync.opsqlite"
}
}
}
}
4 changes: 2 additions & 2 deletions packages/powersync-op-sqlite/src/db/OPSQLiteConnection.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,12 +64,12 @@ export class OPSQLiteConnection extends BaseObserver<DBAdapterListener> {

async getAll<T>(sql: string, parameters?: any[]): Promise<T[]> {
const result = await this.DB.execute(sql, parameters);
return result.rows ?? [];
return (result.rows ?? []) as T[];
}

async getOptional<T>(sql: string, parameters?: any[]): Promise<T | null> {
const result = await this.DB.execute(sql, parameters);
return result.rows?.[0] ?? null;
return (result.rows?.[0] as T) ?? null;
}

async get<T>(sql: string, parameters?: any[]): Promise<T> {
Expand Down
Loading