From d6fe20a5a0481e623068c45ab4eaa9ccaf362c15 Mon Sep 17 00:00:00 2001 From: blackholegalaxy Date: Sun, 24 Mar 2024 18:47:42 -0400 Subject: [PATCH 1/2] fix(firestore): make includeMetadataChanges a configurable option --- firestore/collection/index.ts | 7 ++++--- package.json | 2 +- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/firestore/collection/index.ts b/firestore/collection/index.ts index 1a2ae88..9af7f00 100644 --- a/firestore/collection/index.ts +++ b/firestore/collection/index.ts @@ -188,10 +188,11 @@ const filterEmptyUnlessFirst = (): UnaryFunction< export function collectionChanges( query: Query, options: { - events?: DocumentChangeType[] - }={}, + events?: DocumentChangeType[], + includeMetadataChanges: boolean, + }={includeMetadataChanges: true}, ): Observable[]> { - return fromRef(query, {includeMetadataChanges: true}).pipe( + return fromRef(query, {includeMetadataChanges: options.includeMetadataChanges}).pipe( windowwise(), map(([priorSnapshot, currentSnapshot]) => { const docChanges = currentSnapshot.docChanges(); diff --git a/package.json b/package.json index d2c1ec4..f849edc 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "rxfire", - "version": "6.0.6", + "version": "6.0.7", "private": true, "description": "Firebase JavaScript library RxJS", "author": "Firebase (https://firebase.google.com/)", From b08330eba79a2c863f9017eb7b36deb06fefee24 Mon Sep 17 00:00:00 2001 From: blackholegalaxy Date: Sun, 24 Mar 2024 18:49:51 -0400 Subject: [PATCH 2/2] fix(firestore): change object notation lint --- firestore/collection/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/firestore/collection/index.ts b/firestore/collection/index.ts index 9af7f00..cda24e0 100644 --- a/firestore/collection/index.ts +++ b/firestore/collection/index.ts @@ -189,7 +189,7 @@ export function collectionChanges( query: Query, options: { events?: DocumentChangeType[], - includeMetadataChanges: boolean, + includeMetadataChanges: boolean }={includeMetadataChanges: true}, ): Observable[]> { return fromRef(query, {includeMetadataChanges: options.includeMetadataChanges}).pipe(