Skip to content

Commit 03f7f9a

Browse files
committed
Merge upstream to dev
2 parents 98e69d5 + ce6b62e commit 03f7f9a

109 files changed

Lines changed: 8649 additions & 5080 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.changeset/blue-lions-tease.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
"@evolu/common": patch
3+
---
4+
5+
Non-initiator always responds in sync protocol for completion feedback
6+
7+
The non-initiator (relay/server) now always responds to sync requests, even when there's no data to send, by returning an empty message (19 bytes). This enables reliable sync completion detection for initiators (clients).

.changeset/easy-radios-decide.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@evolu/react": patch
3+
---
4+
5+
Fix comment

.changeset/hot-peas-own.md

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
---
2+
"@evolu/common": patch
3+
---
4+
5+
# Owners refactor and external AppOwner support
6+
7+
## 🚀 Features
8+
9+
- **External AppOwner Support**: `AppOwner` can now be created from external keys without sharing the mnemonic with the Evolu app. The `mnemonic` property is now optional, allowing for better security when integrating with external authentication systems.
10+
11+
- **New Config Option**: Added `initialAppOwner` configuration option to specify a pre-existing AppOwner when creating an Evolu instance, replacing the previous `mnemonic` option for better encapsulation.
12+
13+
## 🔄 Breaking Changes
14+
15+
- **Owner API Redesign**: Complete refactor of the Owner system with cleaner, more focused interfaces:
16+
- Simplified `Owner` interface with only essential properties (`id`, `encryptionKey`, `writeKey`)
17+
- Removed temporal properties (`createdAt`, `timestamp`) from core Owner interface
18+
- Eliminated complex `OwnerRow` and `OwnerWithWriteAccess` types
19+
20+
- **Database Schema Changes**:
21+
- Replaced `evolu_owner` table with streamlined `evolu_config` table
22+
- New `evolu_version` table for protocol versioning
23+
- Simplified storage of AppOwner data in single config row
24+
25+
- **Configuration Changes**:
26+
- `Config.mnemonic` replaced with `Config.initialAppOwner`
27+
- More explicit control over owner initialization
28+
29+
## ✨ Improvements
30+
31+
- **Enhanced Documentation**: Comprehensive JSDoc with clear explanations of owner types, use cases, and examples
32+
- **Clock Management**: New internal clock system for better timestamp handling
33+
- **Test Coverage**: Extensive test suite covering all owner types and edge cases
34+
35+
## 🔧 Internal Changes
36+
37+
- **Database Initialization**: Refactored database setup to use new schema with better separation of concerns
38+
- **Protocol Updates**: Updated to protocol version 0 with new storage format

.changeset/major-insects-cough.md

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
---
2+
"@evolu/common": patch
3+
---
4+
5+
Replace initialData with onInit callback
6+
7+
- Remove `initialData` function from Config interface
8+
- Add `onInit` callback with `isFirst` parameter for one-time initialization
9+
- Simplify database initialization by removing pre-init data handling
10+
- Provide better control over initialization lifecycle

.changeset/plenty-lemons-march.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@evolu/web": patch
3+
---
4+
5+
Update SQLite and export createWasmSqliteDriver

.changeset/pre.json

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,22 +19,35 @@
1919
"@evolu/web": "1.0.0"
2020
},
2121
"changesets": [
22+
"blue-lions-tease",
2223
"cute-breads-count",
2324
"dry-cobras-listen",
2425
"dull-poets-wash",
26+
"easy-radios-decide",
2527
"fast-peas-laugh",
2628
"heavy-parts-own",
29+
"hot-peas-own",
30+
"major-insects-cough",
2731
"mean-rats-start",
2832
"modern-zebras-clean",
2933
"ninety-rockets-listen",
3034
"plenty-carrots-lead",
35+
"plenty-lemons-march",
36+
"rich-garlics-sort",
3137
"rotten-gifts-write",
3238
"seven-cups-stand",
39+
"shy-bats-carry",
40+
"slick-comics-give",
3341
"slow-lemons-go",
42+
"small-lights-go",
3443
"small-years-visit",
3544
"solid-cameras-study",
45+
"some-rice-do",
3646
"tall-hands-swim",
47+
"tiny-clowns-worry",
3748
"true-teams-wash",
38-
"twenty-friends-bake"
49+
"twenty-friends-bake",
50+
"two-shrimps-yawn",
51+
"yummy-cups-drop"
3952
]
4053
}

.changeset/rich-garlics-sort.md

Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
---
2+
"@evolu/common": patch
3+
---
4+
5+
Improve createdAt handling in mutations
6+
7+
This release enhances the handling of the `createdAt` column in Evolu mutations, providing more flexibility for data migrations and external system integrations while maintaining distributed system semantics.
8+
9+
### Changes
10+
11+
**createdAt Behavior:**
12+
13+
- `insert`: Always sets `createdAt` to current timestamp
14+
- `upsert`: Sets `createdAt` to current timestamp if not provided, or uses custom value if specified
15+
- `update`: Never sets `createdAt` (unchanged behavior)
16+
17+
**Documentation Improvements:**
18+
19+
- Updated JSDoc for `DefaultColumns` with clear explanations of each column's behavior
20+
- Clarified that `updatedAt` is always set by Evolu and derived from CrdtMessage timestamp
21+
- Added guidance for using custom timestamp columns when deferring sync for privacy
22+
- Enhanced mutation method documentation with practical examples
23+
24+
### Example
25+
26+
```ts
27+
evolu.upsert("todo", {
28+
id: externalId,
29+
title: "Migrated todo",
30+
createdAt: new Date("2023-01-01"), // Preserve original timestamp
31+
});
32+
```

.changeset/shy-bats-carry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@evolu/web": patch
3+
---
4+
5+
Update @sqlite.org/sqlite-wasm to 3.50.3-build1

.changeset/slick-comics-give.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@evolu/nodejs": patch
3+
---
4+
5+
Remove versioned database naming from relay

.changeset/small-lights-go.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@evolu/common": patch
3+
---
4+
5+
Add deriveSlip21Node

0 commit comments

Comments
 (0)