Skip to content

Releases: realm/realm-js

Realm JavaScript v20.0.0

09 Sep 12:34
7bcad9d
Compare
Choose a tag to compare
Pre-release

Breaking Changes

  • Removed all functionality related to Atlas Device Services / Device Sync.

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v20.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Internal

  • Upgraded Realm Core from v14.12.0 to v20.0.1

Realm React v0.10.1

28 Aug 13:01
4738cbd
Compare
Choose a tag to compare

Fixed

  • Fixing the RealmProvider component when context is created without passing neither a Realm instance nor a Realm.Configuration to avoid unnecessary recreation of the provider, which was causing "Cannot access realm that has been closed" errors. (#6842, since v0.8.0)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Realm JavaScript v12.13.1

21 Aug 12:07
9d5ce81
Compare
Choose a tag to compare

Fixed

  • Fixed a build error on React Native iOS and Android from a change in the CallInvoker's invokeAsync call signature. (#6851 since v12.12.0 in combination with React Native >= v0.75.0).

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Realm React v0.10.0

15 Aug 17:44
b3005de
Compare
Choose a tag to compare

Enhancements

  • Added useProgress hook which provides a convenient way to access Realm's progress information. It works in a similar way as realm.addProgressNotification. (#6797)
import { RealmProvider, ProgressDirection, ProgressMode } from "@realm/react";

const ProgressText = () => {
	const progress = useProgress({ direction: ProgressDirection.Download, mode: ProgressMode.ReportIndefinitely });

    return <Text>Loading: {(100 * progress).toFixed()}%</Text>;  
}

const MyApp() = () => {
  return (
    <RealmProvider sync={...}> 
      <ProgressText />
    </RealmProvider>
  );
}
  • Added the ability to get progress information in fallback component of RealmProvider when opening a synced Realm. (#6785)
import { RealmProvider, RealmProviderFallback } from "@realm/react";

const Fallback: RealmProviderFallback = ({ progress }) => {
	return <Text>Loading:{(100 * progress).toFixed()}%</Text>;
}

const MyApp() = () => {
  return (
    <RealmProvider sync={...} fallback={Fallback}> 
      ...
    </RealmProvider>
  );
}

Compatibility

  • Realm JavaScript >= v12.12.0.
  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Realm JavaScript v12.13.0

14 Aug 12:20
b4d00c4
Compare
Choose a tag to compare

Warning

This release is confirmed broken in combination with React Native v0.75.0 and upward.
Please upgrade to v12.13.1 to fix any issues regarding call signatures of the CallInvoker API.

Enhancements

Fixed

  • Fixed an Invalid column key exception when using an RQL "BETWEEN" query on an int or timestamp property across links. (realm/realm-core#7935, since v12.12.0)
  • Fixed conflict resolution bug which could sometimes cause an Invalid prior_size exception to prevent synchronization (realm/realm-core#7893, since v12.10.0)
  • Fixed bug which would prevent eventual consistency during conflict resolution. Affected clients would experience data divergence and potentially consistency errors as a result. (realm/realm-core#7955, since v12.10.0)
  • Fixed issues loading the native Realm libraries on Linux ARMv7 systems when they linked against our bundled OpenSSL resulting in errors like unexpected reloc type 0x03. (realm/realm-core#7947, since v12.7.0)
  • Sync client may report duplicate compensating write errors. (realm/realm-core#7708, since v12.10.0)
  • String serialization of timestamps with a sufficiently large timestamp value could overflow an int causing undefined behavior, causing potentially bad values for the month/day/year values in stringified dates. (realm/realm-core#7934)
  • App subscription callback was getting fired before the user profile was retrieved on login, leading to an empty user profile when using the callback. (realm/realm-core#7889, since v12.9.0)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Internal

  • Upgraded Realm Core from v14.11.0 to v14.12.0.

Realm JavaScript v12.12.1

25 Jul 22:07
5050d08
Compare
Choose a tag to compare

Warning

This release is confirmed broken in combination with React Native v0.75.0 and upward.
Please upgrade to v12.13.1 to fix any issues regarding call signatures of the CallInvoker API.

Fixed

  • Fixed compiler error when building binding for React Native iOS: "'React-featureflags/react/featureflags/ReactNativeFeatureFlags.h' file not found" (#6808, since v12.12.0)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Internal

  • Removed an unused import in the binding for React Native Android. (#6808, since v12.12.0)

Realm JavaScript v12.12.0

23 Jul 10:10
9d80922
Compare
Choose a tag to compare

Warning

This release is confirmed broken in combination with React Native v0.75.0 and upward.
Please upgrade to v12.13.1 to fix any issues regarding call signatures of the CallInvoker API.

Deprecations

  • The callback for SyncSession.addProgressNotification taking transferred and transferable arguments is deprecated and will be removed. See Enhancements below for the new callback supporting both Flexible Sync and Partition-Based Sync. (#6743)
  • AppConfiguration.app is no longer used by Atlas Device Sync. It will be removed in future SDK releases and should not be used. (#6785)

Enhancements

  • Added support for "bridgeless" React Native on iOS and Android, a part of the "new architecture". (#6737)
  • Added progress notifications support for Flexible Sync using an estimate as the new callback argument. The estimate is roughly equivalent to an estimated value of transferred / transferable in the deprecated Partition-Based Sync callback. (#6743)
realm.syncSession?.addProgressNotification(
  ProgressDirection.Upload,
  ProgressMode.ReportIndefinitely,
  (estimate) => console.log(`progress: ${estimate}/1.0`)
);
  • It is no longer an error to set a base url for an App with a trailing slash - for example, https://services.cloud.mongodb.com/ instead of https://services.cloud.mongodb.com - before this change that would result in a 404 error from the server. (realm/realm-core#7791)
  • Performance has been improved for range queries on integers and timestamps when using the BETWEEN operator. (realm/realm-core#7785)
  • On Windows devices Device Sync will additionally look up SSL certificates in the Windows Trusted Root Certification Authorities certificate store when establishing a connection. (realm/realm-core#7882)
  • Role and permissions changes no longer require a client reset to update the Realm on-device. (realm/realm-core#7440)

Fixed

  • Opening an Flexible Sync Realm asynchronously may not wait to download all data. (realm/realm-core#7720, since v10.12.0)
  • Clearing a list of mixed in an upgraded file would lead to an assertion failing. (realm/realm-core#7771, since 12.7.0-rc.0)
  • Sync client can crash if a session is resumed while the session is being suspended. (realm/realm-core#7860, since v10.18.0)
  • If a sync session is interrupted by a disconnect or restart while downloading a bootstrap, stale data from the previous bootstrap may be included when the session reconnects and downloads the bootstrap. This can lead to objects stored in the database that do not match the actual state of the server and potentially leading to compensating writes. (realm/realm-core#7827, since v10.18.0)
  • Fixed unnecessary server roundtrips when there is no download to acknowledge. (realm/realm-core#2129, since v12.10.0)
  • Realm.App.Sync.SyncSession#uploadAllLocalChanges() was inconsistent in how it handled commits which did not produce any changesets to upload. Previously it would sometimes complete immediately if all commits waiting to be uploaded were empty, and at other times it would wait for a server roundtrip. It will now always complete immediately. (realm/realm-core#7796)
  • Realm#writeCopyTo() on an encrypted Realm without explicitly specifying a new encryption key would only work if the old key happened to be a valid nul-terminated string. (realm/realm-core#7842, since v12.10.0).
  • You could get unexpected merge results when assigning to a nested collection. (realm/realm-core#7809, since v12.7.0-rc.0)
  • When mapTo is used to have an alias for a property name, Realm.Results#sorted() doesn't recognize the alias leading to errors like Cannot sort on key path 'NAME': property 'PersonObject.NAME' does not exist. (#6779, since v11.2.0)
  • A mixed property with a collection could sometimes end up with a combination of values assigned by different clients. (realm/realm-core#7809, since v12.9.0)
  • Fixed removing backlinks from the wrong objects if the link came from a nested list, nested dictionary, top-level dictionary, or list of mixed, and the source table had more than 256 objects. This could manifest as array_backlink.cpp:112: Assertion failed: int64_t(value >> 1) == key.value when removing an object. (realm/realm-core#7594, since v10.6.0)
  • Fixed a bug when removing an object from a nested collection could lead to an assert with the message array.cpp:319: Array::move() Assertion failed: begin <= end [2, 1]. (realm/realm-core#7839, since v12.9.0)

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Internal

  • Adding a CallInvoker-based scheduler for Core on React Native and removing the "flush ui queue" workaround. (#6791)
  • Refactors throwing uncaught exceptions from callbacks dispatched onto the event loop from C++ on React Native. (#6772)
  • Upgraded Realm Core from v14.10.0 to v14.11.0. (#6744

Realm React v0.9.0

17 Jul 11:12
2238a9c
Compare
Choose a tag to compare

Enhancements

  • Added the ability to pass an existing Realm.App instance in AppProvider with the app prop. (#6785)
import { AppProvider } from "@realm/react";

const app = new Realm.App(...);

function MyApp() {
  return (
    <AppProvider app={app}> 
      ...
    </AppProvider>
  );
}

Fixed

  • Fixed listener that was not being removed during unmounting of useObject and useQuery if the listener was added in a write transaction. (#6552) Thanks @bimusiek!
  • The app prop in AppProvider meant for LocalAppConfiguration was not being used by Atlas Device Sync and has been removed. app is now only used to pass an existing Realm.App to the provider. (#6785)

Compatibility

  • React Native >= v0.71.4
  • See "Compatibility" for a specific Realm version in Realm's CHANGELOG.

Realm JavaScript v12.11.1

25 Jun 13:03
f8dd36a
Compare
Choose a tag to compare

Fixed

  • path option in the Realm configuration not being set when using a synced Realm. (#6754, since v12.8.0). Note: if you have been using a custom path configuration with your synced Realm, this fix will lead to a re-download of its data in the custom path.

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).

Realm JavaScript v12.11.0

18 Jun 08:50
cfdfe11
Compare
Choose a tag to compare

Enhancements

  • Building for iOS and Android has been optimized for compatibility with future React Native versions, by deferring compilation of JSI dependent code to the dependent app's build. (#6650)

Fixed

  • None

Compatibility

  • React Native >= v0.71.4
  • Realm Studio v15.0.0.
  • File format: generates Realms with format v24 (reads and upgrades file format v10).