github pubkey/rxdb 17.5.0

3 hours ago

JavaScript Database

  • CHANGE Update the Angular example and the Ionic example from Angular 21 to Angular 22. Both examples now use TypeScript 6.0 because @angular/build v22 requires it.
  • CHANGE Update the @angular/core devDependency that the reactivity-angular plugin is built and type checked against from 21.2.18 to 22.1.0. The @angular/core peer dependency stays optional and unpinned, so RxDB keeps working with older Angular versions.
  • FIX dexie RxStorage: the reference counting in dexie-helper.ts never closed the underlying Dexie connections and never evicted the state cache entry, so the connections leaked and creating a database with the same name again after the IndexedDB databases were deleted threw DatabaseClosedError. Added a testcase for it in test/unit/rx-storage-dexie.test.ts. #8793
  • IMPROVE Serve the docs favicon as .ico in addition to the .svg, so browsers without SVG favicon support fall back to /files/logo/icon.ico.
  • FIX Running tsc --noEmit inside docs-src/ reported 482 type errors. The docs tsconfig now sets allowImportingTsExtensions (the RxDB sources in src/ use explicit .ts file endings) and the @theme/* module declarations of the Docusaurus theme packages are referenced, so the swizzled components in docs-src/src/theme/ resolve. The remaining errors in the docs components and in a few src/ files were fixed, the docs typecheck is clean now.
  • FIX deleteFolder() of the backup plugin used the deprecated fs.rmdirSync(path, { recursive: true }), it now uses fs.rmSync().
  • ADD Discord chat hint to RxDB error messages so users can ask for help at https://rxdb.info/chat
  • FIX An interrupted schema migration could never complete. Documents that were already stored in the new storage were pushed with assumedMasterState: undefined, so the replication protocol reported each of them as a conflict. Resolving these conflicts wrote the new document state back into the old storage which emitted on the fork change stream and started the same cycle again, so addCollections() never resolved and the migration spun conflict cycles until the tab ran out of memory. Push-conflicts of the migration replication are now ignored as intended and the document that is already stored in the new storage is kept.
  • FIX Canceling a running schema migration left the storage instances that the migration had opened behind. RxMigrationState.cancel() now closes them, so an interrupted migration no longer leaks the old storage instance, its replication meta storage and their multi-instance BroadcastChannel reference.
    FIX schema migration would leave the leader-election BroadcastChannel open when the migration threw (for example when a migrationStrategy failed), keeping the tab leader forever and blocking other tabs from running the migration. The channel is now closed on every code path. (#7827)
  • FIX useLiveRxQuery never unsubscribed from the live query because useEffect dropped the cleanup returned by the async runQuery callback. Added an unmount test in test/react/react-hooks.test.tsx. #8964
  • CHANGE Update graphql from 16.14.2 to 17.0.2. GraphQL.js v17 requires Node.js 22 or newer, so npm install rxdb on older Node.js versions prints an EBADENGINE warning for the graphql package. RxDB itself does not import from graphql, it is only needed as the peer dependency of graphql-ws and for the GraphQL servers in the tests and examples. The dev dependencies graphql-http and graphql-subscriptions still declare a peer dependency range that stops at v16, they are pinned to the root graphql version via overrides. See the GraphQL.js v16 to v17 upgrade guide.
  • CHANGE Update graphql-ws from 5.16.2 to 6.2.0. The GraphQL replication now imports the client from graphql-ws/client instead of the package root, so bundles no longer pull in the graphql-ws server code and its graphql peer dependency. Users who run their own graphql-ws server have to remove the /lib/ part from their imports (graphql-ws/lib/use/ws becomes graphql-ws/use/ws) and, when they use the schema, context, onSubscribe, onOperation, onError, onNext or onComplete server hooks, adapt them to the new argument list where the full message was replaced by the id and the payload. See the graphql-ws v6 migration notes.
  • CHANGE Raise the required Node.js version from 18 to 20 because graphql-ws v6 no longer supports Node.js 18, which reached its end of life in April 2025.
  • ADD exportJSON() of the json-dump plugin now supports the attachments: true option to include the attachments data as base64 strings in the dump. importJSON() restores these attachments. The default is false so that dumps stay small. Added testcases. #8924
  • FIX The JD1, JD2 and JD3 error messages linked to the backup plugin page. They now link to the new JSON Import and Export page which documents the json-dump plugin. #8924
  • FIX RxDatabase.close() resolved before the leader election was finished and before the broadcast channel was closed, which made a still running election post on the already closed channel #8893
  • UPDATE broadcast-channel to 7.4.0 which stops a dead leader elector from becoming leader and posting on a closed channel #8893
  • FIX Make the testcase groups live query write bursts before _ensureEqual when enabled no longer fail randomly. The auditTime() window of liveQueryUpdateThrottleTime opens with the change event of the first insert, not when the write burst is done. On slow storages and loaded CI machines the burst itself took longer than the throttle time, so _ensureEqual() legitimately ran while the later inserts were still going on. The testcase now measures the wall clock time of the burst, only asserts when the burst did fit into the throttle window, and retries the burst otherwise.
  • IMPROVE Reduce the ESM bundle size by no longer down-transpiling native class syntax in the dist/esm build. The class-lowering babel transforms now only run for the CJS/es5 build, which removes the @babel/runtime helper imports (inheritsLoose, createClass, readOnlyError, wrapNativeSuper) from the ESM output. This shrinks the measured core+memory bundle from 45088 to 44279 bytes gzip (~1.8%) and removes @babel/runtime from the ESM tree entirely. The CJS build and all other syntax transforms are unchanged.
  • CHANGE Remove the reconnecting-websocket dependency, which was unmaintained since 2020. The websocket replication now uses a small reconnecting websocket client that ships with RxDB itself. The behavior stays the same: the client reconnects with an exponential backoff and queues the messages that are sent while it is not connected. A connection attempt that does not open within the connection timeout now emits the new error code RC_WEBSOCKET_TIMEOUT on the error$ stream of the replication.
  • FIX [replication-microsoft-onedrive] Make realtime sync reliable by sending a durable signaling message on every push in addition to the ephemeral WebRTC RESYNC ping. A ping to a peer whose WebRTC datachannel is not connected (handshake not finished yet or the connection dropped) was silently lost with no other trigger to re-pull, which made the should realtime sync on both sides test flaky. Peers now also converge over the polled signaling channel and keep the poll backoff responsive while there is traffic.
  • IMPROVE Add field-level comments to the RxJsonSchema typings so coding agents and IDE users see the RxDB-specific schema rules (ref, final, default, maxLength on indexed strings, minimum/maximum/multipleOf on indexed numbers) directly at the fields. Also document that schema title and description are read by LLMs when plugins like webmcp pass the JSON schema to AI agents. #8832
  • Update the Svelte example from Svelte 4 to Svelte 5 with runes. Shared state now lives in a store.svelte.js module with $state, and the RxDB query subscription is created in an $effect so it is cleaned up when the component is destroyed.
  • FIX In the Svelte example, saving an already existing note threw because RxDocument.update() was used without the update plugin being added. The note editor now uses the core incrementalPatch() method. Also added an e2e testcase that edits an existing note.
  • FIX The Tauri example e2e testcase should insert a hero asserted on the rendered hero after a fixed browser.pause(100). On a slow CI runner the insert through the SQLite trial storage plus the re-render of the query subscription takes longer than that, so the testcase failed with Expected length: 1, Received length: 0. It now waits for the hero element to exist instead of pausing for a fixed time. (#8919)
  • Refactored the WebMCP plugin internally so that the tool definitions are built separately from their execution. This does not change the registered tools, their names, descriptions or input schemas. Added testcases for the new internal structure.
  • Added the modelContext option to register the WebMCP tools at the registry of another document, for example an iframe.
  • FIX The WebMCP plugin read the tool registry from navigator.modelContext, which the May 27, 2026 WebMCP draft moved to document.modelContext. It now prefers document.modelContext and falls back to navigator.modelContext.
  • FIX The WebMCP plugin unregistered its tools with unregisterTool(), which the April 23, 2026 WebMCP draft removed. Tools are now registered with an AbortSignal and unregistered by aborting it.

RxDB Server

  • FIX (rx-server) the replication /push endpoint leaked documents that the queryModifier does not allow the client to see. Pushing a write for a foreign document id returned the full stored document inside the conflict response. The current server state of a written document is now checked against the queryModifier and non-matching writes are answered with 403 Forbidden.

RxDB Premium

  • FIX (storage-memory-mapped) Fixed a bug where bulkUpsert of an existing document would not survive a database reopen. The background persistence flush used return instead of continue inside the write-tasks loop, causing any remaining batched writes to be silently dropped whenever one write task produced no written documents (e.g. when a conflicting insert yields an empty result). See rxdb-premium-issues#24
  • FIX (storage-indexeddb) Eliminated unhandled TransactionInactiveError rejections that occurred during bulk replication pulls when concurrent reads hit the WAL flush window. See #8497

NOTICE: An overview about all releases can be found at the changelog

Join RxDB:

Don't miss a new rxdb release

NewReleases is sending notifications on new releases.