rxdb

A fast, local first, reactive Database for JavaScript Applications https://rxdb.info/

APACHE-2.0 License

Downloads
69.4K
Stars
20.7K
Committers
235

Bot releases are hidden (Show)

rxdb - 11.0.0-beta.11

Published by pubkey almost 3 years ago

11.0.0-beta.X BREAKING read the announcement

BREAKING:

  • RxStorage: The non async functions prepareQuery, getSortComparator and getQueryMatcher have been moved out of RxStorageInstance into RxStorage. This was needed to have better WebWorker support. This will not affect you do not use a custom RxStorage implementation.
  • LokiJS: Do not use the IdleQueue of the RxDatabase to handle calls to saveDatabase(), instead wait for CPU idleness of the JavaScript process.
  • RxStorageInterface:
    • Replaced all Map with plain json objects so that they can be JSON.stringify-ed
    • Replaced typings of event stream to use EventBulk and process events in bulks to save performance.
    • Move all static methods into the statics property so we can code-split when using the worker plugin.
    • digest and length of attachment data is now created by RxDB, not by the RxStorage. #3548
    • Added the statics hashKey property to identify the used hash function.
  • Internally all events are handles via bulks, this saves performance when events are transfered over a WebWorker or a BroadcastChannel.
  • Removed the deprecated recieved methods, use received instead. See #3392

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 _id as primaryKey #3562 Thanks @SuperKirik

Other:

  • LokiJS: All documents are stored with a $lastWriteAt field, so we can implement an auto compaction later.
  • Transpile async/await to promises instead of generators. via babel-plugin-transform-async-to-promises
rxdb - 10.5.4

Published by pubkey almost 3 years ago

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.
rxdb - 10.5.3

Published by pubkey almost 3 years ago

Bugfixes:

  • PouchDB: getSortComparator() broken on some complex $or query.
rxdb - 10.5.2

Published by pubkey almost 3 years ago

Other:

  • GraphQL replication must wait for requestIdlePromise to not slow down more important tasks.

Bugfixes:

  • LokiJS: Directly create local state when instance becomes leader.
  • LokiJS: mustUseLocalState() should not create multiple local states.
rxdb - 10.5.1

Published by pubkey almost 3 years ago

Bugfixes:

  • GraphQL replication should affect requestIdlePromise and 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.
rxdb - 10.5.0

Published by pubkey almost 3 years ago

Other:

  • Removed useless runtime check of database name, only check in dev-mode.

Changes:

  • LokiJS: Use custom save handler instead of setting autosave: true
rxdb - 10.4.1

Published by pubkey almost 3 years ago

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-token and use the same random string generator everywhere.
rxdb - 10.4.0

Published by pubkey almost 3 years ago

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 returned sometimes wrong sort comparison results.

Other:

  • Updated event-reduce for more optimizations.
  • Allow dash character - in collection and database names.
rxdb - 10.3.5

Published by pubkey almost 3 years ago

Bugfixes:

  • LokiJS findDocumentsById() returned additional $loki property.
  • LokiJS bulkAddRevisions() must not mutate the input.
  • LokiJS deletes on GraphQL replication must work.
rxdb - 10.3.3

Published by pubkey almost 3 years ago

Bugfixes:

  • LokiJS Storate must have a deterministic sort order.
rxdb - 10.3.2

Published by pubkey almost 3 years ago

Bugfixes:

  • Sort queries broken with LokiJS RxStorage.
rxdb - 10.3.1

Published by pubkey almost 3 years ago

Bugfixes:

  • Fix endless loop when using GrapQL-replication & LokiJS RxStorage.
rxdb - 10.3.0

Published by pubkey almost 3 years ago

Features:

Bugfixes:

  • Fixed missing closings of RxStorage instances when the database or collection is destroyed.

Other:

  • Improved performance of write operations.
  • Removed unnecessary abstraction layer of LeaderElector
rxdb - 10.2.2

Published by pubkey almost 3 years ago

Bugfixes:

  • Migration with attachments removes attachment mime types #3460 Thanks @swnf

Other:

  • Improved performance when many queries are created in a short timespan.
rxdb - 10.2.1

Published by pubkey about 3 years ago

Bugfixes:

  • GraphQL replication: push not working with keyCompression.
  • Buffer is not available in browsers #3454 Thanks @swnf
rxdb - 10.2.0

Published by pubkey about 3 years ago

Bugfixes:

Other:

  • We now have set sideEffects: false to the default in the package.json so tree shaking can work.
  • Optimized memory usage in the query cache.

Features:

rxdb - 10.1.0

Published by pubkey about 3 years ago

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 -> received everywhere. The old getters are still useable but deprecated #3392. Thanks chrisdrackett
rxdb - 10.0.3

Published by pubkey about 3 years ago

Bugfixes:

  • Calling bulk-methods with an empty array must not throw an error.
  • RxCollection.remove() does not delete local documents #3319
rxdb - 10.0.0

Published by pubkey over 3 years ago

Read the release announcement here

Breaking:

  • Setting a primaryKey for a schema is now required.

  • When using the type RxJsonSchema<DocType> the DocType is now required.

  • A JsonSchema must have the required array at the top level and it must contain the primary key.

  • Outgoing data is now Readonly typed and deep-frozen in dev mode

  • RxDocument.putAttachment() no longer supports string as data, only Blob or Buffer.

  • Changed the default of putAttachment to skipIfSame=true.

  • Removed the deprecated atomicSet(), use atomicPatch() instead.

  • Removed the deprecated RxDatabase.collection() use RxDatabase().addCollections() instead.

  • Moved everything pouchdb related to the pouchdb plugin.

  • Pouchdb plugins are not longer added via addRxPlugin() but addPouchPlugin(). (RxDB plugins are still added via addRxPlugin).

  • Removed plugin hook preCreatePouchDb.

  • Removed the watch-for-changes plugin, this is now directly integrated into the pouchdb RxStorage.

  • Removed the adapter-check plugin. (The function adapterCheck is move to the pouchdb plugin).

  • Calling RxDatabase.server() now returns a promise that resolves when the server is started up.

  • Changed the defaults of PouchDBExpressServerOptions from the server() method, by default we now store logs in the tmp folder and the config is in memory.

  • Renamed replication-plugin to replication-couchdb to be more consistend in naming like with replication-graphql

    • Renamed RxCollection().sync() to RxCollection().syncCouchDB()
  • Renamed the functions of the json import/export plugin to be less confusing

    • dump() is now exportJSON()
    • importDump() is now importJSON()
  • RxCollection uses 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 happen errors into own error code.

Typings:

  • Improved typings of error codes.
rxdb - 9.21.0

Published by pubkey over 3 years ago

Features:

  • Added dataPath property 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 return undefined. Thanks @chrisdrackett
  • Fixed typings in the dependencies so you can use noUncheckedIndexedAccess. Thanks @seanwu1105

ANNNNOUNCEMENT: Please test the beta version of 10.0.0