Realm JavaScript v10.12.0
Notes
This release adds beta support for flexible sync. See the backend and SDK documentation for more information. Please report any issues with the beta through Github.
Please note the following API changes from the 10.12.0-beta.1
release of Flexible Sync:
Realm.getSubscriptions()
is nowRealm.subscriptions
Subscriptions
has been renamed toSubscriptionSet
, andMutableSubscriptions
toMutableSubscriptionSet
SubscriptionSet.snaphot()
has been removed, in favour of allowing aSubscriptionSet
to be accessed as an arraySubscriptionSet.find()
has been renamed toSubscriptionSet.findByQuery()
to avoid a naming confict with theArray.find
methodSubscriptionSet.empty
has been renamed toSubscriptionSet.isEmpty
- The result of
Realm.subscriptions.update
can beawait
ed to avoid a separate call towaitForSynchronization
- The spelling of
SubscriptionState.Superceded
was corrected toSubscriptionState.Superseded
Enhancements
- Support arithmetic operations (+, -, *, /) in queries. Operands can be properties and/or constants of numeric types (
int
,float
,double
orDecimal128
). You can now say something like(age + 5) * 2 > child.age
. Realm.writeCopyTo()
now supports creating snapshots of synced Realms, thus allowing apps to be shipped with partially-populated synced databases. (#3782- Added beta support for flexible sync (#4220).
Fixed
- Opening a Realm with a schema that has an orphaned embedded object type performed an extra empty write transaction. (realm/realm-core#5115, since v10.5.0)
- Schema validation was missing for embedded objects in sets, resulting in an unhelpful error being thrown if the user attempted to define one. (realm/realm-core#5115)
- Fixed a crash when closing an Electron app with a custom sync error handler (#4150
Compatibility
- Removed
deprecated-react-native-listview
from root package.json - MongoDB Realm Cloud.
- Realm Studio v11.0.0.
- APIs are backwards compatible with all previous releases of Realm JavaScript in the 10.5.x series.
- File format: generates Realms with format v22 (reads and upgrades file format v5 or later for non-synced Realm, upgrades file format v10 or later for synced Realms).
Internal
- Upgraded Realm Core from v11.7.0 to v11.8.0. (#4207)
- Removed
.dir-locals.el
. Please configure Emacs to useclang-format
e.g. https://github.com/SavchenkoValeriy/emacs-clang-format-plus. - Enabled
strictNullChecks
for integration tests - Updated release instructions