datum 0.0.9
datum: ^0.0.9 copied to clipboard
A powerful, offline-first data synchronization engine for Flutter and Dart, featuring relational data support, real-time queries, and intelligent conflict resolution.
0.0.9 #
β¨ Features #
Core #
- Implement Sync Request Strategies: Introduced a new system to control how concurrent calls to the
synchronizemethod are handled, preventing race conditions and improving data consistency.- Added
DatumSyncRequestStrategyas the base for defining execution behavior. - Implemented
SequentialRequestStrategyto queue and process allsynchronizecalls in the order they are received. This is the new default behavior. - Implemented
SkipConcurrentStrategyas an alternative strategy to ignore newsynchronizecalls if a sync is already in progress. - Added
syncRequestStrategytoDatumConfigto allow global configuration of this behavior. - Added an
isSyncinggetter toDatumSyncEngineto check the current sync status.
- Added
π Bug Fixes #
Build #
- Correct Conditional Imports: Fixed conditional imports to ensure compatibility across both
dart:ioanddart:htmlenvironments.
0.0.8 #
- fix conditional import for web and io
0.0.7 #
π Bug Fixes #
- π Isolate Error Handling & Web Compatibility:
- Ensured errors during isolate operations are properly caught and sent back to the main thread.
- Enhanced web compatibility by using
computefunction for isolate operations. - Removed unnecessary newline at end of file for consistency.
- Removed unused import in
supabase_security_dialog.dart.
0.0.6 #
π Features #
- π Isolate Sync Strategy: Introduced a new
IsolateStrategythat runs data synchronization in a background isolate for improved performance and UI responsiveness. This includes platform-specific runners for both mobile/desktop (dart:io) and web (dart:html) via conditional imports, ensuring broad platform support. - β¨ Sealed Class Migration: Migrated
DatumEntityandRelationalDatumEntityto aDatumEntityBasesealed class for enhanced type safety and to remove the need forsampleInstance. - π New Facade Methods: Added a suite of new methods to the global
Datumfacade for easier data interaction:- Reactive Watching:
watchAll,watchById,watchQuery,watchRelated. - One-time Fetching:
query,fetchRelated. - Data & Sync Management:
getPendingCount,getPendingOperations,getStorageSize,watchStorageSize,getLastSyncResult,checkHealth. - Sync Control:
pauseSync,resumeSync.
- Reactive Watching:
β Tests #
- π§ͺ Enhanced Core Tests: Added test cases for uninitialized state errors,
statusForUser,allHealths, and relational method behavior. Introduced aCustomManagerConfigfor easier mock manager injection in tests.
β»οΈ Refactors & π§Ή Chores #
- β»οΈ Isolate Helper Improvements:
- Replaced conditional imports with platform-specific implementations.
- Removed
isolate_helper.dartandisolate_helper_unsupported.dart. - Added
_isolate_helper_io.dartfor IO platforms. - Updated
_isolate_helper_web.dartto use synchronous JSON encoding. - Updated
datum_sync_engine.dartto use the new isolate helper. - Removed unused imports in
test.dart,adapter_test.dart,relational_data_test.dart,relational_data_integration_test.dart,mock_adapters.dart, andtest_entity.dart. - Updated
isolate_helper_test.dartto use the new isolate helper.
- ποΈ Removed
sampleInstance: ThesampleInstanceproperty onLocalAdapteris no longer needed due to the sealed class migration and has been removed. - π©Ί Renamed
AdapterHealthStatus.oktoAdapterHealthStatus.healthyfor better clarity. - π¦ Refactored internal imports to use the
datumpackage consistently. - βοΈ Made
MigrationExecutorgeneric to improve type safety during migrations. - πΊοΈ Added
DataSourceenum to explicitly specify the source for query operations.
0.0.5 #
- Add docs link
0.0.4 #
Features #
- Added support for funding and contributions.
Documentation #
- Added
CONTRIBUTING.mdandCODE_OF_CONDUCT.md. - Updated
README.mdwith funding and contribution sections. - Updated
README.mdto mention future support for multiple adapters for a single entity.
Chores #
- β¨ chore(analysis): apply linter and formatter rules
- enable recommended linter rules for code quality
- set formatter rules for consistent code style
- ignore non_constant_identifier_names error
0.0.3 #
-
π docs(readme): enhance architecture diagrams in README
-
update architecture diagrams for better clarity
-
improve image display using
tag for alignment
0.0.2 #
- Update readme to add images correctly
0.0.1 #
- Initial release π