diff --git a/.changeset/nine-cameras-pump.md b/.changeset/nine-cameras-pump.md deleted file mode 100644 index 1045d31d0..000000000 --- a/.changeset/nine-cameras-pump.md +++ /dev/null @@ -1,25 +0,0 @@ ---- -"@evolu/common": minor ---- - -Time Travel - -Evolu does not delete data; it only marks them as deleted. This is because local-first is a distributed system. There is no central authority (if there is, it's not local-first). Imagine you delete data on some disconnected device and update it on another. Should we throw away changes? Such a deletion would require additional logic to enforce data deletion on all devices forever, even in the future, when some outdated device syncs. It's possible (and planned for Evolu), but it's not trivial because every device has to track data to be rejected without knowing the data itself (for security reasons). - -Not deleting data allows Evolu to provide a time-traveling feature. All data, even "deleted" or overridden, are stored in the evolu_message table. Here is how we can read such data. - -```ts -const todoTitleHistory = (id: TodoId) => - evolu.createQuery((db) => - db - .selectFrom("evolu_message") - .select("value") - .where("table", "==", "todo") - .where("row", "==", id) - .where("column", "==", "title") - .$narrowType<{ value: TodoTable["title"] }>() - .orderBy("timestamp", "desc"), - ); -``` - -Note that this API is not 100% typed, but it's not an issue because Evolu Schema shall be append-only. Once an app is released, we shall not change Schema names and types. We can only add new tables and columns because there is a chance current Schema is already used. diff --git a/apps/native/CHANGELOG.md b/apps/native/CHANGELOG.md index 7c193579e..1728ed5f4 100644 --- a/apps/native/CHANGELOG.md +++ b/apps/native/CHANGELOG.md @@ -1,5 +1,14 @@ # native +## 1.0.37 + +### Patch Changes + +- Updated dependencies [79a6d0c] + - @evolu/common@5.1.0 + - @evolu/common-react@8.0.3 + - @evolu/react-native@9.0.1 + ## 1.0.36 ### Patch Changes diff --git a/apps/native/package.json b/apps/native/package.json index 922824c7b..72935a3c8 100644 --- a/apps/native/package.json +++ b/apps/native/package.json @@ -1,6 +1,6 @@ { "name": "native", - "version": "1.0.36", + "version": "1.0.37", "private": true, "main": "index.js", "scripts": { diff --git a/apps/server/CHANGELOG.md b/apps/server/CHANGELOG.md index a462061be..380b61352 100644 --- a/apps/server/CHANGELOG.md +++ b/apps/server/CHANGELOG.md @@ -1,5 +1,11 @@ # server +## 1.0.52 + +### Patch Changes + +- @evolu/server@7.0.4 + ## 1.0.51 ### Patch Changes diff --git a/apps/server/package.json b/apps/server/package.json index 122ed4728..1b8cbe8f6 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -1,6 +1,6 @@ { "name": "server", - "version": "1.0.51", + "version": "1.0.52", "private": true, "type": "module", "scripts": { diff --git a/apps/web/CHANGELOG.md b/apps/web/CHANGELOG.md index 83cd7ac7f..7ee4a36b0 100644 --- a/apps/web/CHANGELOG.md +++ b/apps/web/CHANGELOG.md @@ -1,5 +1,13 @@ # web +## 1.0.52 + +### Patch Changes + +- Updated dependencies [79a6d0c] + - @evolu/common@5.1.0 + - @evolu/react@8.0.1 + ## 1.0.51 ### Patch Changes diff --git a/apps/web/package.json b/apps/web/package.json index 59407c7c7..246290044 100644 --- a/apps/web/package.json +++ b/apps/web/package.json @@ -1,6 +1,6 @@ { "name": "web", - "version": "1.0.51", + "version": "1.0.52", "private": true, "scripts": { "dev": "next dev", diff --git a/packages/evolu-common-react/package.json b/packages/evolu-common-react/package.json index 68ed5c58c..126ce4d83 100644 --- a/packages/evolu-common-react/package.json +++ b/packages/evolu-common-react/package.json @@ -49,7 +49,7 @@ "vitest": "^1.6.0" }, "peerDependencies": { - "@evolu/common": "^5.0.3", + "@evolu/common": "^5.1.0", "react": "^18.2.0" }, "publishConfig": { diff --git a/packages/evolu-common-web/package.json b/packages/evolu-common-web/package.json index 286af3273..2a6e59bf6 100644 --- a/packages/evolu-common-web/package.json +++ b/packages/evolu-common-web/package.json @@ -46,7 +46,7 @@ "vitest": "^1.6.0" }, "peerDependencies": { - "@evolu/common": "^5.0.3", + "@evolu/common": "^5.1.0", "@sqlite.org/sqlite-wasm": "3.45.1-build1" }, "publishConfig": { diff --git a/packages/evolu-common/CHANGELOG.md b/packages/evolu-common/CHANGELOG.md index 27ec679e5..6b320a81b 100644 --- a/packages/evolu-common/CHANGELOG.md +++ b/packages/evolu-common/CHANGELOG.md @@ -1,5 +1,31 @@ # @evolu/common +## 5.1.0 + +### Minor Changes + +- 79a6d0c: Time Travel + + Evolu does not delete data; it only marks them as deleted. This is because local-first is a distributed system. There is no central authority (if there is, it's not local-first). Imagine you delete data on some disconnected device and update it on another. Should we throw away changes? Such a deletion would require additional logic to enforce data deletion on all devices forever, even in the future, when some outdated device syncs. It's possible (and planned for Evolu), but it's not trivial because every device has to track data to be rejected without knowing the data itself (for security reasons). + + Not deleting data allows Evolu to provide a time-traveling feature. All data, even "deleted" or overridden, are stored in the evolu_message table. Here is how we can read such data. + + ```ts + const todoTitleHistory = (id: TodoId) => + evolu.createQuery((db) => + db + .selectFrom("evolu_message") + .select("value") + .where("table", "==", "todo") + .where("row", "==", id) + .where("column", "==", "title") + .$narrowType<{ value: TodoTable["title"] }>() + .orderBy("timestamp", "desc"), + ); + ``` + + Note that this API is not 100% typed, but it's not an issue because Evolu Schema shall be append-only. Once an app is released, we shall not change Schema names and types. We can only add new tables and columns because there is a chance current Schema is already used. + ## 5.0.3 ### Patch Changes diff --git a/packages/evolu-common/package.json b/packages/evolu-common/package.json index 9eaff4d53..49dd768d4 100644 --- a/packages/evolu-common/package.json +++ b/packages/evolu-common/package.json @@ -1,6 +1,6 @@ { "name": "@evolu/common", - "version": "5.0.3", + "version": "5.1.0", "description": "Local-first platform designed for privacy, ease of use, and no vendor lock-in to sync and backup people's lifetime data", "keywords": [ "evolu", diff --git a/packages/evolu-react/package.json b/packages/evolu-react/package.json index 8bd276774..34cc8b39a 100644 --- a/packages/evolu-react/package.json +++ b/packages/evolu-react/package.json @@ -48,7 +48,7 @@ "vitest": "^1.6.0" }, "peerDependencies": { - "@evolu/common": "^5.0.3", + "@evolu/common": "^5.1.0", "@evolu/common-react": "^8.0.3", "@evolu/common-web": "^8.0.1", "react-dom": "^18.2.0" diff --git a/packages/evolu-server/CHANGELOG.md b/packages/evolu-server/CHANGELOG.md index cb3264089..af28d0ccf 100644 --- a/packages/evolu-server/CHANGELOG.md +++ b/packages/evolu-server/CHANGELOG.md @@ -1,5 +1,12 @@ # @evolu/server +## 7.0.4 + +### Patch Changes + +- Updated dependencies [79a6d0c] + - @evolu/common@5.1.0 + ## 7.0.3 ### Patch Changes diff --git a/packages/evolu-server/package.json b/packages/evolu-server/package.json index f8dff4840..100979d31 100644 --- a/packages/evolu-server/package.json +++ b/packages/evolu-server/package.json @@ -1,6 +1,6 @@ { "name": "@evolu/server", - "version": "7.0.3", + "version": "7.0.4", "description": "Node.js server for Evolu", "author": "Daniel Steigerwald ", "license": "MIT", @@ -48,7 +48,7 @@ "vitest": "^1.6.0" }, "peerDependencies": { - "@evolu/common": "^5.0.3", + "@evolu/common": "^5.1.0", "express": "^4.19.2" }, "publishConfig": {