-
FIX Key-compression dropping the
indexhint from queries becausecompressQuery()does not forward theindexfield, causing user-specified index hints to be silently ignored -
FIX CRDT plugin
bulkInserthook not including schema default values in CRDT operations, causing data loss during conflict resolution rebuild when fields rely on schema defaults -
FIX
RxDocument.get$()on nested object/array paths emitting spurious values when unrelated document fields changed, becausedistinctUntilChanged()used reference equality which always fails for non-primitive values across document revisions -
FIX
incrementalUpsert()throwing a CONFLICT error when a concurrentupsert()/insert()creates the same document between the internalfindOne()andinsert()calls -
FIX
upsertLocal()on a previously removed local document keeping the document in deleted state instead of un-deleting it -
FIX push-only replication losing local writes that occur during a pause because
reSync()events were filtered out when no pull handler was configured -
FIX
getStartIndexStringFromUpperBound()incorrectly mappingINDEX_MINto'1'for boolean index fields, causing queries with exclusive bounds ($gt/$lt) on a field preceding a boolean index field to include boundary documents in the results -
FIX leader-election plugin not calling
die()on the LeaderElector when the database is closed, becauseLEADER_ELECTORS_OF_DBwas never populated due to a dead code branch -
FIX encryption plugin schema transformation not correctly handling nested dot-notation encrypted paths (e.g.
'nested.field'), causing validation failures when using a validator storage with non-string nested encrypted fields -
FIX dev-mode
checkSchema()not validating composite primary key fields for encryption (SC15), index (SC13), unique (SC14), and type (SC16) constraints because it compared property names against the primaryKey object instead of resolving the primary field path -
FIX
findOne().remove()crashing withTypeError: Cannot read properties of nullwhen no document matches the query, instead of returningnull -
ADD
findOne().remove(true)to throw when no document matches, consistent withfindOne().exec(true) -
FIX schema migration losing
_deletedstate when migration strategy returns a new object, causing deleted documents to be resurrected after migration -
FIX
RxPipeline.remove()not properly cleaning up checkpoint when called during active processing, causing a re-added pipeline with the same identifier to skip already-processed documents instead of starting fresh -
FIX cleanup plugin prematurely exiting its retry loop when
storageInstance.cleanup()returnsfalse(batched cleanup), becauseArray.find()returns the found valuefalseand!falseevaluates totrue, causingisDoneto be set incorrectly -
FIX encryption plugin
validatePassword()leaking the plaintext password inRxErrorparameters and error messages when password validation fails -
FIX
database.remove()not calling collectiononRemovehandlers, becauseclose()unsubscribed all listeners before the remove operation could trigger them -
FIX query-builder
eq()/equals()silently overwriting other operator conditions on the same field because the value was stored as a raw primitive instead of using the$eqoperator form -
FIX
deleted$observable emitting on every document revision instead of only when the deleted state changes, by addingdistinctUntilChanged() -
FIX
postSavecollection hook not receiving the RxDocument instance as the second argument, unlikepostInsertandpostRemovewhich correctly pass it -
FIX
getJsonSchemaWithoutMeta()not removing_revfrom schema properties, while correctly removing other internal meta properties (_deleted,_meta,_attachments) -
FIX
allAttachments$observable emitting attachments with a stale document reference, causingattachment.docto point to an outdated document version instead of the latest one -
FIX RxState not correctly recovering full-state replacements (via
set('', modifier)) from disk on database reopen, causing corrupted state -
FIX memory storage
count()returning incorrect results when the selector is not fully satisfied by the index and the query has alimitset -
FIX
replicateRxCollection().remove()on a never-started replication now creates the meta instance and deletes its data instead of skipping cleanup -
FIX
REPLICATION_STATE_BY_COLLECTIONnot cleaned up oncancel()/remove(), leaking replication state references -
FIX floating-point rounding overflow in index string decimal generation, where
Math.roundcould produce a value equal to the multiplier (e.g. 10 instead of max 9), creating a string one character too long and breaking sort order in compound indexes -
FIX
normalizeMangoQuery()skipped fully-matching indexes when choosing default sort order, falling back to the first index instead of using the best match -
FIX RxState
set('', modifier)passedundefinedto the modifier instead of the current state -
FIX
RxMigrationStatus.count.percentreturningNaNinstead of100when migrating a collection with 0 documents -
FIX
fillWithDefaultSettings()index deduplication was broken becauseArray.filter()return value was discarded, causing duplicate indexes in schemas when user-defined indexes become identical after adding_deletedprefix and primary key suffix -
FIX encryption plugin not stripping type-specific schema keywords (
maxLength,required,items, etc.) from encrypted fields, causing validation errors when using a validator storage with encryption -
FIX incorrect index string generation for negative decimal numbers causing wrong sort order and query results
-
FIX
rateQueryPlan()evaluatedstartKeystwice instead ofendKeys, causing suboptimal index selection for$lt/$ltequeries. -
FIX event-reduce mutating cached
docsDataMapcausing missing documents after insert-delete cycles -
FIX
modify()not deep-cloning document data, allowing the modifier to corrupt internal state via shared nested references -
FIX
fillObjectWithDefaultsshared mutable references for non-primitive schema defaults (arrays/objects) causing corrupted values on subsequent inserts
🚀 RxDB v17 is released
- A list of changes for RxDB v17 can be found here
- feat: replication-supabase querybuilder #7566
- FIX Array type is omitted in GraphQL query builder #7532
- FIX(docs) search visibility and positioning
- ADD(storage-localstorage) attachment support.
- FIX error in dev mode when writing object with no prototype #7530
- FIX findOne subscription + exec returns wrong results #7497
- FIX(supabase-replication) push.modifier is not used #7513
- FIX(types) pull handler can return
undefinedas checkpoint. - FIX Issue running rxdb dev mode plugin on latest react native #7421
- DOCS add info about non allowed top level properties #7449
- ADD Supabase Replication Plugin (beta)
- FIX "when a push handler is interrupted mid-way by a reload, after the reload retry doesn't happen" via discord
- FIX query hanging after local document inserted #7349
- FIX(sqlite-storage) query $or with null returns wrong results #7356
- FIX credentials header in RxServer #283
- UPDATE express to v5 in RxServer
- ADD
blockSizeLimitto memory mapped storage. - FIX cleanup of a collection must also run the cleanup of the meta data of replications.
- FIX type of SimplePeerConnectionHandlerOptions.webSocketConstructor #7311
- FIX updates not working after migration of replication state #7260
- FIX on ReplicationState.pause(),
ensureNotFalsy()throws #7264
- ADD option to remove and update a document in the same atomic write operation.
- ADD option to disable
WITHOUT ROWIDin the SQLite RxStorage. - FIX ajv-validation must know about the
date-timeformat by default #7253 - FIX db.addCollections fails after it failed for a missing migration strategy #7226
- FIX SQLite storage fails while querying with null #7236
- FIX queue start/stop/cancel operations in the replication state to ensure operations do not intersect and cause errors.
- FIX real-time query ignoring the latest changes after deleting and purging data #7187
- ADD
putAttachmentBase64()andgetDataBase64()to the attachments API so that attachments can be stored and read in runtimes that do not supportBlob. - FIX schema migration failing when returning null #7204
- FIX migration-schema error: "more then one meta info found".
- FIX state get changes from other state will get error #7097
- FIX toggleOnDocumentVisible isVisible not always truthy #7095
- IMPROVE error message when
crypto.subtle.digestis not defined.
- FIX MigrationStrategies type not generic #7055
- FIX Full text search ajv validation issue #4
- Full text search with encryption issue #5
- Published the Appwrite Replication Plugin in beta mode
- UPDATE the
wspackage to the latest version.
- ADD Localstorage RxStorage.
- ADD docs about Partial Sync.
- ADD SQLite Storage example with tauri #6939.
- ADD
closeDuplicatesflag as alternative toignoreDuplicatetocreateRxDatabase#7013. - FIX (electron) "Object has been destroyed" error was introduced again in RxDB version 16 #5370.
- FIX Memory-mapped storage can have duplicate documents if a write happens during cleanup.
- FIX migrate schema with multiple connected storages causes error #7008
- FIX col.find() ignores the primaryKey index if another index was defined #6925
- Add a free trial version of the SQLite RxStorage
- Add article about Why Local-First Software Is the Future and its Limitations
- Fix Firestore replication ignoring initialCheckpoint #6850
- UPDATE foundation-db to the latest version #6876
- ADD Allow to use firestore rules on attributes #6896
- FIX FilesystemNode storage imported stuff from the IndexedDB storage which could break builds.
- FIX broken cjs import on the flexsearch plugin
- ADD option
toggleOnDocumentVisibletoreplicateRxCollection(). See - ADD
RxReplicationState.pause() - ADD
RxReplicationState.isPaused() - ADD tests to replication to ensure running the same replication in multiple tabs at once does not fail.
- ADD option to set custom formats in the schema validators
- CHANGE enable Ajv strict mode.
- REMOVE
console.log('exposeWorkerRxStorage()');from the worker RxStorage. - ADD dev-mode check for
undefinedproperties in queries. #6792
- Run the check for
maxLengthon primary keys also in non-dev mode because people often forget to set this. - Make error messages prettier and more readable.
- ADD
RxCollection.insertIfNotExists() - Allow uppercase chars at the middle of collection names like
fooBar. - FIX RxServer to not have
process is not defined#6764
- Include RxDB version details in MongoDB handshake #6722
- ADD Allow connectionParams to be provided as part of wsOptions for replication-graphql #6741
🚀 RxDB v16 is released
- A list of changes for RxDB v16 can be found here
- FIX bulkInsert with primary keys set in preInsert hook broken in v15.38.3 #6608
- ADD possibility to pass graphql-ws options into the replication options #6598
- FIX findByIds not working with modify and patch #6592
- FIX bulk inserting 2 docs with same primary key should throw #6589
- CHANGE use variable random string lengths in the tests to ensure this works.
- FIX random string creation in tests could end up with strings longer than the provided
length
-
FIX bad RxState after cleanup #6503
-
FIX RxServer cors settings only applies to OPTIONS when using ExpressAdapter #6523
-
ADD random emojis and umlauts to all random strings in the tests to ensure this works correctly.
-
REMOVE faker dependency for tests and instead use random strings with emojis and umlauts.
-
FIX OPFS RxStorage not working anymore after a cleanup has run on documents with umlauts in the primaryKey or index fields.⬅️ This has been moved to RxDB v16 because it would be a breaking change.
- FIX position of dev-mode iframe #6516
- FIX
$ninqueries not working correctly with the SQLite RxStorage - FIX (worker storage) when creating the same database in the worker and on the main thread, the main thread never resolves. via discord
- ADD SQLite RxStorage support for Expo SDK 51 with the async API
getSQLiteBasicsExpoSQLiteAsync()
- ADD option to define the RxDB Premium token in an
.envfile
- 🆕📢 New Article: LocalStorage vs. IndexedDB vs. Cookies vs. OPFS vs. WASM-SQLite
- FIX RxState.property$ should emit stable reference #6462
- ADD proper error message if people miss out the
usesRxDatabaseInWorkersettings in OPFS.
- FIX OPFS Storage based RxDatabase cannot be created inside of worker via discord
- IMPROVE performance of nested property access #6406
- FIX firestore replication of multiple document with the same serverTimestamp #6436
- ADD tutorial for a local-first Vector Database
- FIX RxPipeline tries to store metadata that does not match the json schema.
- ADD utilities function for vector search.
- ADD Fulltext Search Plugin
- FIX
RangeError: Invalid count valueerror in the OPFS and filesystem storage on cleanups.
- FIX
postCleanuphook not running
- ADD
postCleanuphook.
- ADD RxPipeline Plugin.
- FIX (denoKV RxStorage) retry writes when db is locked.
- FIX
node:sqlitecouldn't be found in react native #6291
- FIX
node:sqlitecouldn't be found in react native #6291
- FIX quotes problem on windows with the scripts of the
package.json - CHANGE
getSQLiteBasicsNodeNative()requires the constructor as param - FIX key-compression broken with boolean indexes on dexie #6267
- FIX type of
RxQuery.$must beObservable#6285
- ADD support for the
node:sqlitemodule to the SQLite RxStorage - FIX several problem with the memory-mapped RxStorage in ReactNative
- ADD storage bucket support to the IndexedDB RxStorage.
- FIX error when calling bulkUpsert() with multiple docs where one fails and one suceeds.
- CHANGE RxStorage interface: For better performance on remote storages,
RxStorageInstance.bulkWrite()must only return errors, not the written documents data.
- FIX Wrong Reactivity generics passed by RxCollection extending RxCollectionBase #6188
- IMPROVE performance of ChangeEventBuffer by processing events in bulks.
- IMPROVE performance of DocCache by processing events in bulks.
- IMPROVE performance of ChangeEventBuffer and DocCache by lazily processing tasks.
- IMPROVE performance of
.appendToArray() - IMPROVE performance of writes to the memory RxStorage
- ADD iframe tracking to dev-mode plugin.
- FIX RxState sometimes does writes to the storage that do not match the schema.
- FIX Query Builder does not work on queries created by
.findByIds()#6148 - FIX (IndexedDB RxStorage) When used with Sharding and Workers, it sometimes errors on the first query after db creation.
- Opened the RxDB User Survey 2024
- FIX rx-state multi instance observable broken #6084
- FIX type resolving in webpack #6051
- Add missing extensions error field to errorToPlainJson #6029
- ADD dedicated errors page
- FIX randomly failing replication test
- ADD non-premium console.log on the LokiJS RxStorage
- ADD publish the npm package with the provenance statements
- FIX
collection.remove()must end up with the correct RxCollection state across tabs. 5721 - ADD
RxCollection.onRemovehooks to detect the removing of a RxCollection across tabs. - IMPROVE performance of insert to IndexedDB
- ADD non-premium console.log on the Dexie.js RxStorage
- ADD
RxQuery.patch()RxQuery.incrementalPatch()RxQuery.modify()RxQuery.incrementalModify()andRxQuery.incrementalRemove(). - FIX
RxDocument.update()must return the latest revision of theRxDocument. - ADD(GraphQL replication) change GraphQL query builder functions to generate output fields for nested queries #5976
- ADD
queryModifierto SQLite RxStorage - IMPROVE performance of insert-many to the memory RxStorage by 40%.
- IMPROVE performance of
getHeightOfRevision(). - ADD check to throw helpfull error message when a Date() object is passed instead of plain json data.
- ADD the new Memory-Mapped RxStorage, a better alternative for the Memory-Synced RxStorage.
- Memory RxStorage: Add
categorizedByWriteInputproperty that can be used by other plugins.
- FIX CouchDB replication error
Cannot read properties of undefined (reading '_attachments')
- FIX memory-synced storage must be able to query encrypted fields on the in-memory side.
- RxServer:
updatedAtmust belwt#61 - RxServer: Fix using
parseFloatinstead ofparseInt#5883
- ADD
RxReplicationState.remove()to delete the metadata of a specific replication. - FIX IndexedDB RxStorage: Rerun database creation when IndexedDB database was closed by safari bug
- FIX vite bundling error with WebRTC replication #5841
- ADD replication-webrtc: allow passing config to simple-peer #5838
- Update dexie.js to version
4.0.1 - Deprecate LokiJS RxStorage
- ADD
PreactSignalsRxReactivityFactoryto use custom reactivity with preact signals instead of observables. - ADD
VueRxReactivityFactoryto use custom reactivity with vue shallow refs instead of observables. - ADD(reactivity) pass reference to
RxDatabasetofromObservable()
- REFACTOR RxServer package. (Includes breaking changes of the beta RxServer!)
- SQLite RxStorage add support to use Webassembly SQLite in the browser
- FIX(Lokisjs RxStorage) always use slice() for applying offset and limit #5757
- FIX randomly failing lokijs and denokv test #5765
- ADD RxState: A convenient state library to store, fetch and observe complex json data that is persisted into RxDB.
- ADD automatically extend the RxDocument type so it knows about the
RxDocument.myField$observables. - ADD check to ensure
Infinityis not used when defining index sizes in theRxJsonSchema - FIX do not automatically set
multiInstance: falsefor shared worker storage databases.
- IMPROVE OPFS RxStorage performance.
- ADD
usesRxDatabaseInWorkeroption to the OPFS RxStorage. - ADD
getRxStorageOPFSMainThread()to run OPFS from the main thread instead of a worker for less latency.
- FIX creating two databases with the same name but different storage must work.
- ADD
awaitWritePersistenceoption to memory-synced storage.
- FIX #5624 Maximum call stack size exceeded during encryptString
- ADD support for custom reactivity factories like angular signals or vue template refs.
- FIX key-compression broken on keys with brackets #5605
- FIX using encryption plugins inside of worker was broken
- FIX(premium) missing type
SharedWorker
- FIX(lokijs)
$inoperator not working on arrays.
- FIX firestore replication not working with schema validation #5572
- FIX Replication observation mode ignored when push handler is waiting #5571
- FIX migration from v14 -> v15 is broken when IndexedDB is used inside of worker. 5565
- ADD(worker storage) support for directly imported
WorkerandSharedWorkerfunctions asworkerInput.
- ADD export test utilities so other projects can use them
- ADD helpers for the new server plugin
- ADD
RxJsonSchema.internalIndexes - ADD(opfs-storage) allow to set
jsonPositionSizeto increase the maxium database size to be bigger than 100 MegaByte.
- ADD tutorial on how to start a HTTP replication with a custom server
- FIX
.count()broken on key-compression plugin #5492 - UPDATE dexie to version
4.0.1-beta.6#5469
- FIX(dexie.js) migration from v14 to v15 not working.
- ADD initialCheckpoint for Couchdb #5461
- Add
operationNameto graphQL requests #5418 - Custom fetch to support axios for the graphQL replication #5421
- FIX CRDT not working with undefined fields #5423
🚀 RxDB v15 is released
- A list of changes for RxDB v15 can be found here
- Ensure the test suite runs in the bun runtime
- Expose path in validate-z-schema error logs #4900
- ADD options for the worker storages #4925
- ADD the MongoDB RxStorage
- FIX primaryKey with value "constructor", breaks findOne()
- FIX Queries with
$ltselector on primaryKey broken #4751 - UPDATE mingo to
6.4.4
- FIX using
.count()withallowSlowCount: truecan return wrong results.
- FIX count() is incorrect #4755
- FIX #4804 requestIdlePromise broken in react-native (#4813)
- FIX #4781 GraphQL Replication Cancel With Database Destroy
- Fix returning deleted items in find queries #4773
- ADD NATS replication
- Add new hooks in the replication write #4754
- REFACTOR(docs) quickstart page
- REFACTOR(docs) landing page
- FIX(couchdb replication) Retries must respect
retryTimeto not cause the UI to stuck related #4612 - FIX(OPFS RxStorage) various bugs with umlauts
- REMOVE outdated tests related #4741
- FIX checkSchema for anyOf and items array #4741
- FIX remove
pouchdb-selector-coredependency #4722
- ADD Links to RxDB User Survey 2023
- FIX better support for as const schemas #4686
- ADD attachment compression plugin
- REFACTOR Use custom
appendToArray()instead of slowArray.concat()
- FIX(data-migrator) use
count()instead ofquery()to count documents. - FIX(data-migrator) send correct
writeRow.previousto old storage for deletion.
- FIX(docs)
eventReduce: falseis the default. #4614 You have to manually enable eventReduce. - ADD(storage-opfs) attachments support.
- CHANGE
RxStorageInstance.getAttachmentData()adddigestparameter.
- ADD OPFS RxStorage for browsers (premium).
- ADD Check to ensure that the primaryKey does not contain a double-quote.
- FIX(remote-storage)
mode: 'one'option must reuse the RemoteMessageChannel - IMPROVE performance of index creation on some storages.
- FIX
requestIdlePromise()must run in a queue. - ADD Export ReplicationOptions type #4606
- ADD
modeoption to remote storage
- FIX wrong index generation on some number fields that do not have decimals.
- ADD method
getPrimaryKeyFromIndexableString() - REFACTOR utils for
MapandWeakMapcaching - FIX: lost RxDocument in preSave from v14.0.0 #4581
- ADD
getIndexStringLength()helper method
- ADD (dev-mode) ensure it throws on malformated primary keys
- UPDATE typescript to version 5
- ADD(replication-firestore): add filtered replication #4590
- FIX(typescript) schema type not working with readonly array #4579
- FIX multiple problems in the query planner
- ADD 'includeWsHeaders' property for GraphQL replication #4533
- UPDATE broadcast-channel to version
5.0.0 - FIX query-builder copies RxQuery's other param #4587
- FIX RxDocument getter should return the same object on property paths #4548
- OPTIMIZE use
findDocumentsById()on queries that do only do an$inoperator on the primary key. - FIX
$orquery with other operator on dexie.js
- ADD docs for remote storage
customRequestHandler
- CHANGE increase the default batch size of the migration plugin from
10to200. - FIX
awaitInitialReplication()must not resolve on error-only replication handlers.
- FIX ensure writing many documents at once works with every RxStorage.
- REMOVE broken dev dependency wrtc
- FIX(SQLite) broken pragma calls on iOS
- CHANGE premium plugin users can still use the code after the license has expired.
- ADD(utils) export
RXDB_VERSIONvariable. - REFACTOR(RxStorageStatics) use the same query matcher and sort function everywhere, not dependend by storage implementation.
- SQLite: Added logger function
- ADD capacitor build to angular example
- websocket-replication: pass all websocket options to constructor #4449
- FIX Firebase Replication Issues #4405
- FIX(websocket remote storage) custom request not working with multiple clients
14.0.0 (8 February 2023) BREAKING read the announcement
-
Remove the deprecated PouchDB RxStorage.
-
REMOVE old
replication-couchdbplugin. Renamereplication-couchdb-newtoreplication-couchdb. -
Remove depricated
skipIfSamefromputAttachment() -
CHANGE use plain json errors inside of RxError parameters to make debugging easier.
-
CHANGE Make RxDocuments immutable
-
ADD
RxDocument.getLatest() -
CHANGE
RxCollection.findByIds()now returns aRxQuery. -
REMOVED
RxCollection.findByIds$, useRxCollection.findByIds().$instead. -
CHANGE Prefix storage plugins with
storage-likerxdb/plugins/storage-dexie. -
RENAME
atomicUpdate()toincrementalModify() -
RENAME
atomicPatch()toincrementalPatch() -
RENAME
atomicUpsert()toincrementalUpsert() -
ADD
RxDocument().incrementalUpdate() -
ADD
RxDocument.incrementalRemove() -
ADD non-incremental
RxDocumentmethodspatch()andmodify() -
ADD typings to the query selector
-
CHANGE start replication via pure functions instead of RxCollection methods.
-
CHANGE
RxDocument.$emitsRxDocumentinstances instead of the plain document data. -
ADD
push.initialCheckpointto start a replication from a given checkpoint. -
CHANGE Do not use hash for revisions but use database instance token instead.
-
CHANGE crunch multiple incremental (aka 'atomic') operations into a single database write. Also batch writes to multiple documents into a single write.
-
REMOVE deprecated
babel-plugin-transform-async-to-promisesplugin. -
CHANGE to reduce bundle size and improve performance, the following JavaScript features will no longer be transpiled:
Bugfixes:
- CHANGE (memory RxStorage) do not clean up database state on closing of the storage, only on
remove(). - FIX CouchDB replication: Use correct default fetch method.
- FIX schema hashing should respect the sort order #4005
- FIX replication does not provide a
._revto the storage write when a conflict is resolved. - FIX(remote storage) ensure caching works properly even on parallel create-calls
- FIX(replication) Composite Primary Keys broken on replicated collections #4190
- FIX(sqlite) $in Query not working SQLite #4278
- FIX CouchDB push is throwing error because of missing revision #4299
- ADD dev-mode shows a
console.warn()to ensure people do not use it in production. - Remove the usage of
Buffer. We now useBlobeverywhere. - FIX import of socket.io #4307
- FIX Id length limit reached with composite key #4315
- FIX
$regexquery not working on remote storage. - FIX SQLite must store attachments data as Blob instead of base64 string to reduce the database size.
- FIX CouchDB replication conflict handling
- CHANGE Encryption plugin was renamed to
encryption-crypto-js - FIX replication state meta data must also be encrypted.
- FIX crash with null in selector #4369
- FIX storage instances MUST NOT mutate the given database- and collection-name.
- REMOVE deprecated
babel-plugin-transform-async-to-promisesplugin. - ADD Ability to use a responseModifier for GraphQL push replication #4385
- FIX Add null check for isRxDocument #4406
- FIX Add missing mingo array operators #4203 Thanks @swnf
- FIX(sqlite)
$elemMatchquery did not work correctly on object arrays. - CHANGE(sqlite) do not use
ORDER BYon count queries for better performance.
- FIX(lokijs) wrong query result when sorting on a nested field.
- IMPROVE usage of the mingo query library by only adding the operators to the build that are really needed.
- CHANGE use faster deep clone method.
- ADD Vite Vanilla Typescript Example Thanks @SebasG22
- ADD Use exports field in package.json Thanks @SebasG22 and @swnf
- ADD
$regexsupport to the SQLite RxStorage
- FIX(SQLite)
getSQLiteBasicsQuickSQLitemust useexecuteAsync
- FIX Ensure equal behavior across all storages on call to
.close()after.remove().
- REFACTOR the
electronplugin to improve ipcRenderer communications. - REMOVE
is-electrondependency.
- REFACTOR the remote RxStorage for electron ipcRenderer
- UPDATE
isomorphic-wsto5.0.0
- ADD Firestore Replication Plugin
- FIX run the unit tests for the migration plugin on all storages.
- ADD electron ipcRenderer plugin which can be used in Electron.js to run the RxStorage in the main process and the RxDatabase in the renderer processes.
- Removed the electron-remote example because
@electron/remoteis deprecated. - FIX emit false on active$ after replication is done #4136 Thanks @maxnowack
- Deprecated the PouchDB RxStorage, read this
- FIX Throw proper error message when a boolean index is used in the Dexie.js RxStorage.
- ADD replication-webrtc which can be used to replicate data peer-to-peer without a backend server.
- ADD replication-couchdb-new plugin which can be used to replicate any RxStorage with a CouchDB endpoint.
- ADD skip replication
retryTimeifnavigator.onLinebecomestrue. - FIX
active$should emit during replication #4117 Thanks @maxnowack
- REFACTOR use faster
areRxDocumentArraysEqualinstead of doing a deep-equal check. - ADD check to easier debug wrongly behaving backend during replication.
- FIX error
dev-mode added multiple timesis removed because it is annoying when using react hot-swap. InsteadaddRxPlugin()will now only throw if a different plugin is added that has the same name as a plugin that was added before. - REFACTOR create the
digestof an attachment inside of theRxStorage, not in RxDB. This makes the behavior equal to CouchDB and solves a lot of problems caused by different hashing or base64 encoding of the RxStorage implementations. (Fixes #4107) Thanks @Elendiar - FIX GraphQL replication: should stop syncing if we receive less docs than pull.batchSize #4110 Thanks @jwallet
- FIX TS Error in Plugin "Replicate-GraphQL" : GraphQL Websocket on "isomorphic-ws" import #4104 Thanks @jwallet
- UPDATE
fake-indexeddbto version4.0.0 - REFACTOR use
webpackinstead ofbrowserifyin karma tests. - REMOVE
graphql-clientdependency #3497
- FIX wrong query results in some cases with many operators.
- REMOVE
deep-freezenpm dependency because it has no author.
- Added RxCollection.count() queries. #4096
- REFACTOR index boundary usage for better performance.
- FIX critical bug in query correctness. IMPORTANT: If you use the RxStorage IndexedDB or FoundationDB, you have to rebuild the indexes by increasing your schema version and running a migration. #4098
- FIX Typo in CRDT Plugin:
RxDDcrdtPluginis nowRxDBcrdtPlugin#4094 Thanks @jwallet
- ADD CRDT Plugin
- FIX calling
.remove()on anRxDocumentmust update the internal data of the document with the deleted state. - FIX Stop retries when replication gets canceled #4088 Thanks @Whoops
- ADD example how to use RxDB with Flutter
- FIX many typos from the TYPOFIX event
- FIX Cannot read properties of null #4055 Thanks @Albert-Gao
- FIX(sqlite) do not run pragma inside of transaction
- ADD in
fastUnsecureHash()use polyfill ifTextEncoderis not available
- FIX many typos from the TYPOFIX event
- FIX
lastOfArray()may return undefined if array is empty #4011 Thanks @AlexErrant - FIX Remove legacy triple slash directives #4023 Thanks @jeromepochat
- FIX randomly failing replication test
- REFACTORED the landingpage to have less blinking and no more autoplay audio.
- ADD new premium plugin
RxStorage Localstorage Meta Optimizer
- REFACTOR stuff for a new optimization plugin
- FIX image attachments not working correctly in the browser
- FIX Push batchSize in not respected #3994
- FIX boolean indexes not working #3994
- FIX(sqlite) use dollar params instead of named params
- CHANGE run performance tests without the
dev-modeplugin - IMPROVE performance of document writes by not using try-catch in a hot path.
- FIX
RxDatabase.remove()must properly remove the collection storage together with the replication states.
- FIX respect the
prefers-reduced-motionmedia query to not show blinking animations to neurodiverse people at the landingpage. - ADD
pull.responseModifierto the graphql replication plugin so that you can aggregate the checkpoint from the returned graphql response.
- FIX saving multiple attachments broke previously stored attachments on some storages.
- UPDATE graphql websocket dependencies #3980 Thanks @herefishyfish
- FIX on
RxCollection.remove()the related storages like the meta of replications, must also be removed.
- FIX sorting via
event-reducedid not work whenkey-compressionplugin was used.
- FIX
event-reducedid not work whenkey-compressionplugin was used.
13.0.0 (16 September 2022) BREAKING read the announcement
-
FIX
graphQLSchemaFromRxSchema()must not create broken schema when there are noheaderFields -
ADD credentials settings to the GraphQL replication plugin #3976 Thanks @marcoklein
-
RENAMED the
ajv-validateplugin tovalidate-ajvto be in equal with the other validation plugins. -
The
is-my-json-validvalidation is no longer supported until this bug is fixed. -
REFACTORED the schema validation plugins, they are no longer plugins but now they get wrapped around any other RxStorage.
- It allows us to run the validation inside of a Worker RxStorage instead of running it in the main JavaScript process.
- It allows us to configure which
RxDatabaseinstance must use the validation and which does not. In production it often makes sense to validate user data, but you might not need the validation for data that is only replicated from the backend.
-
REFACTORED the key compression plugin, it is no longer a plugin but now a wrapper around any other RxStorage.
- It allows to run the key-comresion inside of a Worker RxStorage instead of running it in the main JavaScript process.
-
REFACTORED the encryption plugin, it is no longer a plugin but now a wrapper around any other RxStorage.
- It allows to run the encryption inside of a Worker RxStorage instead of running it in the main JavaScript process.
- It allows do use asynchronous crypto function like WebCrypto
-
Store the password hash in the same write request as the database token to improve performance.
-
REMOVED many unused plugin hooks because they decreased the performance.
-
REMOVED support for temporary documents see here
-
REMOVED RxDatabase.broadcastChannel The broadcast channel has been moved out of the RxDatabase and is part of the RxStorage. So it is not longer exposed via
RxDatabase.broadcastChannel. -
In the RxDB internal
_meta.lwtfield, we now use 2 decimals number of the unix timestamp in milliseconds. -
REMOVE RxStorageStatics
.hashand.hashKey -
CHANGE removed default usage of
md5as default hashing. Use a faster non-cryptographic hash instead.- ADD option to pass a custom hash function when calling
createRxDatabase.
- ADD option to pass a custom hash function when calling
-
Removed the
liveIntervaloption of the replication. It was an edge case feature with wrong defaults. If you want to run the pull replication on internval, you can send aRESYNCevent manually in a loop. -
CHANGE use
Floatinstead ofIntto represent timestamps in GraphQL. -
REPLACED
RxReplicationPullErrorandRxReplicationPushErrorwith normalRxErrorlike in the rest of the RxDB code. -
REMOVED the option to filter out replication documents with the push/pull modifiers #2552 because this does not work with the new replication protocol.
-
CHANGE default of replication
liveto be set totrue. Because most people want to do a live replication, not a one time replication. -
CHANGED Attachment data is now always handled as
Blobbecause Node.js does supportBlobsince version 18.0.0 so we no longer have to use aBufferbut instead can use Blob for browsers and Node.js -
FIXED multiple problems with encoding attachments data. We now use the
js-base64library which properly handles utf-8/binary/ascii transformations. -
RENAMED the
serverplugin is now calledserver-couchdbandRxDatabase.server()is nowRxDatabase.serverCouchDB() -
ADDED the websocket replication plugin
-
ADDED the FoundationDB RxStorage
-
FIX
couchdb-serverplugin missed out events from the replication. -
ADD Support JsonSchema for nested additionalProperties #3952 Thanks @swnf
-
REFACTORED the layout of
RxChangeEventto better match the RxDB requirements and to fix the 'deleted-document-is-modified-but-still-deleted' bug.
- CHANGE use eslint rule
require-awaitto reduce build size.
- FIX unify checkpoint behavior across all RxStorage implementations.
- FIX github release bot to only post non-patch releases to discord.
- ADD export type
CategorizeBulkWriteRowsOutput - CHANGE
RxStorageInstance.getChangedDocumentsSince()only returns the last checkpoint, not one for each document.
- ADD export type
RxStorageDefaultCheckpoint
- FIX #3839 executing insert -> remove -> insert -> remove does not work. Thanks @nisarpeitang
- ADD
checkpointto the internal used events that are emitted in theRxStorageInstance.changestream(). - FIX randomly failing test with dexie.js RxStorage.
- ADD
customparameter toRxStorageInstance.bulkWrite()
- Moved from gitter to discord
- ADD
bulkSizeoption to Memory Synced RxStorage
- ADD
getPouchDBOfRxCollection()to easy access the PouchDB instance of a RxCollection.
- Add the Memory Synced RxStorage to the premium plugins.
- Add conflict handling to RxCollection.
- ADD
isRxDatabaseFirstTimeInstantiated()
- FIX RxStorageReplication must work with local documents.
- The worker RxStorage will no longer reuse the worker so that multiple RxDatabase instances can use different workers for better performance.
- Cross-Tab event propagation is now handled by the RxStorage implementations, not by the RxDatabase. This allows to better combine RxStorages and plugins/wrappers.
- Only check if final field have been changed in dev-mode.
- Fix
atomicUpsert()broken when document was replicated before. #3856. Thanks @AntonOfTheWoods - Refactor revision handling
- Fix the
_revthat is passed to an RxStorage must be respected by the RxStorage.
- UPDATE Node.js to version
18.3.0 - FIX: RxStorage should never emit an eventBulk with an empty events array.
- Update PouchDB to
7.3.0Thanks @cetsupport. - CHANGE (RxStorage) revision hash must not include the
_metafield. - Added new Stream replication for internal usage in plugins.
- SQLite RxStorage: Add support for specific query indexes.
- FIX query planner did not pick the correct index on
$eqoperations. - IMPROVE performance of the memory RxStorage
- IMPROVE performance of custom index creation
- ADD query optimizer to premium plugins.
- REFACTOR if no sort order is set on a query, use a better matching sort order and not just the primary key.
- OPTIMIZE
isFindOneByIdQuery()should betruewhen only the primary field is queried with an$eq - REWRITE query planner to use better indexeses in dexie.js and memory storage.
- ADD attachment support to SQLite
RxStorage - ADD attachment support to IndexedDB
RxStorage - FIX collections with a dash in the name where not properly removed #3785 Thanks @mmouterde
- FIX data still there despite remove and destroy calls #3788 Thanks @mmouterde
- ADD
notifyAboutRemoteChange()to the GrapQL replication and replication primitives. - ADD attachment support to memory
RxStorage. - FIX default of
waitForLeadershipin replication primitives must betrue
- IMPROVE memory storage performance.
- FIX dexie.js storage does not work with keyCompression when having a nested schema.
- Added
autoStartoption to the replication plugins #3775 Thanks @mmouterde - Fix #778 Storing string array was broken in the dexie storage. Thanks @mmouterde
12.0.0 (26 April 2022) BREAKING read the announcement
-
All indexes that do not contain the primaryKey, get the primary key added.
-
You can now set a custom index when doing a query.
-
Unified the replication primitives and the GraphQL replication plugin.
-
Removed the deprecated in-memory plugin.
-
Added cleanup plugin
-
Refactor local documents plugin to only create a storage instance for local documents when needed.
-
Removed the
coreplugin. The default exportfrom 'rxdb'now exports only the RxDB core without plugins. -
The Dexie.js RxStorage is no longer in beta mode.
-
Added the in memory storage plugin.
-
Added
RxDocument().toMutableJSON() -
Added
RxCollection().bulkUpsert() -
Added optional
init()function toRxPlugin. -
dev-mode: Add check to ensure all top-level fields in a query are defined in the schema.
-
Support for array field based indexes like
data.[].subfieldwas removed, as it anyway never really worked. -
Refactored the usage of RxCollection.storageInstance to ensure all hooks run properly.
-
Refactored the encryption plugin so no more plugin specific code is in the RxDB core.
-
Removed the encrypted export from the json-import-export plugin. This was barely used and made everything more complex. All exports are no non-encrypted. If you need them encrypted, you can still run by encryption after the export is done.
-
RxPlugin hooks now can be defined as running
beforeorafterother plugin hooks. -
Attachments are now internally handled as string instead of
BloborBuffer -
Fix (replication primitives) only drop pulled documents when a relevant document was changed locally.
-
Fix dexie.js was not able to query over an index when
keyCompression: true
Changes to RxStorageInterface:
RxStorageInstancemust have theRxStoragein thestorageproperty.- The
_deletedfield is now required for each data interaction withRxStorage. - Removed
RxStorageInstance.getChangedDocuments()and addedRxStorageInstance.getChangedDocumentsSince()for better performance. - Added
doesBroadcastChangestream()toRxStorageStatics - Added
withDeletedparameter toRxStorageKeyObjectInstance.findLocalDocumentsById() - Added internal
_metaproperty to stored document data that contains internal document related data like last-write-time and replication checkpoints.
Bugfixes:
- #3666 RxDB with lokijs works bad in Safari and FF when using multiple tabs
Other:
- Replication primitives must throw an error if
_deletedfield is missing. #3671
Bugfixes:
RxStorage.statics.getQueryMatcher()must not match documents with_deleted: true.- Fixed multiple problems with
RxCollection.findByIds$()#3659 Thanks @Hideman85
Features:
- Improve emitted errors of the GraphQL replication #3630 Thanks @nirvdrum
- Added Dexie.js based
RxStorage. Read the docs
Bugfixes:
Features:
Other:
.findOne(documentId)should useRxStorage().findDocumentsById()instead ofRxStorage().query()
Bugfixes:
Bugfixes:
- Replication Primitives: Local writes while running the
pullmust not be lost but send to the remote. - Replication Primitives: Should not stack up failed runs and then run many times.
- Support composite indices in schema literal types #3609 Thanks @nirvdrum
Features:
- Added
toTypedRxJsonSchemaandExtractDocumentTypeFromTypedRxJsonSchemato generate the document types from the schema.
11.0.0 (3 January 2022) BREAKING read the announcement
BREAKING:
- RxStorage: The non async functions
prepareQuery,getSortComparatorandgetQueryMatcherhave been moved out ofRxStorageInstanceintoRxStorage. This was needed to have better WebWorker support. This will not affect you do not use a customRxStorageimplementation. - LokiJS: Do not use the
IdleQueueof the RxDatabase to handle calls to saveDatabase(), instead wait for CPU idleness of the JavaScript process. RxStorageInterface:- Replaced all
Mapwith plain json objects so that they can beJSON.stringify-ed - Replaced typings of event stream to use
EventBulkand process events in bulks to save performance. - Move all static methods into the
staticsproperty so we can code-split when using the worker plugin. digestandlengthof attachment data is now created by RxDB, not by the RxStorage. #3548- Added the statics
hashKeyproperty to identify the used hash function.
- Replaced all
- Internally all events are handles via bulks, this saves performance when events are transfered over a WebWorker or a BroadcastChannel.
- Removed the deprecated
recievedmethods, usereceivedinstead. See #3392 - Removed the
no-validateplugin. To use RxDB without schema validation, just do not add a validation plugin to your custom build.
Bugfixes:
- Do not throw an error when database is destroyed while a GraphQL replication is running.
- Compound primary key migration throws "Value of primary key(s) cannot be changed" #3546 Thanks @nothingkid
- Allow
_idas primaryKey #3562 Thanks @SuperKirik - LokiJS: Remote operations do never resolve when remote instance was leader and died.
Other:
- LokiJS: All documents are stored with a
$lastWriteAtfield, so we can implement an auto compaction later. - Transpile
async/awaitto promises instead of generators. via babel-plugin-transform-async-to-promises
Bugfixes:
- LokiJS: Do not call
saveDatabase()when no persistence adapter is given. - Query returns outdated result in second subscription #3498 Thanks @swnf
- Spawning a server when full leveldown-module is used must not throw an error.
Bugfixes:
- PouchDB:
getSortComparator()broken on some complex$orquery.
Other:
- GraphQL replication must wait for
requestIdlePromiseto not slow down more important tasks.
Bugfixes:
- LokiJS: Directly create local state when instance becomes leader.
- LokiJS:
mustUseLocalState()should not create multiple local states.
Bugfixes:
- GraphQL replication should affect
requestIdlePromiseand while replication IO is running, the database must not be idle. - Creating a collection that has existed before must not cause a database write.
- LokiJS: Fixed error log when reloading while having the database open in multiple browser tabs.
Other:
- Removed useless runtime check of database name, only check in dev-mode.
Changes:
- LokiJS: Use custom save handler instead of setting
autosave: true
Other:
- Decreased build size by not importing
pouchdb-utils - Improve build size and performance by replacing deep-equal with fast-deep-equal
- Remove module
random-tokenand use the same random string generator everywhere.
Bugfixes:
- LokiJS: Ensure events emit exact the same data as with PouchDB.
- LokiJS: Queries with limit and skip where broken.
- LokiJS: Fix all bugs and run the whole test suite with LokiJS Storage
- Fix PouchDB RxStorage sometimes returned wrong sort comparison results.
Other:
- Updated event-reduce for more optimizations.
- Allow dash character
-in collection and database names.
Bugfixes:
- LokiJS
findDocumentsById()returned additional$lokiproperty. - LokiJS
bulkAddRevisions()must not mutate the input. - LokiJS deletes on GraphQL replication must work.
Bugfixes:
- LokiJS: Upserting a deleted document did not work.
- LokiJS: Storage queries returned additional
$lokiproperty.
Bugfixes:
- LokiJS Storage must have a deterministic sort order.
Bugfixes:
- Sort queries broken with LokiJS RxStorage.
Bugfixes:
- Fix endless loop when using GrapQL-replication & LokiJS RxStorage.
Features:
- Added LokiJS
RxStorageplugin.
Bugfixes:
- Fixed missing closings of
RxStorageinstances when the database or collection is destroyed.
Other:
- Improved performance of write operations.
- Removed unnecessary abstraction layer of
LeaderElector
Bugfixes:
Other:
- Improved performance when many queries are created in a short timespan.
- Database- and collection names can now contain the minus char
-.
Bugfixes:
- GraphQL replication: push not working with keyCompression.
Bufferis not available in browsers #3454 Thanks @swnf
Bugfixes:
- Observed document data must be deep freezed in dev mode #3434 Thanks @chrisdrackett
Other:
- We now have set
sideEffects: falseto the default in the package.json so tree shaking can work. - Optimized memory usage in the query cache.
Features:
Other:
- Refactored the migration plugin for better performance by writing the documents in bulk requests
- Added svelte example #3287 Thanks @bkeating
- Improved error messages
Bugfixes:
- #3319 Graphql replication checkpoint was not deleted after running
RxDatabase.remove() - Fixed spelling of
recieved -> receivedeverywhere. The old getters are still useable butdeprecated#3392. Thanks chrisdrackett
Bugfixes:
- Calling bulk-methods with an empty array must not throw an error.
RxCollection.remove()does not delete local documents #3319
10.0.0 (20 July 2021) BREAKING read the announcement
Breaking:
-
Setting a
primaryKeyfor a schema is now required. -
When using the type
RxJsonSchema<DocType>theDocTypeis now required. -
A JsonSchema must have the
requiredarray at the top level and it must contain the primary key. -
Outgoing data is now
Readonlytyped and deep-frozen in dev mode -
RxDocument.putAttachment()no longer supports string as data, onlyBloborBuffer. -
Changed the default of
putAttachmenttoskipIfSame=true. -
Removed the deprecated
atomicSet(), useatomicPatch()instead. -
Removed the deprecated
RxDatabase.collection()useRxDatabase().addCollections()instead. -
Moved everything pouchdb related to the
pouchdbplugin. -
Pouchdb plugins are not longer added via
addRxPlugin()butaddPouchPlugin(). (RxDB plugins are still added viaaddRxPlugin). -
Removed plugin hook
preCreatePouchDb. -
Removed the
watch-for-changesplugin, this is now directly integrated into the pouchdbRxStorage. -
Removed the
adapter-checkplugin. (The functionadapterCheckhas moved to the pouchdb plugin). -
Calling
RxDatabase.server()now returns a promise that resolves when the server is started up. -
Changed the defaults of
PouchDBExpressServerOptionsfrom theserver()method, by default we now store logs in the tmp folder and the config is in memory. -
Renamed
replication-plugin toreplication-couchdbto be more consistend in naming like withreplication-graphql- Renamed
RxCollection().sync()toRxCollection().syncCouchDB()
- Renamed
-
Renamed the functions of the json import/export plugin to be less confusing
dump()is nowexportJSON()importDump()is nowimportJSON()
-
RxCollectionuses a separate pouchdb instance for local documents, so that they can persist during migrations.
Features:
- Added support for composite primary keys.
Other:
- Moved all
should never happenerrors into own error code.
Typings:
- Improved typings of error codes.
Features:
- Added
dataPathproperty to GraphQL replication pull options to allow the document JSON lookup path to configured instead of assuming the document data is always the first child of the response #2606 Thanks @joshmcarthur
Types:
getLocal()can returnundefined. Thanks @chrisdrackett- Fixed typings in the dependencies so you can use
noUncheckedIndexedAccess. Thanks @seanwu1105
Bugfixes:
- Auto-cancel one time couchdb replications to not cause a memory leak
- Fixed another memory leak when calling the couchdb replication many times.
Features:
- Added the backup-plugin
Other:
- Updated
rxjsto version7.0.1
Bugfixes:
- Fixed memory leak in
RxCollection().findByIds$()
Other:
- Added collection name when throwing errors in
RxQuery
Other:
- Added hints abount 2021 user survey.
Features:
- Added possibility to change, update, remove and add
RxAttachments inside of a migration strategy.
Features:
- Added
RxDatabase.migrationStates()which returns an observable to observe the state of all ongoing migrations. - Added
startupPromiseto the returned object ofRxDatabase().server()
Bugfixes:
- Ensure every background task is done when
RxDatabase.destroy()resolves. #2938
Other:
- Added analytics to docs page
Bugfixes:
- Updated
pouchdb-all-dbsfixes #2874 Thanks @openscript
Other:
- Determinstic handling of revision keys during data migration
- Added more information to
RxErrorwhen data migration fails
Features:
- Added
RxReplicationState.awaitInitialReplication()
Bugfixes:
- Using the replication plugins must not required to also use leader-election
- Refactor
QueryCache.triggerCacheReplacement()to not spawnsetTimeoutregulary. This is needed for server side rendering with angular universal.
Other:
- Added server side rendering to the angular example
Features:
- Added
RxCollection().bulkRemove()#2845 Thanks @qinyang912
Other:
- Improved typings of
insertLocal()#2850 Thanks @openscript - Improved typings of
bulkInsert()
Bugfixes:
- #2785 postInsert hook not working when use bulkInsert to insert doc. Thanks @qinyang912
- Setted
sideEffects: truefor main module #2798
Other:
- (docs) added warning about indexeddb adapter
- Upgraded typescript to
4.1.3
Features:
- Allow
primaryandrefat the same time in a schema. #2747
Bugfixes:
- #2705 when use bulkInsert to insert doc, the rxDocument property on changeEvent is an object, not a RxDocument instance. Thanks @qinyang912
- When the mutation function of
atomicUpdate()has thrown once, it was not possible to use it again.
Features:
- Added
putAttachment(skipIfSame), if set totruea write will be skipped if the attachment already exists with the same data.
Bugfixes:
awaitInitialReplication()resolves on failed replication #2745. Thanks @dome4insertLocal()not emitted the state change across tabs
Other:
- Added
nameidentifier toRxPlugin - Throw error when
dev-modeplugin is added multiple times because there is no way that this was done intentional likely the developer has mixed core and default usage of RxDB. - Fix reported security problem with the query builders mquery api.
Other:
- Additional refactorings to improve collection creation speed
Features:
- Added
RxCollection.getLocal$()andRxDatabase.getLocal$()to observe local documents. - Added
RxDatabase.addCollections()to create multiple collections at once. Is faster and better typed than the now deprecatedRxDatabase.collection()
Other:
- Improved typings for
pouchdb.changes() - Moved from travisci to github actions
Other:
- Improved startup performance by doing a index-exist check
- Added check for
propertiesto dev-mode schema check - Add better checks for query input in dev-mode
Features:
- Added subscription parameters for
graphQLSchemaFromRxSchema() - Added RxDocument.atomicPatch()
Bugfixes:
- (types) Returned values of
syncGraphQL()did not type-match withRxGraphQLReplicationState RxDocument.atomicUpdate()now does a retry on 409 write conflicts
Other:
- Added authentication to graphql example
- Deprecated
RxDocument.atomicSet(). UsedatomicPatchinstead, it works better with typescript - (docs) added workarounds for 6-connection limit at couchdb replication #2659. Thanks @MuresanSergiu
Bugfixes:
- Server-Plugin: Replication did not work until there is at least one document.
- Fix skipping docs in graphql push replication #2627 Thanks @DDoerner
Bugfixes:
RxLocalDocument.$emitted to often on changes #2471- Fix typings of
RxReplicationState.collection
Features:
- Allow to skip docs in push/pull modifiers with the graphql-replication. #2552 Thanks @DDoerner
- Allow to type the data of
RxLocalDocumentlikemyDatabase.getLocal<{foo: string}>('bar')
Other:
Features:
Bugfixes:
- wrong key handling on compound indexes #2456 Thanks @dome4
- Nested
$orqueries where broken when they used the primaryKey in the selector
Other:
- Upgraded pouchdb to
7.2.2 - Upgraded typescript to
3.9.7
Features:
- Add cache-replacement-policy for the QueryCache
- GraphQL replication async modifier function #2367
Bugfixes:
- GraphQL replication run increasing requests when offline #2336
Features:
- Added (beta)
RxCollection.findByIds()to get many documents by their id with a better performance.
Other:
- Added typings for
pouch.allDocs()
Bugfixes:
ref-fields must be nullable #2285 Thanks @kunal15595- RxDatabase names can no longer end with a slash #2251 which breaks the server plugin.
Other:
- Added
"sideEffects": falseto all plugins
Features:
RxDatabase.server()does now acceptpouchdbExpressOptionsto set the log file and other stuff configured on express-pouchdb
Bugfixes:
- prepareQuery should handle all comparison operators #2213 Thanks @kunal15595
Other:
- Added webpack tree shaking optimization via
sideEffects: false
9.0.0 (16 May 2020) BREAKING read the announcement
Features:
- Added
RxQuery.exec(throwIfMissing: true) - Added helper functions to GraphQL replication to generate GraphQL Schemas from the
RxJsonSchema
Bugfixes:
- GraphQL replication plugin fires exponentially #2048
- When a
defaultis set in the schema, the default values are also applied afteratomicUpdate()andatomicSet()
Breaking:
- Indexes are now specified at the top-level of the schema-definition. #1655
- Encrypted fields are now specified at the top-level of the schema-definition
- Removed all default exports. Please only import the stuff that you really need.
- Renamed
RxDB.create()tocreateRxDatabase() - Renamed
removeDatabase()toremoveRxDatabase() - Renamed
plugin()toaddRxPlugin() - Replaced plugins
error-messagesandschema-checkwith dev-mode - Moved data migration from core to migration plugin
- Replaced key-compression implementation with jsonschema-key-compression
- Renamed
RxDatabase.queryChangeDetectiontoeventReduceand set default totrue(no beta anymore) - Change
.find()and.findOne()to acccept a full MangoQuery withsortandlimitinstead of just the selector - Chained queries like
collection.find().where('x').eq('foo')moved out of the core module into the query-builder plugin - The internal
hash()function does now use a RxDB specific salt - Change default of
RxDocument().toJSON(withRevAndAttachments)tofalse - Refactored
RxCollection - Creating a collection will no longer emit an
RxChangeEvent - Removed
RxCollection.docChanges$()because all events are from the docs - Renamed
RxSchema.jsonIDtoRxSchema.jsonSchema - Moved remaining stuff of leader-election from core into the plugin
- Merged multiple internal databases for metadata into one
internalStore - In dev-mode, the GraphQL-replication will run a schema validation of each document that comes from the server
Other:
- Removed many runtime type checks that now should be covered by typescript in buildtime
- The GraphQL replication is now out of beta mode
Docs:
- Removed examples for
require()CommonJS loading
Other:
Features:
Other:
- Upgraded PouchDB and other dependencies
Other:
- Added a new example for electron with the remote API. Thanks @SebastienWae
- Fixed Typing error on
database.dump()#1754. Thanks @PVermeer
Bugfixes:
- Updates to documents fail with GraphQL replication. #1812. Thanks @gautambt
RxQuery.doesDocumentDataMatch()was wrong on queries with$andwhich lead to a wrong result with QueryChangeDetection
Other:
- Improved performance of
QueryChangeDetectionby using array-push-at-sort-position instead of re-sorting the whole results of a query - Improved performance by removing unnecessary calls to deep-clone
Features:
- Added
RxCollection.bulkInsert()
Bugfixes:
- Fix replication of migrated schemas in the server plugin
Bugfixes:
- GraphQL replication sometimes not pushes when a big amount of documents has been pulled before
- Fixed typings of PouchdbReplicationOptions
Other:
- Upgrade pouchdb to
7.1.1 - Refactor some internals
Other:
- Json-Import now uses
bulkDocsfor better performance - Refactored prototype merging so it can be optimised later
- Moved some check into the check-plugin to optimize production build size
- Refactor schema-validation-plugins since sub-path validation is no longer needed
Features:
- RxDB server can now be used with an existing express-app. #1448 Thanks @dstudzinski
- Wrapped pouchdb conflict error into
RxError
Other:
- Fixed typings of
RxErrorparameters - Fix GraphQL-example to propper use Websocket-Pub-Sub
- Migrated to typescript.
- Fixed import of
@types/pouchdb-coreand@types/pouchdb-find
Bugfixes:
- Fixed typings of
preCreateRxCollection#1533 Thanks @yanshiyason
Features:
- Add ability to use
serverapp as a part of bigger Express app #1448 Thanks @dstudzinski
Bugfixes:
- custom server path not working on
server-plugin #1447 Thanks @dstudzinski - Fix CORS headers when the request's credentials mode is 'include' #1450 Thanks @dstudzinski
Other:
- Improved
QueryChangeDetectionto not run on irrelevant changes
Bugfixes:
- Fix imports of encryption-plugin to work with rollup #1413 Thanks @kenshyx
- Removed
express-pouchdbfrom the dependencies #884
Features:
- Added
RxQuery.doesDocumentDataMatch()read the docs
Bugfixes:
- Attachments not working in electron renderer with IndexedDb adapter #1371 Thanks @rixo
- json export/import not working when a document has attachments #1396 Thanks @rixo
Other:
- Improved performance of query-change-detection by reusing the result of
massageSelector
Features:
- Added a plugin for GraphQL-replication
Bugfixes:
Features:
Bugfixes:
Typings:
- ADD typings to access the
PouchSyncHandlerofRxReplicationState
Bugfixes:
- Vue devtools broke the application #1126
Typings:
RxDocument.getAttachment()andRxDocument.allAttachments()did not return promises- ADD RxJsonSchema generic for better TypeScript experience
Bugfixes:
- Server-plugin did not work with absolute paths and leveldb
- Vue threw
get is not a functionwhen a RxDocument was added to a component's state RxDocument.allAttachments()did throw an error when the document has noRxAttachmentRxDocument.toJSON(false)does no longer return the_attachmentsattribute
Bugfixes:
- Fix creating a collection mutates to arguments object #939
- Fix not having optional encrypted fields in a document throws an error #917
Features:
RxDocument().toJSON()can be called with.toJSON(false)and then returns not_revattribute
Bugfixes:
- (typings) Fix
additionalProperties: booleanis allowed for nested objects - (typings) Fix
RxQuery().toJSON()'was missing
Bugfixes:
- Calling
remove()on a deleted RxDocument should return a rejected promise #830 - Passing
auto_compactionto a collection did not work via gitter utilmissing in react-native #890
Bugfixes:
- Updated the dependencies with some bugfixes
Bugfixes:
- Reopening a database after using the wrong password did not work #837
Features:
Bugfixes:
Bugfixes:
- Does not compile in TypeScript with strict flag enabled #448
8.0.0 (18. September 2018) BREAKING read the announcement
Breaking:
- Upgraded to pouchdb 7.0.0
disableKeyCompressionis renamed tokeyCompressionwhich defaults tofalseRxDatabase.collection()now only accepts the json-schema as schema-attribute- It is no longer allowed to set required fields via
required: true, userequired: ['myfield']in compliance with the jsonschema standard - QueryChangeDetection is not enabled in the RxDatabase-options
queryChangeDetection: true - Setters and
save()are only callable on temporary documents - Removed
RxDocument.synced$andRxDocument.resync() - Middleware-Hooks now have
plainJsonas first parameter andRxDocument-instance as second - Typings have been modified, see
postCreateRxDocument-hooks will not be awaited if they are async
Features:
- Added
RxDocument.atomicSet() - Added
RxCollection.awaitPersistence()for in-memory-collections - Added
RxReplicationState.denied$#763 - Added option for CORS to server-plugin
this-scope of collection-hooks are bound to the collection itself #788- All methods of
RxDocumentare bound to the instance #791 - Added
RxReplicationState.alive$, see. Thanks @rafamel
Bugfixes:
- checkAdapter doesn't cleanup test databases #714
- inMemory collections don't implement static methods #744
- inMemory collections do not sync up removals #754
- Ensure
finalfields cannot be changed onRxDocument.atomicUpdate()andRxDocument.update() - Fixed a missing dependency on the server-plugin
Other:
- cross-instance communication is now done with https://github.com/pubkey/broadcast-channel (way better performance)
- Upgrade to eslint 5 (no more babel-eslint)
- Upgrade to babel7
- Refactored
plugins/replication/.watchForChanges()to fix sometimes-breaking-test withRxReplicationState.complete$ - Split
RxCollection.watchForChanges()into own plugin - Refactored
RxQuery
Bugfixes:
- newRxError is not a constructor #719 thanks @errorx666
- Collection name validation is too strict #720 thanks @errorx666
- Field names can't be one character long #717 thanks @errorx666
- Invalid value persists in document after failed update #734 thanks @rybaczewa
Other
- Moved
@types/core-jsto dev-dependencies #712 - Added more example the the RxQuery-Docs #740 thanks @Celludriel
Bugfixes:
- Indexes do not work in objects named "properties" #697
- Wrong pouch-location when folderpath used for collection #677
- Mutating a result-array from
RxQuery.exec()orRxQuery.$does not affect future calls #698#issuecomment-402604237
Other:
- Updated Angular-Example to 6.0.5 Thanks @fuerst
Bugfixes:
- Unhandled promise rejection with DOMException #644
- Prevent bug with replication of internal pouchdb's #641
- LocalDocument observe on field not working #661
- Skip defining getter and setter when property not defined in schema #646
- (typings) Fix
type: 'object'not correctly recognized (via gitter at 2018 Mai 22 19:20)
Bugfixes:
- Query cache is not being invalidated by replication #630
Other:
- Updated to rxjs 6.0.0
- Added integration tests for couchdb
Bugfixes:
Other:
- Fixed typings for
additionalPropertiesin schemas - Added performance-tests
- Removed workarround for pouchdb#6733
Typings:
- Added optional type for ORM-Methods
Features:
- Added
RxCollection.insert$,RxCollection.update$,RxCollection.remove$read the docs
Other:
- Added
dangerousRemoveCollectionInfo()for migrations over rxdb-versions. - Improved typings for
RxChangeEvent
Bugfixes:
- Wrong index used when no sort specified #609
Other:
- Improved typings of
RxChangeEventthx @hubgit
Bugfixes:
- Sort by sub object is not working #585
- Encrypted attachments not working inside of electron-renderer #587
- Schema fails with sub-sub-index #590
- Default value not applied when the stored value is
undefined#596
Bugfixes:
- Wrong typings with custom build #576
Features:
Bugfixes:
- Remove preinstall-script #558 thx @adam-lebon
Features:
- Added
RxDatabase.server()to quickly spawn couchdb-compatibe endpoint out of RxDB. Read this - Use
CustomIdleQueuefor atomic updates to enable #494
Bugfixes:
Other:
- Update to pouchdb version 6.4.3
- Improve performance by using the profiler
- Added typings for internal
pouchdb-instance
Features:
- Upgraded to pouchdb 6.4.2. Read this
Typings:
- Fix
RxCollection.findOne()can returnnull
Other:
- Improved react-native-example thx @Darkbladecr
Bugfixes:
Features:
- Added ajv-validate-plugin. Thx @rybaczewa
Bugfixes:
- inMemory() throws error when using primary-key #401
Other:
- Update to pouchdb 6.4.0
- Optimize socket-pull by comparing internal last-change-time
- do not hide fields with
value: undefinedin error-message #403
Warning:
- Removed automatic import of
pouchdb-adapter-memoryfor in-memory-collections. Read this
Features:
- Added options-parameter
- Added
postCreateRxDocumentplugin-hook - Added no-validate-plugin
- Added typings for
RxPlugin
Bugfixes:
- Query-Cache not used when declaring queries without mango-chain
Other:
- Do not throw errors if the same plugin is added multiple times
- Allow getting the collection via
RxDatabase().collection(name: string) - Allow recreating the collection with different schema, if it has no documents
- Split out error-messages into separate own plugin
Bugfixes:
- Error on key-compression when nested value is null
- Fix typings of
RxDocument.putAttachment()
Other:
- Reduced build-size by using rxjs-lettable-operators. Read this if you have problems.
- Improved typings #368 thx @FlorianKoerner
Bugfixes:
- Include
pouchdb-adapter-memoryas dependency #365
Breaking:
Features:
- Added attachments
- Added final fields
- Added inMemory-collections
- Added local documents
Bugfixes:
- Added error-message when you json-import on a non-existing collection #319
- Allow windows-foldernames (with backslash) as collection-name 343
Other:
- Split out idle-queue into own npm-module
- Enfore usage of strict-equality via eslint
- Fix
core is not defined#296
Breaking:
- Filenames are now kebab-case
pouchdb-replication-plugin is now imported by default, do not import it by your own.RxDB.create()throws if you create the same database twice. (You can use ignoreDuplicate)
Features:
- Added RxDatabase.requestIdlePromise()
- Added RxDB.checkAdapter()
- Added ignoreDuplicate-parameter to
RxDB.create()
Custom-Build:
- Custom-build is now out of beta
- If you use a custom-build, you have to change the import-paths. See custom-build
- Replication is now its own module see
- Json import/exportis now its own module see
Bugfixes:
- Allow null-selector #267
RxQuery.exec()throws when out of change-event-buffer-bounds #278- Fix deprecated warning that sometimes occurs with indexeddb-adapter
db.type() - Add fallback to leader-election when unload not works (mostly when you use RxDB inside of an iFrame)
Other:
- Use
RxError-class to throw Custom errors with theparameters-attribute - Optimize leader-election to not waste resources when many tabs open
- Optimize schema-parsing when multiple collections have the same schema
- Reduced build-size by only using async/await if it makes sense
- Pre-Parse schema to validator when requestIdleCallback available
- Optimize socket-cleanup by using
requestIdlePromise - Added plugin-hook for
preCreatePouchDb
Features:
- Added custom builds
- Added plugin-support
- Added default exports. Use
import RxDB from 'rxdb'instead ofimport * as RxDB from 'rxdb'
Bugfixes:
RxQuery.or()did not work with KeyCompression #252
Quickfix because of new pouchdb-import
Features:
- Added RxCollection.atomicUpsert
- Added default values
- Added generic typings so it's easier to be extended see
Other:
- Split out test-util into its own npm-module async-test-util
- Upgrade to pouchdb version 6.3.4
Bugfixes:
- Settings values to
nulldid not work on temporaryDocuments #215 RxDocument.atomicUpdate()did not run when reusing after a whileRxQuery.toString()was sometimes not predictable
WARNING: If you use RxDB with angular2||zone.js, you might have the error _global is not defined. Wait for the next zone.js release before updating RxDB.
Features:
- Added instanceOf-checks
Bugfixes:
- AutoMigrated caused infinity-loop #212
- Minor bugs on the typings
Other:
- Use requestIdleCallback on non-prio-tasks for better performance on browsers
- Optimise socket-pull-intervall to not waste resources on slow devices
- split out test-util from util to optimize build-size
- remove lodash completely
Features:
- Added
RxDocument.atomicUpdate()docs - Added
RxCollection.remove()docs - Added
RxDatabase.remove()docs - Added options for
RxCollection.sync(): direction and pouchdb-replication-settings docs - Added query-param for
RxCollection.sync()to allow selector-based replication docs - Added TemporaryDocuments
RxCollection.newDocument()docs
Breaking:
postCreate-hooks can no longer be asyncRxCollection.sync()completely changed docs
Other:
- Added .babelrc to .npmignore
- Added build-tests to travis
Features:
- Added
postCreate-hook #165 - Added
RxQuery.update()andRxDocument.update()#143 Thanks @lgandecki
Bugfixes:
Other:
- Throw error if
RxQuery.sort()runs on field which is not in the schema #146 - extract
watchForChangesto allow custom sync-operations #197 - Added travis-ci
Bugfixes:
- Ensure es6-build does not contain es7-features
- Ensure everything works after using UglifyJs
Bugfixes:
jsnext:mainandmodulenow point to es6 instead of es7-stage-0 commit issue- Sort on primary fails without non-id primary commit
- QueryChangeDetection breaks on no-resort-optimisation commit
Breaking:
- RxQuery's are now immutable
- RxQuery.$ does not emit
nullwhen running - RxQuery will sort by primary (ASC) as default
Features:
- Added QueryChangeDetection (in beta, disabled by default)
Other:
- upgraded to pouchdb v6.2.0
- re-executing queries while nothing happend to the collection, is now fetched
Bugfixes:
findOne().$did not havelimit:1findOne(string).$streams all documents when_idas primary
Bugfixes:
- Fixed es6-imports for webpack-builds
Features:
- Population can now be done on arrays
Other:
- improved typings
Bugfixes:
- overwrites default selector on
RxQuery.sort()
Other:
- Refactor RxQuery for better performance
- Refactor mquery for smaller build
- More tests for RxQuery
Bugfixes:
- Vuejs runs populate-getter on changedetection #75
isDeepEqualdoes not work correctly for Arrays #76- wrong
storageEnginein the typings
Features:
- Added RxDocument.deleted
- Added RxDocument.synced
- moved from jsonschema to is-my-json-valid
Bugfixes:
- No error on sync when remote document is deleted 680f75bfcbda3f71b6ba0a95ceecdc6b6f30ba58
Bugfixes:
- compound-index not being created #68
Bugfixes:
- new document does not get new state on remove-reinsert #66
Features:
- added DataMigration
- added ORM/DRM-capabilities
- added RxQuery.remove()
- added Population
- added RxDocument.deleted$
- added RxDocument.synced$
- added RxDocument.resnyc()
- added RxCollection.upsert()
- non-top-level-indexes are now allowed
RxQuery.sort()now works on non-top-level-indexes
Bugfixes:
- running
RxDocument().save()twice did not work
Breaking:
- Collection-names must match
^[a-z][a-z0-9]*$Fixes #45 - RxDB.create has new api with destructuring see
- RxDatabase.collection() has new api with destructuring see
- schema-fieldnames must match the regex:
^[a-zA-Z][[a-zA-Z0-9_]*]?[a-zA-Z0-9]$ RxDatabase.collection()only to create collection, usemyDatabase.heroesto get existing oneRxDB.create()multiInstance is now true by defaultrxjsandbabel-polyfillare now peerDependencies
Features:
- possibility to add
pouchSettingswhen creating a collection - typings compatible with
noImplicitAnyTypescript projects
Bugfixes:
- top-level array of document not working #50
- event on document.remove() not fired at query-obserable #52
Features:
- save full schema in internal database once
Bugfixes:
- Throw when .findOne() is called with number or array
- ADD babel-polyfill to dependencies #40
Bugfixes:
- Throw when .regex() is used on primary
Refactor:
- Because IE11 does not support the Proxy-Object, defineGetter/Setter is now used
- Tests now run in all installed browsers
Bugfixes:
- Fixed tests for IE11
Features:
- key-compression for better space-usage
Breaking:
- schema-objects are now normalized (order alphabetic) before hashing
- RxQuery.select() is removed since it has no better performance than getting the whole document
- RxChangeEvent on sockets do no longer contain the documents-data for performance-reason
- RxQuery.$ only emits when the result actually changes #31
Bugfixes:
- console.dir on RxDocument now works
Features:
Features:
- add middleware-hooks
Bugfixes:
- direct import 'url'-module for react native
Features:
- refactor socket to save db-io
- wrap BroadcastChannel-API
- added leader-election
- sync() will only start if db is leader
Bugfixes:
- cleanup all databases after tests
- remove broken builds from dist-folder