Releases: evoluhq/evolu
@evolu/common-web@8.2.0
@evolu/common-react@8.1.0
@evolu/server@7.1.0
@evolu/common@5.3.0
@evolu/server@7.0.13
Patch Changes
- Updated dependencies [91298f3]
- @evolu/common@5.2.3
@evolu/common@5.2.3
Patch Changes
- 91298f3: @effect/platform 0.58
@evolu/react-native@11.0.0
Major Changes
- 49b1170: fix for react-native-web
@evolu/server@7.0.12
Patch Changes
- Updated dependencies [08758d8]
- @evolu/common@5.2.2
@evolu/react-native@10.1.1
@evolu/react-native
10.1.0
Minor Changes
-
e420fec: New API for working with Evolu instances
The functions
resetOwner
andrestoreOwner
automatically reload the app to ensure no user data remains in memory. The new optionreload
allows us to opt out of this default behavior. For that reason, both functions return a promise that can be used to provide custom UX. There is also a newreloadApp
function to reload the app in a platform-specific way (e.g., browsers will reload all tabs with Evolu instances).The
createEvolu
function has a new option,mnemonic
. This option is useful for Evolu multitenancy when creating an Evolu instance with a predefined mnemonic. To create a mnemonic, use the newcreateMnemonic
function.
Patch Changes
- @evolu/common-react@8.0.5
10.0.2
Patch Changes
10.0.1
Patch Changes
10.0.0
Major Changes
- 2d8f5bc: Expo 51
9.0.1
Patch Changes
9.0.0
Major Changes
-
d156e67: Multitenancy, stable Effect, refactoring, logging
Greetings. I spent the last few weeks refactoring Evolu. There are no breaking changes except for one function name. It's a major change because with such a significant refactoring, I can't be 100 % sure I didn't break anything. The core logic remains unchanged, but Evolu uses the Effect library better. When Evolu started with Effect, the website didn't exist yet.
The initial reason for refactoring Evolu was that I wasn't satisfied with the Web Workers wrapper. I tried Comlink. It's a great library, but it has flaws, as documented in a new ProxyWorker, a lightweight Comlink tailored for Effect. While Effect provides an excellent wrapper for workers, I wanted to try a Comlink-like API. Such a change was a chance to review how Evolu uses Effect, and I realized I used too many Layers for no reason.
During refactoring, I realized it would be nice if Evolu could run more instances concurrently. So, Evolu now supports multitenancy 🙂.
I wasn't satisfied with the initial data definition, so I added an API for that, too. And logging. If you are curious about what's happening within Evolu, try the new
minimumLogLevel
Config option. There are also a few minor improvements inside the core logic. Again, there are no breaking changes; it is just better and more readable source code.The great news is that Effect is stable now, so there will be no more releases with deps updates. Let's dance 🪩
New features:
- Multitenancy (we can run more Evolu instances side by side)
- Initial data (to define fixtures)
- Logging (you can see what's happening inside Evolu step by step)
- Faster and safer DB access (we use shared transactions for reads and special "last" transaction mode for resetting)
- Stable Effect 🎉
Patch Changes
- Updated dependencies [d156e67]
- @evolu/common-react@8.0.0
8.0.1
Patch Changes
8.0.0
Patch Changes
- @evolu/common-react@7.0.0
7.1.1
Patch Changes
-
6e61bb9: Update Effect and Schema
Rename
Schema.To
toSchema.Type
.All Effect Schema changes are here.
-
Updated dependencies [6e61bb9]
- @evolu/common-react@6.0.3
7.1.0
Minor Changes
- d3f1ac4: Update peer dependencies: expo, expo-sqlite
Patch Changes
- Updated dependencies [1f9168f]
- @evolu/common-react@6.0.2
7.0.1
Patch Changes
-
aa06cbe: Allow using Kysely
with
andwithRecursive
And throw on forbidden SQL mutations.
- @evolu/common-react@6.0.0
7.0.0
Major Changes
-
a5011e2: The new SQLite database filename
It's configurable by the Config name property now.
Patch Changes
- 01d2554: Update peer dependencies
- Updated dependencies [8175b6f]
- Updated dependencies [01d2554]
- @evolu/common-react@6.0.0
6.0.2
Patch Changes
6.0.1
Patch Changes
6.0.0
Major Changes
-
888b83e: Expo 50 with expo-sqlite/next
Now everything works as expected.
Patch Changes
- Updated dependencies [888b83e]
- @evolu/common-react@5.0.5
5.0.5
Patch Changes
5.0.4
Patch Changes
5.0.3
Patch Changes
5.0.2
Patch Changes
-
106462c: Update Effect and Schema
Note API change: https://github.com/Effect-TS/effect/releases/tag/effect%402.3.0
-
Updated dependencies [106462c]
- @evolu/common-react@5.0.2
5.0.1
Patch Changes
5.0.0
Patch Changes
- @evolu/common-react@5.0.0
4.0.5
Patch Changes
- 621f3a3: Update deps: Effect, Schema, sqlite-wasm, nanoid, better-sqlite3
- Updated dependencies [621f3a3]
- @evolu/common-react@4.0.5
4.0.4
Patch Changes
4.0.3
Patch Changes
4.0.2
Patch Changes
-
047b92e: Update Kysely to 0.27.0
Check Kysely release
Note simplified
$narrowType
usage. Previous:.$narrowType<{ title: NonEmptyString1000 }>()
Simplified:
.$narrowType<{ title: NotNull }>()
-
Updated dependencies [047b92e]
- @evolu/common-react@4.0.2
4.0.1
Patch Changes
-
a2068f2: Use namespace imports
Namespace imports make dev faster and build smaller for bundlers without three shaking.
-
Updated dependencies [a2068f2]
- @evolu/common-react@4.0.1
4.0.0
Patch Changes
- @evolu/common-react@4.0.0
3.0.4
Patch Changes
- eb819cb: Rename Schema to DatabaseSchema
- Updated dependencies [eb819cb]
- Updated dependencies [d506312]
- @evolu/common-react@3.0.2
3.0.3
Patch Changes
- 25d345d: Update deps
3.0.2
Patch Changes
- 7adfb47: Update peer deps
3.0.1
Patch Changes
- 07fd60d: Add docs for local-only tables
3.0.0
Patch Changes
- Updated dependencies [1eef638]
- @evolu/common-react@3.0.0
2.0.1
Patch Changes
2.0.0
Major Changes
-
7e80483: New API
With the upcoming React 19
use
Hook, I took a chance to review and improve the Evolu API. I moved as many logic and types as possible to the Evolu interface to make platform variants more lightweight and to allow the use of Evolu directly out of any UI library.The most significant change is the split of SQL query declaration and usage. The rest of the API is almost identical except for minor improvements and one removal: filterMap helper is gone.
It was a good idea with a nice DX, but such ad-hoc migrations belong in the database, not the JavaScript code. Filtering already loaded data pulls excessive data that should stay in the database. The good news is we can do that and even better with Kysely.
To refresh what we are talking about for Evolu newcomers. Because database schema is evolving, and we can't do classical migrations in local-first apps (because we don't delete and other CRDT stuff), Evolu adopted GraphQL schema-less everything-is-nullable pattern.
Having nullable everywhere in code is not ideal DX, so it would be nice to filter, ensure non-nullability, and even map rows directly in the database. Surprisingly, SQL is capable of that. Expect Evolu DSL for that soon. Meanwhile, we can do that manually:
const todosWithout = evolu.createQuery((db) => db .selectFrom("todo") .select(["id", "title", "isCompleted", "categoryId"]) .where("isDeleted", "is not", Evolu.cast(true)) // Filter null value and ensure non-null type. Evolu will provide a helper. .where("title", "is not", null) .$narrowType<{ title: Evolu.NonEmptyString1000 }>() .orderBy("createdAt"), );
And now to the new API. Behold:
// Create queries. const allTodos = evolu.createQuery((db) => db.selectFrom("todo").selectAll()); const todoById = (id: TodoId) => evolu.createQuery((db) => db.selectFrom("todo").selectAll().where("id", "=", id), ); // We can load a query or many queries. const allTodosPromise = evolu.loadQuery(allTodos).then(({ rows }) => { console.log(rows); }); evolu.loadQueries([allTodos, todoById(1)]); // useQuery can load once or use a promise. const { rows } = useQuery(allTodos); const { rows } = useQuery(allTodos, { once: true }); const { rows } = useQuery(allTodos, { promise: allTodosPromise }); const { row } = useQuery(todoById(1));
I also refactored (read: simplified) the usag...
@evolu/common@5.2.2
Patch Changes
- 08758d8: @effect/schema 0.68