chore: Prepare 0.0.6 for Serverpod 4.0.0 (#129)

This commit is contained in:
Marcelo Mendonça Soares 2026-09-14 17:06:48 -03:00 • committed by GitHub
commit 27d875ee39
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
10 changed files with 57 additions and 43 deletions

View file

@ -1,11 +1,32 @@
## Unreleased
## 0.0.6
- refactor: BREAKING. Rename integration and synchronization APIs to `OfflineSync*`
and ownership scopes to spaces, including `spaceId`, `session.offlineSync`,
`client.offlineSync`, and `session.offlineSync.spaces`.
- refactor: Rename the synchronization endpoint, serialized events, and space
metadata tables. Regenerate server/client code with the matching Serverpod CLI
and apply the corresponding database migrations.
- refactor: BREAKING. Rename integration APIs and ownership scopes:
- Rename `CrdtDatabase*` wrappers to `OfflineSyncDatabase*`.
- Rename `CrdtSync` to `OfflineSyncEngine` and `CrdtSyncSession` to
`OfflineSyncSubscription`.
- Access sync through `.offlineSync` and `.offlineSyncDb` instead of
`.crdt` and `.crdtDb`.
- Replace `CrdtScope*` models and services with `OfflineSyncSpace*`
- Change access to shared spaces through `.spaces` instead of `.scopes`.
- Use `spaceId` in models and indexes, and `offline_sync_spaces` in
ownership relations.
- Initialize with `initializeOfflineSync` and use `offlineSyncDatabaseInterceptor`.
- Import client helpers from `offline_sync.dart` instead of `crdt.dart`.
- Rename the synchronization endpoint, serialized events, and space metadata
tables.
- fix: Recompute `onDelete=SetDefault` repairs when default targets are
inserted, deleted, restored, or hidden to preserve authored values.
- fix: Reject local deletes atomically when a needed `SetDefault` target is
missing, hidden, owned by another space, or deleted in the same batch.
- fix: Preserve projection-selected nulls during inserts instead of reapplying
column defaults, and apply fixed UUID foreign-key defaults in local upserts.
- fix: Resolve composite unique conflicts when only a fixed discriminator
column changes.
- perf: Avoid redundant foreign-key projection for ordinary local writes and
primary-key upserts, and batch dependency checks and field-clock writes.
- perf: Overlap independent membership reads and skip unnecessary space lookups
for untracked tables.
- chore: Update Serverpod to `4.0.0` and use the published CLI.
## 0.0.5

View file

@ -100,18 +100,18 @@ Add the packages to the server and client `pubspec.yaml` files.
```yaml
# your_project_client/pubspec.yaml
dependencies:
serverpod_offline_sync_client: 0.0.4
```0.0.5
serverpod_offline_sync_client: 0.0.6
```
```yaml
# your_project_server/pubspec.yaml
dependencies:
serverpod_offline_sync_server: 0.0.4
```0.0.5
serverpod_offline_sync_server: 0.0.6
```
> [!NOTE]
> Version `0.0.4` requires Serverpod `4.0.0-rc.2`.
0.0.5
> Version `0.0.6` requires Serverpod `4.0.0`.
After adding the dependencies, list the `serverpod_offline_sync` module on the
`generator.yaml` file and enable the experimental `database: sync` option:

View file

@ -11,7 +11,7 @@ dependencies:
benchmark_harness: ^2.4.0
intl: ^0.20.2
path: ^1.9.1
serverpod_database: 4.0.0-rc.2
serverpod_database: 4.0.0
serverpod_offline_sync:
path: ../packages/serverpod_offline_sync
serverpod_offline_sync_server:

View file

@ -16,7 +16,7 @@ dependencies:
http: ^1.5.0
path: ^1.9.1
path_provider: ^2.1.5
serverpod_database: 4.0.0-rc.2
serverpod_database: 4.0.0
serverpod_offline_sync_client:
path: ../../packages/serverpod_offline_sync_client
serverpod_offline_sync_test_client:

View file

@ -1,5 +1,5 @@
name: serverpod_offline_sync
version: 0.0.5
version: 0.0.6
description: Shared package for the Serverpod Offline Sync project.
homepage: https://github.com/marcelomendoncasoares/serverpod_offline_sync
@ -11,8 +11,8 @@ resolution: workspace
dependencies:
clock: ^1.1.2
meta: ^1.18.0
serverpod_database: 4.0.0-rc.2
serverpod_serialization: 4.0.0-rc.2
serverpod_database: 4.0.0
serverpod_serialization: 4.0.0
uuid: ^4.5.3
dev_dependencies:

View file

@ -1,5 +1,5 @@
name: serverpod_offline_sync_client
version: 0.0.5
version: 0.0.6
description: Client transport adapter for the Serverpod Offline Sync project.
homepage: https://github.com/marcelomendoncasoares/serverpod_offline_sync
@ -9,9 +9,9 @@ environment:
resolution: workspace
dependencies:
serverpod_client: 4.0.0-rc.2
serverpod_database: 4.0.0-rc.2
serverpod_offline_sync: 0.0.5
serverpod_client: 4.0.0
serverpod_database: 4.0.0
serverpod_offline_sync: 0.0.6
dev_dependencies:
lints: '>=3.0.0 <7.0.0'

View file

@ -1,5 +1,5 @@
name: serverpod_offline_sync_server
version: 0.0.5
version: 0.0.6
description: Server module for the Serverpod Offline Sync project.
homepage: https://github.com/marcelomendoncasoares/serverpod_offline_sync
@ -10,11 +10,11 @@ resolution: workspace
dependencies:
meta: ^1.16.0
serverpod: 4.0.0-rc.2
serverpod_database: 4.0.0-rc.2
serverpod_offline_sync: 0.0.5
serverpod: 4.0.0
serverpod_database: 4.0.0
serverpod_offline_sync: 0.0.6
dev_dependencies:
lints: '>=3.0.0 <7.0.0'
serverpod_test: 4.0.0-rc.2
serverpod_test: 4.0.0
test: ^1.25.5

View file

@ -14,14 +14,7 @@ workspace:
dev_dependencies:
melos: ^7.5.1
serverpod_cli: 4.0.0-rc.2
dependency_overrides:
serverpod_cli:
git:
url: https://github.com/serverpod/serverpod.git
path: tools/serverpod_cli
ref: 3e9ccff494c4fd2b190d013aa74bd93a619358e4
serverpod_cli: 4.0.0
# dependency_overrides:
# serverpod:

View file

@ -8,8 +8,8 @@ environment:
resolution: workspace
dependencies:
serverpod_auth_core_client: 4.0.0-rc.2
serverpod_client: 4.0.0-rc.2
serverpod_database: 4.0.0-rc.2
serverpod_auth_core_client: 4.0.0
serverpod_client: 4.0.0
serverpod_database: 4.0.0
serverpod_offline_sync_client:
path: ../../packages/serverpod_offline_sync_client

View file

@ -8,8 +8,8 @@ environment:
resolution: workspace
dependencies:
serverpod: 4.0.0-rc.2
serverpod_auth_core_server: 4.0.0-rc.2
serverpod: 4.0.0
serverpod_auth_core_server: 4.0.0
serverpod_offline_sync:
path: ../../packages/serverpod_offline_sync
serverpod_offline_sync_server:
@ -19,12 +19,12 @@ dev_dependencies:
clock: ^1.1.2
lints: '>=3.0.0 <7.0.0'
path: ^1.9.1
serverpod_database: 4.0.0-rc.2
serverpod_database: 4.0.0
serverpod_offline_sync_client:
path: ../../packages/serverpod_offline_sync_client
serverpod_offline_sync_test_client:
path: ../serverpod_offline_sync_test_client
serverpod_test: 4.0.0-rc.2
serverpod_test: 4.0.0
test: ^1.25.5
uuid: ^4.5.3