Skip to content

Realm JavaScript v12.0.0-alpha.2

Pre-release
Pre-release
Compare
Choose a tag to compare
@github-actions github-actions released this 05 Apr 20:21
· 594 commits to main since this release
640280a

This is a pre-release of the next major version of our SDK.
Please read more and discuss in the dedicated discussion: https://github.com/realm/realm-js/discussions/5416
See the release notes of previous pre-releases below for a complete picture of the changes introduced since v11.

Enhancements

  • Added support for building with the new React Native architecture enabled on Android. Thanks to
    Nikolai Samorodov / @zabutok for contributing the fix. (#5032)
  • Exposed SyncError.logUrl which contains the URL to the server log related to the sync error. (#5609)
  • Added a new error class CompensatingWriteError which indicates that one or more object changes have been reverted by the server.
    This can happen when the client creates/updates objects that do not match any subscription, or performs writes on an object it didn't have permission to access. (#5599)
  • Performance improvement for the following queries (realm/realm-core#6376):
    • Significant (~75%) improvement when counting (Realm.Results#length) the number of exact matches (with no other query conditions) on a string/int/uuid/objectId property that has an index. This improvement will be especially noticiable if there are a large number of results returned (duplicate values).
    • Significant (~99%) improvement when querying for an exact match on a date property that has an index.
    • Significant (~99%) improvement when querying for a case insensitive match on a mixed property that has an index.
    • Moderate (~25%) improvement when querying for an exact match on a bool property that has an index.
    • Small (~5%) improvement when querying for a case insensitive match on a mixed property that does not have an index.
  • Added a THROW_ON_GLOBAL_REALM which will enable throwing when the app is accessing the Realm without first importing it from the Realm package.

Fixed

  • Fixed bootstrapping the native module on Android. Seen as Exception in HostObject::get for prop 'Realm': java.lang.NoClassDefFoundError: io.realm.react.RealmReactModule. (#5666, since v12.0.0-alpha.0)
  • Fixed passing RealmObject instances between shared Realms. (#5634, since v12.0.0-alpha.0)
  • Fixed a crash when querying a mixed property with a string operator (contains/like/beginswith/endswith) or with case insensitivity. ([realm/realm-core#6376](realm/realm-core#6376, since v10.5.0)
  • Querying for equality of a string on an indexed mixed property was returning case insensitive matches. For example querying for myIndexedMixed == "Foo" would incorrectly match on values of "foo" or "FOO". (realm/realm-core#6376, since v10.5.0)
  • Adding an index to a mixed property on a non-empty class/objectType would crash with an assertion. (realm/realm-core#6376, since v10.5.0)
  • Realm.App.Sync#pause() could hold a reference to the database open after shutting down the sync session, preventing users from being able to delete the Realm. (realm/realm-core#6372, since v11.5.0)
  • Fixed a bug that may have resulted in Realm.Results and Realm.List being in different orders on different devices. Moreover, some cases of the error message Invalid prior_size may have be fixed too. (realm/realm-core#6191, since v10.15.0)
  • Exposed Sync as named export. #5649

Compatibility

  • React Native >= v0.71.0
  • Realm Studio v13.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

  • Enabled all tests from v11 and fixed all remaining failures. (#5595)
  • Fixed linting issues and running linting on CI.
  • Upgraded Realm Core from v13.6.0 to v13.8.0. (#5638)
  • Build iOS prebuilt binaries in release mode by default. (#5709)