WatermelonDB v0.21 Release Notes
Release Date: 2021-03-24 // over 1 year ago-
๐ฅ BREAKING CHANGES
- โ [LokiJS]
useWebWorker
anduseIncrementalIndexedDB
options are now required (previously, skipping them would only trigger a warning)
๐ New features
- โก๏ธ [Model]
Model.update
method now returns updated record - ๐ฒ [adapters]
onSetUpError: Error => void
option is added to bothSQLiteAdapter
andLokiJSAdapter
. Supply this option to catch initialization errors and offer the user to reload or log out - [LokiJS] new
extraLokiOptions
andextraIncrementalIDBOptions
options - ๐ [Android] Autolinking is now supported.
- If You upgrade to
<= v0.21.0
AND are on a version of React Native which supports Autolinking, you will need to remove the config manually linking WatermelonDB. - You can resolve this issue by REMOVING the lines of config from your project which are added in the
Manual Install ONLY
section of the Android Install docs.
- If You upgrade to
๐ Performance
- ๐ [LokiJS] Improved performance of launching the app
๐ Changes
- ๐ [LokiJS]
useWebWorker: true
anduseIncrementalIndexedDB: false
options are now deprecated. If you rely on these features, please file an issue! - ๐ [Sync] Optional
log
passed to sync now has more helpful diagnostic information - ๐ [Sync] Open-sourced a simple SyncLogger you can optionally use. See docs for more info.
- ๐ [SQLiteAdapter]
synchronous:true
option is now deprecated and will be replaced withexperimentalUseJSI: true
in the future. Please test if your app compiles and works well withexperimentalUseJSI: true
, and if not - file an issue! - 0๏ธโฃ [LokiJS] Changed default autosave interval from 250 to 500ms
- [Typescript] Add
experimentalNestedJoin
definition andunsafeSqlExpr
clause
๐ Fixes
- ๐ [LokiJS] Fixed a case where IndexedDB could get corrupted over time
- [Resilience] Added extra diagnostics for when you encounter the
Record ID aa#bb was sent over the bridge, but it's not cached
error and a recovery path (LokiJSAdapter-only). Please file an issue if you encounter this issue! - ๐ [Typescript] Fixed type on OnFunction to accept
and
in join - ๐ [Typescript] Fixed type
database#batch(records)
's argumentrecords
to accept mixed types
Internal
- โ Added an experimental mode where a broken database state is detected, further mutations prevented, and the user notified
- โ [LokiJS]