Realm JavaScript V10.0.0 Released

Learn more about the Realm SDKs 10.0 Release on our Developer Hub HERE

NOTE: This is a unified release note covering all v10.0.0-alpha.X and v10.0.0-beta.X releases.

NOTE: Support for syncing with realm.cloud.io and/or Realm Object Server has been replaced with support for syncing with MongoDB Realm Cloud.

NOTE: This version uses the Realm file format version 20. It is not possible to downgrade to earlier versions than v10.0.0-beta.13. Non-sync Realms will be upgraded automatically. Synced Realms can only be automatically upgraded if created with Realm JavaScript v10.0.0-beta.1 and above.

NOTE: Deprecated methods have been removed.

Breaking changes

  • Realm.Sync.User has been replaced by Realm.User .
  • Realm.Sync.Adapter , Realm.Sync.addlistener() , Realm.Sync.localListenerRealms() , Realm.Sync.removeAllListeners() and Realm.Sync.removeListener() have been removed. (#2732)
  • Query-based Sync has been removed. This includes Realm.Sync.Subscription , Realm.Results.subscribe() , Realm.subscriptions() , Realm.unsubscribe() , Realm.privileges() . These APIs are not initially supported by MongoDB Realm. They will be re-introduced in a future release. partitionValue has been added to the sync configuration as a replacement. Please read section “Partition Atlas Data into Realms” in documentation for further information.
  • Permissions has been removed. You need to configure permissions through MongoDB Realm.
  • Deprepated API has been removed: Realm.openAsync() , Realm.Sync.setFeatureToken() , Realm.Sync.User.register() , Realm.Sync.User.registerWithProvider() , Realm.Sync.User.authenticate() , Realm.automaticSyncConfiguration() .
  • Renamed configuration option custom_http_headers to customHttpHeaders .
  • Renamed Realm.Sync to Realm.App.Sync including all methods and properties.

Enhancements

  • Added support for compiling on a RaspberryPi. (#2798
  • Added support for the Decimal128 data type. (#2674)
  • Added support for the ObjectId data type. (#2675)
  • Added support for embedded objects. (#2676)
  • Added Realm.App with the following methods: getApp() , logIn() , switchUser() , and removeUser() and properties id , emailPasswordAuth , currentUser , allUsers . A Realm.App instance represents a MongoDB Realm app. (#2750 and #2809)
  • Added Realm.Credentials which represents credentials for MongoDB Realm users. It has the following methods: emailPassword() , facebook , anonymous() , apple() , google() , jwt() , and function() . You must enable the credentials validation (authentication providers) at MongoDB Realm before deploying your app. (#2750 and #2809)
  • Added auth providers Realm.Auth.EmailPassword and Realm.Auth.APIKeys . (#2750 and #2809)
  • Added support for customData readonly property to Realm.User objects. (#2809)
  • Added support for calling server functions from Realm.User objects. (#2809)
  • Added MongoClient and Push functionality to Realm.User .
  • Added watch() to MongoDBCollection to enable streaming notifications of changes events from the database. Only supported in node.js for now.
  • TS declarations with stricter TS validation of input-models and return-types for create<T>(...) , objects<T>(...) & objectForPrimaryKey<T>(...) . (#3044 & #3266)

Fixed

  • Realm.login() will not run after hot reloading in RN. (#3236, since v10.0.0-beta.12)

Compatibility

  • MongoDB Realm Cloud.
  • APIs are backwards compatible with all previous releases of Realm JavaScript in the 10.x.y series.
  • File format: generates Realms with format v20 (reads and upgrades file format v5 or later for non-synced Realm, upgrades file format v10 for synced Realms).

Update - Realm JavaScript v10.0.1

Fixed

  • Fixed RN Android error: couldn’t find DSO to load: librealmreact.so caused by: dlopen failed: cannot locate symbol. (#3347, since v10.0.0)
  • Fixed TS declaration for app.allUsers to Record<string, User> instead of an array of User. (#3346)