Releases: realm/realm-js
Releases · realm/realm-js
Realm JavaScript v2.28.0
Enhancements
- Improve performance when using Chrome Debugging with React Native by adding caching and reducing the number of RPC calls required. Read-heavy workflows are as much as 10x faster. Write-heavy workflows will see a much smaller improvement, but also had a smaller performance hit to begin with. (Issue: #491, PR: #2373).
- Reduce bundle size for React Native apps. Thanks to @lebedev. (#2241)
- Support 64 bit for React Native Android. (#2221)
Fixed
- Opening a query-based Realm using
new Realm
did not automatically add the required types to the schema when running in Chrome, resulting in errors when trying to manage subscriptions. (PR: #2373, since v2.15.0). - The Chrome debugger did not properly enforce read isolation, meaning that reading a property twice in a row could produce different values if another thread performed a write in between the reads. This was typically only relevant to synchronized Realms due to the lack of multithreading support in the supported Javascript environments. (PR: #2373, since v1.0.0).
- The RPC server for Chrome debugging would sometimes deadlock if a notification fired at the same time as a Realm function which takes a callback was called. (PR: #2373, since v1.0.0 in various forms).
Compatibility
- Realm Object Server: 3.21.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Realm JavaScript v2.27.0
NOTE: The minimum version of Realm Object Server has been increased to 3.21.0 and attempting to connect to older versions will produce protocol mismatch errors. Realm Cloud has already been upgraded to this version, and users using that do not need to worry about this.
Changes since v2.26.1 (including v2.27.0-rc.2 and v2.27.0-rc.3):
Enhancements
- Add an optional parameter to the
SubscriptionOptions
:inclusions
which is an array of linkingObjects properties. This tells subscriptions to include objects linked through these relationships as well (links and lists are already included by default). (#2296 - Added
Realm.Sync.localListenerRealms(regex)
to return the list of local Realms downloaded by the global notifier. (realm-js-private#521). - Encryption now uses hardware optimized functions, which significantly improves the performance of encrypted Realms. (realm-core#3241)
- Improved query performance when using
in
queries. (realm-core#3241) - Improved query performance when querying integer properties with indexes, e.g. primary key properties. (realm-core#3272)
- Improved write performance when writing changes to disk. (realm-core#2927)
Fixed
- Making a query that compares two integer properties could cause a segmentation fault in the server or x86 node apps. (realm-core#3253)
- Fix an error in the calculation of the
transferable
value supplied to the progress callback. (realm-sync#2695, since v1.12.0) - HTTP requests made by the Sync client now always include a
Host: header
, as required by HTTP/1.1, although its value will be empty if no value is specified by the application. (realm-sync#2861, since v1.0.0) - Added
UpdateMode
type to support the three modes ofRealm.create()
. (#2359, since v2.26.1) - Fixed an issue where calling
user.logout()
would not revoke the refresh token on the server. (#2348, since v2.24.0) - Fixed types of the
level
argument passed to the callback provided toRealm.Sync.setLogger
, it was a string type but actually a numeric value is passed. (#2125, since v2.25.0) - Avoid creating Realm instances on the sync worker thread. (raas#1539 and realm-object-store#793)
Compatibility
- Realm Object Server: 3.21.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats).
Internal
Realm JavaScript v2.26.1
Enhancements
- None.
Fixed
- Fixed Xcode 10.2 Build Errors by providing
kJSTypeSymbol
for switch cases. (#2305 and #2246, since v2.25.0)
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Realm JavaScript v2.26.0
Enhancements
- Add 4 new fields to
NamedSubscription
which reprents query-based subscriptions:createdAt
,updatedAt
,expiresAt
andtimeToLive
. These make it possible to better reason about and control current subscriptions. (#2266) - Add the option of updating the query controlled by a subscription using either
Results.subscribe({name: 'name', update: true})
or theNamedSubscription.query
property. (#2266) - Add the option of setting a time-to-live for subscriptions using either
Results.subscribe({name: 'name', timeToLive: <valueInMs>})
or theNamedSubscription.timeToLive
property. (#2266) - Add
Realm.Results.description()
which returns a string representation of the query. - Add support for defining mapped properties in the schema using
name: { type: 'int', mapTo: 'internalName' }
. In that case the mapped name is used internally in the underlying Realm file, while the property key is used for reading/writing the property as well as querying it. - Add
RealmObject.addListener()
,RealmObject.removeListener()
, andRealmObject.removeAllListeners()
to set up and remove object-level notifications. (#763) - Add a new
Realm.UpdateMode
enum with the values:never
,modified
,all
. This replaces the current
Realm.create(type, properties, update)
withRealm.create(type, properties, updateMode)
.
Realm.create(type, properties, 'modified')
is a new mode that only update existing properties that actually
changed, whileRealm.create(type, properties, 'never')
is equal toRealm.create(type, properties, false)
and
Realm.create(type, properties, 'all')
is equal toRealm.create(type, properties, true)
.
Realm.create(type, properties, update)
is now deprecated. (#2089)
Fixed
- Fixed retrying authentication requests. The issue could be observed as "Cannot read property 'get' of undefined." errors being thrown when the authenticate requests were retried. (#2297, since v2.24.0)
- Due to a rare race condition in some Android devices (including Samsung SM-T111), an app could crash hard. A workaround was introduced but never included in any releases. (#1895, since v2.11.0)
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Realm JavaScript v2.25.0
Enhancements
- Added
Realm.Sync.setLogger()
to capture the sync client's log. (#2125 and realm-js-private#517)
Fixed
- Fixed broken user auth functions when running in electron. (#2264, since v2.24.0)
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Realm JavaScript v2.24.0
Enhancements
- Add support for React Native v0.58. (#2239)
Fixed
- Fixed an assertion failure when using a synchronized Realm and an object was created after another object was created with an int primary key of
null
. (#3227) - When debugging with React Native, calling
Realm.open()
would crash sinceRealm._asyncOpen()
was not available in the debugger. (#2234, since v2.20.0) - Added several missing functions to the Chrome debugging support library. (#2242, since v2.2.19).
- Fixed incorrect results when reading data from Realm from within a callback function when debugging in Chrome. (#2242).
- Report the correct user agent to the sync server rather than always "RealmJS/Unknown". (#2242, since v2.23.0).
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Realm JavaScript v2.23.0
Enhancements
- Added
Realm.copyBundledRealmFiles()
to TypeScript definitions. (#2176) - The parser now supports readable timestamps with a
T
separator in addition to the originally supported@
separator. For example:startDate > 1981-11-01T23:59:59:1
. (realm/realm-core#3198) - It is now possible to store Realms on Android external storage with React Native by using
Realm.Configuration.fifoFilesFallbackPath
. (#2062) - New global notifier API introduced though
Realm.Sync.addListener(config, event, callback)
. This also adds support for configuring the SSL connection. The old APIRealm.Sync.AddListener(serverUrl, adminUser, filterRegex, event, event, callback)
is deprecated. (#2243)
Fixed
- Realm initialized the filesystem when being imported instead of waiting for the first Realm to be opened. ([#2218] (#2218), since v2.22.0)
- Sync sessions for Realms which were closed while the session was paused would sometimes not be cleaned up correctly. (realm/realm-object-store#766, since v2.16.0)
- Querying Realm instances obtained from
Realm.Sync.Adapter
would sometimes pin the read transaction version, resulting in the file rapidly growing in size as further transactions were processed. (realm/realm-object-store#766, since v2.0.2)
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Realm JavaScript v2.22.0
This release contains all changes from v2.22.0-beta.1 to v2.22.0-beta.2.
Enhancements
- Calling
Realm.Sync.User.createConfiguration()
now supports a relative URL which will use the Authentication server as base url. (#1981) - Updated React Native Android Builds to use Android Build Tools 3.2.1. (#2103)
- Improved performance and memory usage of
Realm.Sync.Adapter
. (realm/realm-js-private#501) - When an invalid/corrupt Realm file is opened, the error message will now contain the file name. (realm/realm-core#3203)
Fixed
Realm.Sync.User.createConfiguration()
created an extra:
if no port was defined. (#1980, since v2.8.0)- A slower fallback solution for system which does not support
posix_fallocate()
. - Fixed building on Android. (#2189, since v2.22.0-beta.2)
- Fix an occasional crash due to an uncaught
realm::IncorrectThreadException
when a client reset error occurs. (#2193#2193) - When a sync worker is called with no arguments, a runtime error can occur. Thanks to @radovanstevanovic. (#2195, since v2.2.2)
- Fix an occasional crash due to an uncaught
realm::IncorrectThreadException
when a client reset error occurs. (#2193) - A crash bug could be triggered in some situations by creating, deleting, then recreating tables with primary keys. This could be seen observed as a crash with the message
Row index out of range.
(realm/realm-sync#2651, since v2.0.0)
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Internal
- Upgraded to Realm Core v5.12.7.
- Upgraded to Realm Sync v3.14.12.
- Upgraded to https://github.com/nlohmann/json 3.4
2.22.0-beta.2
Important
This release does not work on Android!
Enhancements
- Improved performance and memory usage of
Realm.Sync.Adapter
.
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)
Internal
- Upgraded to https://github.com/nlohmann/json 3.4
2.22.0-beta.1
Enhancements
- Calling
Realm.Sync.User.createConfiguration()
now supports a relative URL which will use the Authentication server as base url. (#1981) - Updated React Native Android Builds to use Android Build Tools 3.2.1. (#2103)
Fixed
Realm.Sync.User.createConfiguration()
creating an extra:
if no port was defined. (#1980, since v2.8.0)- On AWS Lambda we may throw an
Operation not permitted
exception when calling posix_fallocate(). (#1832, since v0.10.0)
Compatibility
- Realm Object Server: 3.11.0 or later.
- APIs are backwards compatible with all previous release of realm in the 2.x.y series.
- File format: Generates Realms with format v9 (Reads and upgrades all previous formats)