[go: up one dir, main page]

Skip to content

Releases: realm/realm-js

Realm JavaScript v12.5.1

03 Jan 13:23
4ab072c
Compare
Choose a tag to compare

Fixed

  • Accessing the providerType on a UserIdentity via User.identities always yielded undefined. Thanks to @joelowry96 for pinpointing the fix.
  • Bad performance of initial Sync download involving many backlinks. (realm/realm-core#7217, since v10.0.0)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v14.0.0.
  • File format: generates Realms with format v23 (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 v13.25.0 to v13.25.1. (#6335)

Realm JavaScript v12.5.0

19 Dec 18:45
4042711
Compare
Choose a tag to compare

Enhancements

  • Added an optional third keyPaths argument to the addListener methods of Collection and Object. Use this to indicate a lower bound on the changes relevant for the listener. This is a lower bound, since if multiple listeners are added (each with their own "key paths") the union of these key-paths will determine the changes that are considered relevant for all listeners registered on the object or collection. In other words: A listener might fire more than the key-paths specify, if other listeners with different key-paths are present. (#6285)
    // Adding a listener that will fire only on changes to the `location` property (if no other key-path listeners are added to the collection).
    cars.addListener((collection, changes) => {
      console.log("A car location changed");
    }, ["location"]);
  • Exceptions thrown during bootstrap application will now be surfaced to the user via the sync error handler rather than terminating the program with an unhandled exception. (realm/realm-core#7197)

Fixed

  • Exceptions thrown during bootstrap application could crash the sync client with an !m_sess assertion. (realm/realm-core#7196, since v10.18.0)
  • If a SyncSession was explicitly resumed via reconnect() while it was waiting to auto-resume after a non-fatal error and then another non-fatal error was received, the sync client could crash with a !m_try_again_activation_timer assertion. (realm/realm-core#6961, since device sync was introduced)
  • Adding the same callback function as a listener on a Collection or Object used to be undefined behavior. Now it throws, which results in runtime errors that can be resolved by ensuring that the callback is only added once per object. (#6310)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v14.0.0.
  • File format: generates Realms with format v23 (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 v13.24.1 to v13.25.0. (#6324)

Realm JavaScript v12.4.0

13 Dec 14:11
119c6e3
Compare
Choose a tag to compare

Enhancements

  • Exporting a RealmEventName type. (#6300)
  • Automatic client reset recovery now preserves the original division of changesets, rather than combining all unsynchronized changes into a single changeset. (realm/realm-core#7161)
  • Automatic client reset recovery now does a better job of recovering changes when changesets were downloaded from the server after the unuploaded local changes were committed. If the local Realm happened to be fully up to date with the server prior to the client reset, automatic recovery should now always produce exactly the same state as if no client reset was involved. (realm/realm-core#7161)
  • Improved the experience of logging Realm.Object and Realm.Collection objects on Node.js, by providing a custom "inspect" symbol. (#2758)

Fixed

  • When mapTo is used on a property of type List, an error like Property 'test_list' does not exist on 'Task' objects occurs when trying to access the property. (#6268, since v12.0.0)

  • Fixed bug where apps running under JavaScriptCore on Android will terminate with the error message No identifiers allowed directly after numeric literal. (#6194, since v12.2.0)

  • When an object had an embedded object as one of its properties, updating that property to null or undefined did not update the property in the database. (#6280, since v12.0.0)

  • Fixed download of platform + arch specific prebuilt binaries when building an Electron app using electron-builder. (#3828)

  • Fixed deadlock which occurred when accessing the current user from the App from within a callback from the User listener. (realm/realm-core#7183, since v12.2.1)

  • Errors encountered while reapplying local changes for client reset recovery on partition-based sync Realms would result in the client reset attempt not being recorded, possibly resulting in an endless loop of attempting and failing to automatically recover the client reset. Flexible sync and errors from the server after completing the local recovery were handled correctly. (realm/realm-core#7149, since v10.3.0-rc.1)

  • During a client reset with recovery when recovering a move or set operation on a List<Object> or List<Mixed> that operated on indices that were not also added in the recovery, links to an object which had been deleted by another client while offline would be recreated by the recovering client. But the objects of these links would only have the primary key populated and all other fields would be default values. Now, instead of creating these zombie objects, the lists being recovered skip such deleted links. (realm/realm-core#7112 since the beginning of client reset with recovery in v10.18.0)

  • During a client reset recovery a Set of links could be missing items, or an exception could be thrown that prevents recovery e.g., Requested index 1 calling get() on set 'source.collection' when max is 0. (realm/realm-core#7112, since the beginning of client reset with recovery in v10.18.0)

  • Calling sort() or distinct() on a LnkSet that had unresolved links in it would produce duplicate indices. (realm/realm-core#7112, since the beginning of client reset with recovery in v10.18.0)

  • Automatic client reset recovery would duplicate insertions in a list when recovering a write which made an unrecoverable change to a list (i.e. modifying or deleting a pre-existing entry), followed by a subscription change, followed by a write which added an entry to the list. (realm/realm-core#7155, since v10.19.4)

  • Fixed several causes of "decryption failed" exceptions that could happen when opening multiple encrypted Realm files in the same process while using Apple/linux and storing the Realms on an exFAT file system. (realm/realm-core#7156, since v1.0.0)

  • If the very first open of a flexible sync Realm triggered a client reset, the configuration had an initial subscriptions callback, both before and after reset callbacks, and the initial subscription callback began a read transaction without ending it (which is normally going to be the case), opening the frozen Realm for the after reset callback would trigger a BadVersion exception. (realm/realm-core#7161, since v10.19.4)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v14.0.0.
  • File format: generates Realms with format v23 (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 v13.23.4 to v13.24.1. (#6311)

Realm JavaScript v12.3.1

23 Nov 17:02
fca4f76
Compare
Choose a tag to compare

Fixed

  • Fixed FLX subscriptions not being sent to the server if the session was interrupted during bootstrapping. (realm/realm-core#7077, since v10.12.0)
  • Fixed FLX subscriptions not being sent to the server if an upload message was sent immediately after a subscription was committed. (realm/realm-core#7076, since v12.3.0)
  • Fixed application crash with KeyNotFound exception when subscriptions are marked complete after a client reset. (realm/realm-core#7090, since v10.19.0)
  • Fixed a crash at a very specific time during a DiscardLocal client reset on a FLX Realm could leave subscriptions in an invalid state. (realm/realm-core#7110, since v10.19.4)
  • Fixed an error "Invalid schema change (UPLOAD): cannot process AddColumn instruction for non-existent table" when using automatic client reset with recovery in dev mode to recover schema changes made locally while offline. (realm/realm-core#7042)
  • When place an embedded object would create a new object and keep the original object too. (#6239, since v12.0.0)
  • When setting an embedded object in a Realm.List by index, the new object would be inserted at the end rather than replacing the existing object at the given index. (#6239, since v12.0.0)
  • When SyncConfiguration.clientReset was undefined, no client reset mode was set which could lead to an app crash with the message m_mode != ClientResyncMode::Manual. The default mode is now RecoverUnsyncedChanges and no callbacks are defined. (#6260, since v12.0.0)
  • Fixed writing the realm-constants.json file used for analytics / telemetry, which used to cause errors such as Unable to resolve module ../realm-constants.json for users installing the package into a mono-repo. We're now storing this information in the realm/package.json file instead. (#6144, since v12.0.0-rc.2)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v14.0.0.
  • File format: generates Realms with format v23 (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 v13.23.2 to v13.23.4. (#6234 and #6253)

Realm Babel Plugin v0.2.0

20 Nov 15:17
6270dc7
Compare
Choose a tag to compare

Enhancements

  • Support full-text index decorator ()@index("full-text")). Thanks to @atdyer. (#5800)

Realm React v0.6.2

15 Nov 09:26
8f5f85c
Compare
Choose a tag to compare

Fixed

  • Improved type generation, which fixed an issue with the Realm.User return from useUser (#6196)
  • UserProvider will now always return a new user reference on change events. (#6186)
  • Fix useQuery re-render when updating the given type. (#6235)

Compatibility

  • React Native >= v0.71.4
  • Realm >= 11.0.0

Internal

Realm JavaScript v12.3.0

03 Nov 13:35
9ec6e31
Compare
Choose a tag to compare

Enhancements

  • Allow asymmetric objects to contain fields with non-embedded (top-level) links (rather than only embedded links). (realm/realm-core#7003)

Fixed

  • The onBefore, onAfter, and onFallback client reset callbacks were not called. (#6201, since v12.0.0)
  • Symbol.unscopables has been implemented on the base class of Realm.Results, Realm.List, and Realm.Set. (#6215)
  • Deleting an object in an asymmetric table would cause a crash. (realm/realm-kotlin#1537, since v10.19.0)
  • Updating subscriptions did not trigger Realm auto-refreshes, sometimes resulting in async refresh hanging until another write was performed by something else. (realm/realm-core#7031)
  • Fix inter-process locking for concurrent Realm file access resulting in an inter-process deadlock on FAT32/exFAT file systems. (realm/realm-core#6959)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v14.0.0.
  • File format: generates Realms with format v23 (reads and upgrades file format v5 or later for non-synced Realm, upgrades file format v10 or later for synced Realms).

Internal

  • Some disabled tests for client reset (partition based sync) have been enabled. (#6201
  • Upgraded Realm Core from v13.22.0 to v13.23.2. (#6220)

Realm React v0.6.1

06 Oct 13:32
63ece87
Compare
Choose a tag to compare

Fixed

  • useObject will now re-render if the result of objectForPrimaryKey is null or undefined. (#6101)
  • Changed commonJS file name to make it more bundler friendly, especially for Electron apps.

Compatibility

  • React Native >= v0.68.0
  • Realm >= 11.0.0

Internal

  • Removed 11.0.0-rc from compatible versions.

Realm JavaScript v12.2.1

05 Oct 12:57
5e42625
Compare
Choose a tag to compare

Deprecations

  • Realm.User.providerType is deprecated, and will be remove in next major version. Use Realm.User.identities instead.

Fixed

  • Outside migration functions, it is not possible to change the value of a primary key. (#6161, since v12.0.0)
  • Receiving a write_not_allowed error from the server would have led to a crash. (realm/realm-core#6978, since v11.5.0)
  • If querying over a geospatial dataset that had some objects with a type property set to something other than Point (case insensitive) an exception would have been thrown. Instead of disrupting the query, those objects are now just ignored. (realm/realm-core#6989, since v12.0.0)
  • If a user was logged out while an access token refresh was in progress, the refresh completing would mark the user as logged in again and the user would be in an inconsistent state. (realm/realm-core#6837, since v10.0.0)
  • Logging in a single user using multiple auth providers created a separate Realm.User per auth provider. This mostly worked, but had some quirks:
    • Sync sessions would not necessarily be associated with the specific Realm.User used to create them. As a result, querying a user for its sessions could give incorrect results, and logging one user out could close the wrong sessions.
    • Existing local synchronized Realm files created using version of Realm from August - November 2020 would sometimes not be opened correctly and would instead be redownloaded.
    • Removing one of the Realm.Users would delete all local Realm files for all Realm.Users for that user.
    • Deleting the server-side user via one of the Realm.Users left the other Realm.Users in an invalid state.
    • A Realm.User which was originally created via anonymous login and then linked to an identity would still be treated as an anonymous users and removed entirely on logout.
    • realm/realm-core#6837, since v10.0.0

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v14.0.0.
  • File format: generates Realms with format v23 (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 v13.20.1 to v13.22.0. (#6158)

Realm JavaScript v12.2.0

24 Sep 16:08
35707e6
Compare
Choose a tag to compare

Deprecations

  • Realm.App.Sync.reconnect(app) has been deprecated and will be removed in the next major version. You can use Realm.App.Sync.Session.reconnect() instead.

Enhancements

  • Added Realm.Sync.Session.reconnect() to help force a reconnection to Atlas Device Sync. (#6123)
  • Added Realm.App.AppConfiguration.metaData which will make it possible to encrypt metadata used by the Realm.App. (#6147)

Fixed

  • Fixed values of properties being replaced by default value when updating. (#6129, since v12.0.0)
  • Fixed that value for Realm.schemaVersion wasn't propagated correctly for non-existing files. (#6119, since v12.0.0)
  • Full text search supports searching for prefix only e.g., description TEXT 'alex*'. (realm/realm-core#6860)
  • Unknown protocol errors received from the Altas Device Sync server will no longer cause the app to crash if a valid error action is also received. Unknown error actions will cause device sync to fail with an error via the sync error handler. (realm/realm-core#6885)
  • Allow arguments to Realm Query Language to be a string representation of a geospatial object for GEOWITHIN queries. (realm/realm-core#6934)
  • Crash when querying the size of a Object property through a link chain. (realm/realm-core#6915, since v12.0.0)
  • Throw an exception when some limitation on the OS filesystem is reached, instead of crashing the application. The same file locking logic is now also used for all the platforms. (realm/realm-core#6926)
  • Fixed crash that generated the error message Assertion failed: ref + size <= next->first. (realm/realm-core#6340, since v11.3.0)
  • When using OpenSSL (i.e. on non-Apple platforms) a TLS handshake error would never be reported and instead TLS errors would be reported as a sync connection failure. When using SecureTransport (i.e. on Apple platforms) only some TLS handshake errors would be reported, but most were reported as a sync connection failure. Additionally, reported sync errors originating from OpenSSL have been improved. (realm/realm-core#6938).
  • Fixed Bad server version errors and client reset which sometimes occurred when updating a subscription's query. (realm/realm-core#6966, since v10.12.0)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v14.0.0.
  • File format: generates Realms with format v23 (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 v13.17.2 to v13.20.1. (#6077 & #6134)
  • Sync protocol version bumped to 10. (realm/realm-core#6902)
  • Error code reported in the sync error handling for compensating writes is reported as 1033 (previously 231). (#6077)