cojson-storage-sqlite
Advanced tools
Comparing version
@@ -110,3 +110,5 @@ import { cojsonInternals, | ||
return []; | ||
return tx.changes | ||
// TODO: avoid parsing here? | ||
return cojsonInternals | ||
.parseJSON(tx.changes) | ||
.map((change) => change && | ||
@@ -113,0 +115,0 @@ typeof change === "object" && |
{ | ||
"name": "cojson-storage-sqlite", | ||
"type": "module", | ||
"version": "0.1.10", | ||
"version": "0.2.0", | ||
"main": "dist/index.js", | ||
@@ -10,3 +10,3 @@ "types": "dist/index.d.ts", | ||
"better-sqlite3": "^8.5.2", | ||
"cojson": "^0.1.12", | ||
"cojson": "^0.2.0", | ||
"typescript": "^5.1.6" | ||
@@ -22,3 +22,3 @@ }, | ||
}, | ||
"gitHead": "909a101f9971ba8469dccddce4860bab0f917786" | ||
"gitHead": "d7e8b0b9da8faeed8a31a60048ee2329323059f0" | ||
} |
@@ -220,3 +220,5 @@ import { | ||
if (tx.privacy !== "trusting") return []; | ||
return tx.changes | ||
// TODO: avoid parsing here? | ||
return cojsonInternals | ||
.parseJSON(tx.changes) | ||
.map( | ||
@@ -342,3 +344,3 @@ (change) => | ||
const upsertedSession = (this.db | ||
const upsertedSession = this.db | ||
.prepare<[number, string, number, string]>( | ||
@@ -354,3 +356,3 @@ `INSERT INTO sessions (coValue, sessionID, lastIdx, lastSignature) VALUES (?, ?, ?, ?) | ||
sessionUpdate.lastSignature | ||
) as {rowID: number}); | ||
) as { rowID: number }; | ||
@@ -357,0 +359,0 @@ const sessionRowID = upsertedSession.rowID; |
Sorry, the diff of this file is not supported yet
32476
0.76%613
0.66%+ Added
- Removed
Updated