Skip to main content

RxDB 17.0.0 - Local-First to the Moon (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

Featuresโ€‹

Improvements for our Vibe-Coders ๐Ÿ’ปโœจโ€‹

To improve vide-coding with RxDB, we made the following DX-for-LLM improvements:

  • ADD https://rxdb.info/llms.txt for LLM-friendly documentation access.
  • ADD ERROR-MESSAGES.md to the root of the RxDB package so your LLM knows about all possible errors.
  • ADD Errors now contain a cause, fix and docs property which tells your LLM what went wrong and where to find information about possible fixes.
  • ADD @example tags to TypeScript comments in many parts of the typings.

To improve vibe-coding when working with RxDB directly we:

  • ADD .aiexclude file to reduce context.
  • ADD .agent Skill to verify code changes.
  • ADD .claudeignore file to reduce context.
  • ADD .claude/settings.json to improve post-generation testing.
  • ADD CLAUDE.md

Better/More Integrationsโ€‹

๐Ÿ” 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
  • CHANGE toggleOnDocumentVisible now defaults to true #6810
  • ADD docs page about testing with RxDB.

๐Ÿ—„๏ธ Storage, Queries & 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
  • FIX: migration memory leak: old collection meta doc not deleted #7792
  • 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.
  • FIX: downstream replication issues #7804
  • FIX add event guard to count and findByIds in _execOverDatabase #7864
  • FIX: memory leak in migratePromise() #7787
  • ADD enforce maximum length for indexes and primary keys (maxLength: 2048)
  • CHANGE final schema fields no longer need to be marked as required
  • UPDATE z-schema to version 9.
  • CHANGE replace appendToArray() with Array.concat() for better browser-level optimizations
  • ADD ensure indexes and primary keys are validated consistently across replication schemas
  • CHANGE: Reduce NON_PREMIUM_COLLECTION_LIMIT from 16 to 13.
  • ADD Support extendedLifetime when using the SharedWorker.

๐Ÿ”Œ 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!