Skip to main content

RxDB 17.0.0 (beta)

RxDB 17 focuses on better reactivity, improved debugging, and important storage fixes, while also graduating several long-standing plugins out of beta.

Most applications can upgrade easily, but users of OPFS and filesystem-based storages must review the migration notes carefully.

note

RxDB version 17 is currently in beta. For testing, please install the latest beta version from npm and provide feedback or report issues on GitHub.

Migrationโ€‹

RxDB 17 is mostly backward-compatible, but please review the following points before upgrading:

Storage migration requiredโ€‹

If you use any of the following storages, you must migrate your data using the storage migrator:

  • OPFS RxStorage
  • Filesystem RxStorage (Node)
  • IndexedDB RxStorage (if you use attachments)

For all other RxStorages, data created with RxDB v16 can be reused directly in RxDB v17.

Other migration notesโ€‹

  • The GitHub repository no longer contains prebuilt dist files.
    Install RxDB from npm or run the build scripts locally.
  • toggleOnDocumentVisible now defaults to true. #6810
  • Schema fields marked as final no longer need to be explicitly listed as required.
  • Some integrations now use optional peer dependencies. You may need to install them manually:
    • firebase
    • mongodb
    • nats

CHANGESโ€‹

Featuresโ€‹

๐Ÿ” Reactivity & APIsโ€‹

  • ADD RxDatabase.collections$ observable for reactive access to collections
  • ADD support for the JavaScript using keyword to automatically remove databases in tests
  • ADD new reactivity-angular package
  • CHANGE moved reactivity-vue and reactivity-preact-signals from premium to core
  • FIX query results becoming incorrect when changes occur faster than query update #7067

๐Ÿง  Debugging & Developer Experienceโ€‹

  • ADD context field to all RxDB write errors for easier debugging
  • ADD improved OPFS RxStorage error logging in devMode, including:
    • strict TextDecoder mode
    • detailed decoding error output
  • ADD internal WeakRef TypeScript types so users no longer need to enable ES2021.WeakRef
  • ADD llms.txt for LLM-friendly documentation access
  • CHANGE toggleOnDocumentVisible now defaults to true #6810

๐Ÿ—„๏ธ Storage & Replication Fixesโ€‹

  • FIX OPFS RxStorage memory and cleanup leaks
  • FIX memory-mapped storage not purging deleted documents
  • FIX RxCollection.cleanup() ignoring minimumDeletedTime
  • FIX short primary key lengths not matching replication schema #7587
  • FIX retry DenoKV commits when encountering "database is locked" errors
  • FIX close broadcast channels and leader election after database shutdown, not during
  • CHANGE: Store data as binary in IndexedDB to use less disc space.
  • CHANGE: Pull-Only replications no longer store the server metadata on the client.

๐Ÿ“ Schema & Index Validationโ€‹

  • ADD enforce maximum length for indexes and primary keys (maxLength: 2048)
  • CHANGE final schema fields no longer need to be marked as required

โš™๏ธ Performance & Internal Changesโ€‹

  • CHANGE replace appendToArray() with Array.concat() for better browser-level optimizations
  • ADD ensure indexes and primary keys are validated consistently across replication schemas

๐Ÿ”Œ Plugins Graduating from Betaโ€‹

The following plugins are no longer in beta and are now considered production-ready:

  • Replication Appwrite
  • Replication Supabase
  • Replication MongoDB
  • RxStorage MongoDB
  • RxStorage Filesystem (Node)
  • RxStorage DenoKV
  • Attachment replication
  • CRDT Plugin
  • RxPipeline

You can help!โ€‹

There are many things that can be done by you to improve RxDB:

  • Check the BACKLOG for features that would be great to have.
  • Check the breaking backlog for breaking changes that must be implemented in the future but where I did not have the time yet.
  • Check the todos in the code. There are many small improvements that can be done for performance and build size.
  • Review the code and add tests. I am only a single human with a laptop. My code is not perfect and much small improvements can be done when people review the code and help me to clarify undefined behaviors.
  • Update the example projects some of them are outdated and need updates.

LinkedInโ€‹

Stay connected with the latest updates and network with professionals in the RxDB community by following RxDB's official LinkedIn page!