Releases: realm/realm-js
Realm JavaScript v12.6.0-alpha.0
Enhancements
- Building for iOS and Android has been optimized for compatibility with future React Native versions.
- Android builds now compile on the consumers machine rather than through prebuilds.
- iOS builds also compile on the consumers machine and can opt-in to compile Realm Core from source with the
REALM_BUILD_CORE
flag when runningpod install
. - Package size has decreased since prebuilds have been removed.
Fixed
- <How to hit and notice issue? what was the impact?> (#????, since v?.?.?)
- None
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
Realm JavaScript v12.6.0
Enhancements
- Added an optional
fetch
parameter to theAppConfiguration
. Use this to specify a custom implementation of thefetch
function used by the app to perform network requests.
Fixed
- Handle
EOPNOTSUPP
when usingposix_fallocate()
and fallback to manually consume space. This should enable android users to open a Realm on restrictive file systems. (#6349, since v12.2.0) - Application may crash with
incoming_changesets.size() != 0
when a download message is mistaken for a bootstrap message. This can happen if the synchronization session is paused and resumed at a specific time. (realm/realm-core#7238, since v10.12.0) - Fixed errors complaining about missing symbols such as
__atomic_is_lock_free
on ARMv7 Linux. (realm/realm-core#7257)
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.1 to v13.26.0. (#6403)
- Bumping the required MacOS version to 10.13.
Realm JavaScript v12.5.1
Fixed
- Accessing the
providerType
on aUserIdentity
viaUser.identities
always yieldedundefined
. 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
Enhancements
- Added an optional third
keyPaths
argument to theaddListener
methods ofCollection
andObject
. 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 viareconnect()
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
orObject
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
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
andRealm.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
orundefined
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 theUser
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>
orList<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()
ordistinct()
on aLnkSet
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
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
wasundefined
, no client reset mode was set which could lead to an app crash with the messagem_mode != ClientResyncMode::Manual
. The default mode is nowRecoverUnsyncedChanges
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 asUnable to resolve module ../realm-constants.json
for users installing the package into a mono-repo. We're now storing this information in therealm/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
Realm Babel Plugin v0.2.0
Realm React v0.6.2
Fixed
- Improved type generation, which fixed an issue with the
Realm.User
return fromuseUser
(#6196) UserProvider
will now always return a newuser
reference on change events. (#6186)- Fix
useQuery
re-render when updating the giventype
. (#6235)
Compatibility
- React Native >= v0.71.4
- Realm >= 11.0.0
Internal
Realm JavaScript v12.3.0
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
, andonFallback
client reset callbacks were not called. (#6201, since v12.0.0) Symbol.unscopables
has been implemented on the base class ofRealm.Results
,Realm.List
, andRealm.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
Realm React v0.6.1
Fixed
useObject
will now re-render if the result ofobjectForPrimaryKey
isnull
orundefined
. (#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.