Skip to content

Commit 2a2e03a

Browse files
pubkeymsotnikov
andauthored
WIP version 13.0.0 (pubkey#3898)
* RENAME the `ajv-validate` plugin to `validate-ajv` to be in equal with the other validation plugins. * FIX wrong filenames * REFACTORED the validation plugins * FIX ci * FIX ci * FIX ci * FIX tests * ADD run test suite once with validation * FIX naming * REFACTORED the [key compression plugin](https://rxdb.info/key-compression.html), it is no longer a plugin but now a wrapper around any other RxStorage. * FIX tests * FIX lint * REFACTORED the encryption plugin, it is no longer a plugin but now a wrapper around any other RxStorage * REMOVED many unused plugin hooks because they decreased the performance. * FIX tests * FIX pouchdb testss * FIX loki tests * REMOVE logs * FIX node tests * ADD debug for loki failure * FIX lokijs tests * REMOVED support for temporary documents * FIX lint * REMOVED RxDatabase.broadcastChannel * FIX tests * FIX test * FIX angular example * ADD debug log for loki * ADD logs * aDD log * MOVE test * CHANGE karma use better reporter * FIX karma config * FIX lokijs test * fix react-native expo example * rxdb installs from current branch * ADD hint for mafintosh/is-my-json-valid#192 * CHANGE In RxDB `_meta.lwt` field, we now use 2 decimal number of the unix timestamp in milliseconds * REPLACE is-my-json-valid with ajv * REMOVE ajv strict mode * FIX svelte example * REFACTOR revision handling step 1 * CHANGE store the password hash in the same write request as the database token to improve performance * FIX tests * FIX tests * FIX import * REMOVE RxStorageStatics `.hash` and `.hashKey` * FIX tests * FIX tests * FIX tests * FIX tests * FIX lint * CHANGE removed default usage of `md5` as default hashing. Use a faster non-cryptographic hash instead * FIX deps * CHANGE use new replication protocol step 1 * FIX stuff for new replication * FIX more replication tests * FIX more graphql tests * FIX more graphql tests * FIX more graphql tests * FIX pouchdb test * FIX pouchdb tset * FIX dexie.js tests * FIX some more tests * FIX ci * ADD(docs) new replication protocol * REMOVE liveInterval option from replication * ADD logs for randomly failing test * ADD logs for randomly failing test 2 * ADD logs for randomly failing test 3 * ADD logs for randomly failing test 4 * ADD logs for randomly failing test 5 * CHANGE use `Float` instead of `Int` to represent timestamps in GraphQL * REMOVED support for the `deletedFlag` in the GraphQL replication. Use a [GraphQL alias](https://devinschulz.com/rename-fields-by-using-aliases-in-graphql/) instead. * REPLACED `RxReplicationPullError` and `RxReplicationPushError` with normal `RxError` like in the rest of the RxDB code * REMOVED the option to filter out replication documents with the push/pull modifiers [pubkey#2552](pubkey#2552) because this does not work with the new replication protocol * FIX handle schema validation errors on replication * REFACTOR graphql replication plugin * ADD more docs for replication * ADD docs * CHANGE default of replication `live` to be set to `true`. Because most people want to do a live replication, not a one time replication. * ADD(graphql-replication) pull.stream$ * FIX types * FIX closing of sockets * FIX import of isomorphic-ws * FIX deps check * FIX graphql query builders * FIX graphql example step 1 * FIX graphql stream replication * FIX graphql example * FIX lint * FIX angular example * FIX deps check * RENAME bulkSize to batchSize * ADD deletedFlag * FIX tests * FIX tests * FIX handling of deletedField * CHANGED Attachment data is now always handled as `Blob` because Node.js does support `Blob` since version 18.0.0 so we no longer have to use a `Buffer` but instead can use Blob for browsers and Node.js * FIX types * FIX base64 handling of attachments data * FIX pouchdb attachment handling * FIX deleted field can be truthy * IMPROVE logs * FINISH docs for graphql replication * FIX electron example * FIX electron remote example * FIX install script * FIX tests Co-authored-by: msotnikov <[email protected]>
1 parent 36ec87d commit 2a2e03a

File tree

166 files changed

+5929
-7310
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

166 files changed

+5929
-7310
lines changed

.github/workflows/main.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -176,6 +176,10 @@ jobs:
176176
with:
177177
run: npm run test:browser:ci:memory
178178

179+
- name: npm run test:fast:memory-validation
180+
run: npm run test:fast:memory-validation
181+
182+
179183
# run the node tests for the LokiJS RxStorage in a different
180184
# task to run in parallel.
181185
node-dexie-worker:
@@ -389,6 +393,7 @@ jobs:
389393
run: |
390394
npm install --legacy-peer-deps
391395
npm run build
396+
392397
- name: electron install
393398
working-directory: ./examples/electron
394399
run: |
@@ -404,6 +409,7 @@ jobs:
404409
- name: electron-remote install
405410
working-directory: ./examples/electron-remote
406411
run: |
412+
npm run preinstall
407413
npm install --legacy-peer-deps
408414
409415
- name: electron-remote test

CHANGELOG.md

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,41 @@
22
# RxDB Changelog
33

44
<!-- CHANGELOG NEWEST -->
5+
- RENAME the `ajv-validate` plugin to `validate-ajv` to be in equal with the other validation plugins.
6+
- The `is-my-json-valid` validation is no longer supported until [this bug](https://github.com/mafintosh/is-my-json-valid/pull/192) is fixed.
7+
- REFACTORED the [schema validation plugins](https://rxdb.info/schema-validation.html), they are no longer plugins but now they get wrapped around any other RxStorage.
8+
- It allows us to run the validation inside of a [Worker RxStorage](./rx-storage-worker.md) instead of running it in the main JavaScript process.
9+
- It allows us to configure which `RxDatabase` instance 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.
10+
- REFACTORED the [key compression plugin](https://rxdb.info/key-compression.html), it is no longer a plugin but now a wrapper around any other RxStorage.
11+
- It allows to run the key-comresion inside of a [Worker RxStorage](./rx-storage-worker.md) instead of running it in the main JavaScript process.
12+
13+
- REFACTORED the encryption plugin, it is no longer a plugin but now a wrapper around any other RxStorage.
14+
- It allows to run the encryption inside of a [Worker RxStorage](./rx-storage-worker.md) instead of running it in the main JavaScript process.
15+
- It allows do use asynchronous crypto function like [WebCrypto](https://developer.mozilla.org/en-US/docs/Web/API/Web_Crypto_API)
16+
- Store the password hash in the same write request as the database token to improve performance.
17+
18+
- REMOVED many unused plugin hooks because they decreased the performance.
19+
20+
- REMOVED support for temporary documents [see here](https://github.com/pubkey/rxdb/pull/3777#issuecomment-1120669088)
21+
- 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`.
22+
23+
- In the RxDB internal `_meta.lwt` field, we now use 2 decimals number of the unix timestamp in milliseconds.
24+
25+
26+
- REMOVE RxStorageStatics `.hash` and `.hashKey`
27+
28+
- CHANGE removed default usage of `md5` as default hashing. Use a faster non-cryptographic hash instead.
29+
- ADD option to pass a custom hash function when calling `createRxDatabase`.
30+
31+
- Removed the `liveInterval` option 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 a `RESYNC` event manually in a loop.
32+
33+
- CHANGE use `Float` instead of `Int` to represent timestamps in GraphQL.
34+
35+
- REPLACED `RxReplicationPullError` and `RxReplicationPushError` with normal `RxError` like in the rest of the RxDB code.
36+
- REMOVED the option to filter out replication documents with the push/pull modifiers [#2552](https://github.com/pubkey/rxdb/issues/2552) because this does not work with the new replication protocol.
37+
- CHANGE default of replication `live` to be set to `true`. Because most people want to do a live replication, not a one time replication.
38+
39+
- CHANGED Attachment data is now always handled as `Blob` because Node.js does support `Blob` since version 18.0.0 so we no longer have to use a `Buffer` but instead can use Blob for browsers and Node.js
540

641
<!-- ADD new changes here! -->
742

config/karma.conf.js

Lines changed: 11 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,7 +63,8 @@ const configuration = {
6363
'karma-firefox-launcher',
6464
'karma-ie-launcher',
6565
'karma-opera-launcher',
66-
'karma-detect-browsers'
66+
'karma-detect-browsers',
67+
'karma-spec-reporter'
6768
],
6869

6970
// Source files that you wanna generate coverage for.
@@ -86,7 +87,15 @@ const configuration = {
8687
},
8788
browserDisconnectTimeout: 12000,
8889
processKillTimeout: 12000,
89-
singleRun: true
90+
singleRun: true,
91+
92+
93+
/**
94+
* Use this reported to fully log all test names
95+
* which makes it easier to debug.
96+
* @link https://github.com/tmcgee123/karma-spec-reporter
97+
*/
98+
reporters: ['spec']
9099
};
91100

92101
if (process.env.CI) {

docs-src/SUMMARY.md

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,6 @@
5454
* [insert()](./rx-collection.md#insert)
5555
* [bulkInsert()](./rx-collection.md#bulkinsert)
5656
* [bulkRemove()](./rx-collection.md#bulkremove)
57-
* [newDocument()](./rx-collection.md#newdocument)
5857
* [upsert()](./rx-collection.md#upsert)
5958
* [atomicUpsert()](./rx-collection.md#atomicupsert)
6059
* [find()](./rx-collection.md#find)
@@ -123,9 +122,9 @@
123122
* [RxStorage Memory Synced](./rx-storage-memory-synced.md)
124123
* [RxStorage Sharding](./rx-storage-sharding.md)
125124

126-
* [Replication CouchDB](./replication-couchdb.md)
127-
* [Replication GraphQL](./replication-graphql.md)
128-
* [Replication Primitives](./replication.md)
125+
* [Replication](./replication.md)
126+
* [Replication GraphQL](./replication-graphql.md)
127+
* [Replication CouchDB](./replication-couchdb.md)
129128

130129
* [Cleanup](./cleanup.md)
131130

0 commit comments

Comments
 (0)