- Support including multiple
docChanges
when documents are added in parallel. Thank you KholmatovS! PR-312. - Support including multiple
docChanges
when documents are modified or deleted in parallel. PR-314.
Fixed batch commit to properly await commands. Thank you nomtats! PR-310
Upgrade to Firestore 5.0.0. PR-309
Fixed broadcast of non converted snapshots when modifying a converted document. Thank you diegogarciar! PR-295.
- Added
ListenSource? source
toQuery.snapshots()
andDocumentReference.snapshots()
to match firestore 4.17.0. Thank you fwal! PR-306. - Upgraded rx to 0.4.0. PR-307.
- Fixed composite key query on empty document. Thank you KholmatovS! PR-298.
- Fixed
documentReference.get()
on empty document. PR-299.
Support aggregate queries for converted queries. Thank you ming-chu! PR-291.
Support passing a Clock
for FieldValue.serverTimestamp()
. Thank you ming-chu! PR-287.
- Fixed query snapshots to correctly fire and emit document changes (PR-284).
- Implemented limit to
arrayContainsAny
and fixed the limit towhereIn
(PR-286). - Implemented
FakeFirebaseFirestore.clearPersistence()
(PR-285).
Thank you KholmatovS for all 3 PRs!
- Fixed a concurrency error when someone subscribed to a query during an update to that same query. Thank you jonasN5! PR-282, PR-283.
Upgraded rx to ^0.3.0 and cloud_firestore_platform_interface to ^6.0.1. PR-274
- Support querying with
FieldPath.documentID
. Thank you agent3bood!
Fixed API to support cloud_firestore 4.4.0:
- support Iterable in queries instead of List.
- support FieldPath on
DocumentReference.update
.
Thank you sydneyagcaoili!
Also fixed deletion so that it reflects on dump
. Thank you ga-bri-el!
Added imports in the README example on security rules.
Fixed changelog to include a fix in version 2.2.0.
- Implemented checking Document access with Security Rules (PR-260).
- Fixed
DocumentReference.path
to always return a path without a starting '/' (commit c01eb23).
- Support mocking
Exceptions
forDocumentReference.set
(PR-258). - Support printing out
GeoPoint
indump
(PR-257). Thank you ga-bri-el!
- support
GetOptions.source
when querying data. Thank you danReynolds! - fixed Exception code from
cloud_firestore/not-found
tonot-found
to match Firestore. Thank you Zambrella! - fixed comparison of
FieldValue.delete()
andFieldValue.serverTimestamp()
values. Thank you Zohenn! - fixed exception when ordering with null values. Thank you ming-chu!
- implemented
QuerySnapshot.metadata
. Thank you agent3bood!
- implemented
Query.count
for converted queries.
- migrated to Firestore 4.0.0.
- implemented
Query.count
for collections (converted or not) and non-converted queries.
- fixed the handling of maps in
FieldValue.arrayUnion
andFieldValue.arrayRemove
. - correctly throws an exception when attempting to save nested lists.
DocumentSnapshot.get
correctly throws an exception when a value is not found.
Thank you Zohenn for all 3 fixes!
- support
Query.limit
for converted queries. Thank you xni06! - support
DateTime
inQuery.where
. Thank you Zohenn!
- added
maxAttempts
toFirebaseFirestore.runTransaction
to match firestore 3.4.0. Thank you AndrewSheetMetal and OlegNovosad!
- made
Document.update
throw an exception if trying to update a non-existent document.
- fixed an exception
Document.update
when replacing a non map value with a map value. Thank you Sapphirewhale! - support
whereNotIn
inQuery.where
. Thank you KingOfDog! - fixed
orderBy
when used withstartAt
,endAt
. Thank you cedvdb!
- support
FieldPath
inDocumentSnapshot.get()
. Thank you jpangburn! - make
notEqualTo
ignore docs when the field does not exist. Thank you jpangburn! - implemented
endAtDocument
,endBefore
,endBeforeDocument
andstartAtDocument
inQuery
. Thank you Andrew-Bekhiet! - make
DocumentReference.snapshots()
emit the first event as soon as the stream is returned. Thank you Andrew-Bekhiet!
- fixed a regression where DocumentReference stopped firing an event when deleted.
- fixed a null pointer exception when getting a deleted document's snapshot with converter. Thank you cedvdb!
- migrated to Firestore 3.0.0. Thank you mboyamike!
- fixed a null pointer exception when deleting a document using a converter. Thank you wesleyfuchter!
- fixed a null pointer exception when using isGreaterThan and the likes on null values. Thank you fkoch-tgm!
- support Converters for startAt/startAfter/endAt queries.
- fixed a bug where a collection would not fire a snapshot if one of its documents was modified if it was in a sub-collection instead of the root.
- fire an exception when a batch contains more than 500 updates. Thank you YuKiO-output!
- implemented
Query.startAfter
.
- fixed a bug where the snapshot wouldn't fire if you got a
Query.snapshot
, then started listening to it after. - fixed a bug where the snapshot wouldn't fire on an empty collection.
- migrated to Firestore 2.2.0.
- fixed an exception when calling
snapshots()
on both the raw and converted reference. - implemented
DocumentReference.set
when usingwithConverter
. - implemented
Query.firestore
.
- implemented
withConverter
forCollectionReference
,DocumentReference
andQuery
.
Breaking change:
- renamed the library from cloud_firestore_mocks to fake_cloud_firestore
- renamed
MockFirestoreInstance
toFakeFirebaseFirestore
.
In pubspec.yaml file, replace cloud_firestore_mocks: ^0.9.0
by fake_cloud_firestore: ^1.0.0
.
Then in tests, replace:
import 'package:cloud_firestore_mocks/cloud_firestore_mocks.dart';
final firestore = MockFirestoreInstance();
By:
import 'package:fake_cloud_firestore/fake_cloud_firestore.dart';
final firestore = FakeFirebaseFirestore();
- migrated to Firestore 2.1.0.
- documented a compatibility table.
- implemented
DocumentSnapshot.[]
to read a field.
- fixed compile error.
- migrated to sound null safety.
- implemented
Query.startAt
,Query.endAt
for exact matches. Thank you maxluchterhand1! - implemented
Query.limitToLast
. Thank you maxluchterhand1! - fixed a null pointer exception when query using
Query.where
with composite keys, on documents that didn't have the key. Thank you ming-chu! - support
isNotEqualTo
andisNull
forQuery.where
. Thank you alxflam! - implemented
QuerySnapshot.size
. - removed dependency to Mockito.
- support queries that use composite keys. Thank you alxflam!
- fixed
QueryDocumentSnapshot.data
's signature change introduced in firestore 1.0.4. Thank you lyledean1!
- migrated to null safety.
- added documents metadata. Thank you zariweyo!
- migrated to Firestore 1.0.0. Thank you Jouby!
- migrated to Firestore 0.16.0.
- restored release notes for 0.4.7.
- fix null exception when using
collectionGroup
on documents with no value. Thank you rhisiart-cufflink!
- make
MockDocumentReference.snapshots()
fire on updates. Thank you gabeschine!
- fixed an issue with
runTransaction
. Thank you sensuikan1973!
Support the breaking changes of Firestore 0.14.0. Thank you for the great update sensuikan1973!
- support collection groups (
instance.collectionGroup
). Thank you sensuikan1973! - fixed collections so they can contain a subcollection and a document with the same ID. Thank you dumbbell!
- downgraded dependency to collection to satisfy flutter_driver requirements.
- support
FieldPath.documentId
inQuery.where
andorderBy
. Thank you nukotsuka! - continuously send notifications on queries, even for updates and deletions. Thank you gki!
- in
DocumentChange
, populateoldIndex
andnewIndex
. Thank you sensuikan1973! - implemented
QuerySnapshot.documentChanges
. Thank you feroult!
- support
FieldValue
and keys containing dots inCollectionReference.add
. Thank you nxcco! - DocumentSnapshots are made with a deep copy of the data. Thank you amatveyakin!
- support
FieldValue
andDateTime
in nested objects. - support null values in
Query.orderBy
. - updated the documentation on integration tests.
- support
whereIn
inCollectionReference.where
. DocumentSnapshot.data
now returns a deep copy.
Thank you anuragbhd for both improvements!
- updated docs.
- support
Query.startAfterDocument
. Thank you Hadii1! - support
arrayContains
inCollectionReference.where
. Thank you qwales1! - support
arrayContainsAny
inCollectionReference.where
. Thank you anuragbhd! - support document paths with slashes. Thank you suztomo!
- support Document and Collection's
parent
,path
,firebase
, andequals
methods. Thank you suztomo!
New features:
- support
Firestore.runTransaction
. - support
FieldValue.increment
,arrayUnion
, andarrayRemove
.
Adhering to Firebase specs:
Firestore.document
andcollection
check the number of segments.Query
executes only when callinggetDocuments
.- Updating a document doesn't affect previous
Snapshots
. - saves a deep copy when when saving data to a document.
- checks that data types are valid upon saving data.
All credits go to suztomo. Thank you!
CollectionReference.getDocuments
returns only documents that have been saved byCollectionReference.add
orDocumentReference.setData
orDocumentReference.updateData
.- make
CollectionReference.add
generate a randomdocumentId
. - support batch operations
updateData
anddelete
. - implemented
DocumentReference.path
. - implemented
DocumentSnapshot.reference
.
Thank you suztomo for contributing these improvements!
- fixed some lint error.
- support
CollectionReference.document()
. Thanks suztomo! - support nested documents. Thanks suztomo!
- support
FieldValue.serverTimestamp()
. Thanks suztomo! - breaking change: remove requirement to call
setupFieldValueFactory()
. They are now initialized automatically whenMockFirestoreInstance
is instantiated.
- support
FieldValue.delete()
again.
- fixed breakage due to
FieldValue.type
andFieldValue.value
being removed from the public API at cloud_firestore 0.10.0. - implemented chainable
Query.where
. Thank you qwales1! - dropped support for
FieldValue.delete()
.
- implemented
DocumentSnapshot.exists
. Thank you qwales1!
- implemented
MockDocumentReference.snapshots()
. Thank you dfdgsdfg and terry960302!
- upgraded cloud_firestore to ^0.13.0+1.
- cleaned up the public documentation to expose only
MockFirestoreInstance
.
- fixed code health related issues.
- added support for
isGreaterThanOrEqualTo
,isLessThan
,isLessThanOrEqualTo
inCollectionReference.where
. - implemented mock
DocumentReference.delete
.
- Fixed snapshots not firing several times.
- Implemented example unit tests based on Firestore's own example project.
- Initial version.