Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

RxDB Version 15.0.0 #4996

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .nvmrc
Original file line number Diff line number Diff line change
@@ -1 +1 @@
19.9.0
20.7.0
9 changes: 8 additions & 1 deletion orga/before-next-major.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,12 @@
This list contains things that have to be done but will create breaking changes.


## Set eventReduce:true as default
## Set eventReduce:true as default [DONE]

See https://github.com/pubkey/rxdb/pull/4614

## Update node.js to 20.7.0

## Do not allow type mixing

In the RxJsonSchema, a property of a document can have multiple types like
Expand Down Expand Up @@ -84,5 +86,10 @@ Most "normal" users do not need premium access so we should name it "RxDB Enterp



## RxStorage: Add RxStorage.info() which also calls parents

HAving an .info() method helps in debugging stuff and sending reports on problems etc.

## Skip repsonding full document data on bulkWrites (only in all happy case)

RxStorage.bulkwrite(): If all writes suceeed, return "SUCESS" or sth to not have to transfer all json document data again. This is mostly important in the remot storage and webworker storage where we do not want to JSON-stringify and parse all data again.
2 changes: 1 addition & 1 deletion src/rx-database.ts
Original file line number Diff line number Diff line change
Expand Up @@ -556,7 +556,7 @@ export function createRxDatabase<
name,
password,
multiInstance = true,
eventReduce = false,
eventReduce = true,
ignoreDuplicate = false,
options = {},
cleanupPolicy,
Expand Down
12 changes: 12 additions & 0 deletions test/unit/rx-database.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -153,6 +153,18 @@ config.parallel('rx-database.test.js', () => {
assert.ok(hash.endsWith('xxx'));
db.destroy();
});
/**
* @link https://github.com/pubkey/rxdb/pull/4614
*/
it('should have eventReduce: true as a default', async()=> {
const db = await createRxDatabase({
name: randomCouchString(10),
storage: config.storage.getStorage()
});
assert.strictEqual(db.eventReduce, true);
db.destroy();

});
});
describe('negative', () => {
it('should crash with invalid token', async () => {
Expand Down
Loading