a7622d49f
#6896 - Update canonifyFilter to compute the canonization for flat conjunctions the same as implicit AND queries.
1455bfa43
#6893 - Fix an issue that stops some performance optimization being applied.
37f31c57b
#6879 (fixes #6851) - Fix documentation for getDocsFromCache.
fde5adf63
#6694 - Functions in the Firestore package that return QueryConstraints (for example: where(...)
, limit(...)
, and orderBy(...)
)
now return a more specific type, which extends QueryConstraint. Refactoring and code that supports future features is also
included in this release.
bf7cc8f69
#6712 (fixes #6613) - Fix “missing index” error message to include the link to create the composite index.
e2a90bf67
#6729 - Fix transaction.set() failure without retry on “already-exists” error.
Updated dependencies [4af28c1a4
]:
807f06aa2
]:
397317b53
#6643 - Set withCredentials=true when making requests via non-streaming RPCs, like is done for streaming RPCs.0a112bd2a
#6624 (fixes #5873) - Fix Firestore failing to raise initial snapshot from empty local cache result
171b78b76
#6673 - Handle IPv6 addresses in emulator autoinit.
ee871fc0b
#6608 - Added getCountFromServer()
(getCount()
in the Lite SDK), which fetches the number of documents in the result set without actually downloading the documents.
fdd4ab464
#6526 - Add functionality to auto-initialize project config and emulator settings from global defaults provided by framework tooling.
c6ba6fc0f
#6619 - Fix a time travel issue across multiple tabs
Updated dependencies [fdd4ab464
]:
7c0c640a4
#6107 - Enable encodeInitMessageHeaders. This transitions the Firestore client from encoding HTTP Headers via the Query Param to the request’s POST payload.Requires Cloud Firestore Emulator v1.14.4 or newer.
7c0c640a4
]:
b993aeec4
#6550 (fixes #5871) - Fix FAILED_PRECONDITION when writing to a deleted document in a transaction (#5871)f5426a512
#6403 - Add internal implementation of setIndexConfiguration
10765511f
#6496 - Expose client side indexing feature with setIndexConfiguration
.
1703bb31a
#6442 (fixes #6438) - Update @grpc/proto-loader
and firebase-admin
dependencies to address protobufjs
security issue.ad773fa45
#6418 (fixes #6414) - Fix Node ESM export paths for firestore/lite.
Updated dependencies [b12af44a5
]:
efe2000fc
]:
2cd1cc76f
#6307 (fixes #6300) - fix: add type declarations to exports field
Updated dependencies [2cd1cc76f
]:
dfab18af6
#6189 - Add TransactionOptions
param to runTransaction
method
Updated dependencies [9c5c9c36d
]:
05dc9d6a0
#6128 (fixes #6110) - Fixes an issue during multi-document lookup that resulted in the IndexedDB error “The parameter is less than or equal to this cursor’s”.
Updated dependencies [e9e5f6b3c
]:
69aa7b02d
#5988 - The format of some of the IndexedDB data changed. This increases the performance of document lookups after an initial migration. If you do not want to migrate data, you can call clearIndexedDbPersistence()
before invoking enableIndexedDbPersistence()
.
Updated dependencies [3198d58dc
]:
2d672cead
]:
bb8f37c3e
#5993 - Fixed a bug that caused Firestore streams to get restarted with the same App Check token.
f5ac47fb1
#5982 - On browsers that support IndexedDB V3, we now invoke transaction.commit()
to speed up data processing.
c1b9cf120
#5985 - Some database operations now use IndexedDB.getAll()
on browsers where support is availbe.
e9619685b
#5980 - Queries are now send to the backend before the SDK starts local processing, which reduces overall Query latency.
e28b0e413
#5902 (fixes #5842) - Fixed an AppCheck issue that caused Firestore listeners to stop working and
receive a “Permission Denied” error. This issue only occurred for AppCheck users
that set their expiration time to under an hour.
d612d6f6e
#5928 - Upgrade node-fetch
dependency due to a security issue.
044a8d7f9
#5830 (fixes #5823) - Fix Proto loading for Vercel/Next.js.
ff2f7d4c8
#5883 - The Node SDK now uses JSON to load its internal Protobuf definition, which allows the Node SDK to work with bundlers such as Rollup and Webpack.
3b481f572
#5831 (fixes #5754) - FirestoreError and StorageError now extend FirebaseError
7f05d22e8
#5835 - Fixed an issue that can cause incomplete Query snapshots when the SDK is backgrounded during query execution.
Updated dependencies [3b481f572
]:
7a5bc84bd
#5717 (fixes #5716) - The SDK no longer accesses IndexedDB during a page unload event on Safari 15. This aims to reduce the occurrence of an IndexedDB bug in Safari (https://bugs.webkit.org/show_bug.cgi?id=226547).
532b3cd93
#5675 (fixes #5661) - Expanded Firestore.WithFieldValue<T>
to include T
. This allows developers to delegate WithFieldValue<T>
inside wrappers of type T
to avoid exposing Firebase types beyond Firebase-specific logic.3281315fa
#5708 (fixes #1487) - Update build scripts to work with the exports field
Updated dependencies [3281315fa
]:
2322b6023
]:
4d3640481
#5532 (fixes #5499) - Fix exports field to also point to Node ESM builds. This change requires Node.js version 10+.f48527617
#5668 - Add missing compat Firestore conversion for runTransaction
c75bbe957
#5643 - Change the networking API to use XHR instead of fetch()
for ReactNative.
f78ceca1c
#5394 - Fixed a bug where UpdateData
did not recognize union types or optional, dot-separated string fields.8180a2b77
#5396 - Improved the error handling when opening IndexedDb fails in a Firefox private browsing session.
b8462f248
#5434 - Fixes a deadlock during asynchronous initialization of both Firestore and Auth.
bf5772f64
#5440 - Fix the implementation of collection()
with multiple path segments.
dca28a10d
#5461 - Temporary fix for a bug causing initializeFirestore()
to not work with certain bundling pipelines.
cd15df0d1
#5400 (fixes #2903) - Make firestore/lite available in nodejs
6163bb282
#5399 - Addressed incorrect use of the node-fetch
polyfill
5bc6afb75
#5268 (fixes #4277) - This change contains multiple quality-of-life improvements when using the FirestoreDataConverter
in @firebase/firestore/lite
and @firebase/firestore
:
FieldValue
property values when using a converter (via WithFieldValue<T>
and PartialWithFieldValue<T>
).{merge: true}
with a converter (via PartialWithFieldValue<T>
).UpdateData
). Improperly typed fields in
update operations on typed document references will no longer compile.f825b1d83
#5288 - Fixed a regression that prevented the garbage collector from running if multi-tab was disabled.
a3cbe719b
]:
b51be1da3
#5166 (fixes #4076) - The SDK no longer accesses IndexedDB during a page unload event on Safari 14. This aims to reduce the occurrence of an IndexedDB bug in Safari (https://bugs.webkit.org/show_bug.cgi?id=226547).
2cd9d7c39
#5147 (fixes #5047) - Fixed an issue that prevented Timestamps from being used via update()
when connected to the Emulator
725ab4684
]:
1d54447ca
#5010 - Fixes a regression that prevented Firestore from detecting Auth during its initial initialization, which could cause some writes to not be send.
4971 didn’t actually fix it.4c4b6aed9
#4971 - Fixes a regression that prevented Firestore from detecting Auth during its initial initialization, which could cause some writes to not be send.
Updated dependencies [4c4b6aed9
]:
10fb5b87f
]:
5fbc5fb01
]:
169174520
#4929 - Added a warning message when the host settings are overridden without {merge: true}
.633463e2a
#4788 - Ensure that errors get wrapped in FirestoreError
c65883680
#4810 (fixes #4795) - Don’t send empty X-Firebase-GMPID header when AppId is not set in FirebaseOptions
6db185be5
#4745 - Fixed a bug where decimal inputs to Timestamp.fromMillis()
calculated incorrectly due to floating point precision loss
Updated dependencies [7354a0ed4
]:
f24d8961b
]:
4cb0945c6
#3888 - Added new internal HTTP header to all network requests.
Updated dependencies [de5f90501
]:
5c1a83ed7
#4595 - Component facotry now takes an options object. And added Provider.initialize()
that can be used to pass an options object to the component factory.
Updated dependencies [5c1a83ed7
]:
b6080a857
#4577 - Added support to remove a FirestoreDataConverter on a Firestore reference by calling withConverter(null)
6afe42613
]:
a718518e9
#4395 - Fixes a bug where local cache inconsistencies were unnecessarily being resolved.
3d0cd6f33
#4382 - Fix the path to the react native build for the Firestore memory build
9533688b1
#4347 (fixes #1392) - handle ignoreUndefinedProperties
in set({ merge: true })
. Previously this would behave as if the undefined value were FieldValue.delete()
, which wasn’t intended.749c7f3d9
#4298 (fixes #4258) - Firestore classes like DocumentReference and Query can now be serialized to JSON (#4258)6ac66baa0
#4284 (fixes #4278) - Fixes FirestoreDataConverter.fromFirestore() being called with an incorrect “snapshot” object.6069b1d6c
#4262 (fixes #4253) - Updated an outdated error message to include ‘!=’ and ‘not-in’ as an inequalities.
ba59a0f90
#4233 (fixes #4226) - Fixes an issue in the Transaction API that caused the SDK to return invalid DocumentReferences through DocumentSnapshot.data()
calls.
44b5251d0
#4189 (fixes #4175) - Fixes an issue that prevented the SDK from automatically retrieving custom User claims.b662f8c0a
#4168 - Release Firestore Bundles (pre-packaged Firestore data). For NPM users, this can
be enabled via an additional import: ‘firebase/firestore/bundle’. For CDN usage,
it is enabled by default.
1b5407372
#4153 - A write to a document that contains FieldValue transforms is no longer split up into two separate operations. This reduces the number of writes the backend performs and allows each WriteBatch to hold 500 writes regardless of how many FieldValue transformations are attached.
b662f8c0a
]:
1849b0d0f
#4148 - Fixed a bug that prevented usage of FieldPaths with multiple special characters.
8993f16b8
#4136 (fixes #4125) - Fixes an issue that returned invalid DocumentReference
s in QuerySnapshot
s.
9822e125c
#4078 - Fix an issue that prevented experimentalAutoDetectLongPolling
from working correctly.
Updated dependencies [9822e125c
]:
6c6c49ad6
#4053 - Internal changes for the upcoming modular API.
e0bf3f70b
#4080 (fixes #4071) - Fixes a regression introduced in v8.0.2 that returned invalid values for DocumentChange.newIndex
.
d2adf4e3e
#4051 - Fixed an issue that caused DocumentReference
s in DocumentSnapshot
s to be returned with the custom converter of the original DocumentReference
.
6dffdf2eb
#3594 - Merge bundle loading implementation without exposing public API
484e90a1d
#4043 - Internal changes to support upcoming modular API.
007ddd1eb
#4030 - Internal changes to support upcoming modular API.
Updated dependencies [9cf727fcc
]:
8939aeca0
#3944 - Removed the undocumented Firestore.logLevel
property.
344bd8856
#3943 - Removed depreacted experimentalTabSynchronization
settings. To enable multi-tab sychronization, use synchronizeTabs
instead.
4b540f91d
#3939 - This releases removes all input validation. Please use our TypeScript types to validate API usage.
ffef32e38
#3897 (fixes #3879) - Removed the timestampsInSnapshots
option from FirestoreSettings
. Now, Firestore always returns Timestamp
values for all timestamp values.
79b049375
#3909 - Add a useEmulator(host, port) method to Firestore
9719635fe
#3960 - Removed excess validation of null and NaN values in query filters. This more closely aligns the SDK with the Firestore backend, which has always accepted null and NaN for all operators, even though this isn’t necessarily useful.
a5768b0aa
#3932 - Point browser field to esm build. Now you need to use default import instead of namespace import to import firebase.Before this change
import * as firebase from 'firebase/app';
After this change
import firebase from 'firebase/app';
4f997bce1
#3724 - Adds a new experimentalAutoDetectLongPolling
to FirestoreSettings. When
enabled, the SDK’s underlying transport (WebChannel) automatically detects if
long-polling should be used. This is very similar to
experimentalForceLongPolling
, but only uses long-polling if required.2bea0a367
#3919 - Fixed a potential issue in our internal queue that could have allowed API calls to be executed out of order.
Updated dependencies [4f997bce1
]:
a10c18f89
#3871 - The SDK now include more information in the error message for failed IndexedDB transactions.4dc8817c3
#3821 - Fixes an issue that prevents waitForPendingWrites()
from resolving in background tabs when multi-tab is used (https://github.com/firebase/firebase-js-sdk/issues/3816).
16c6ba979
#3820 (fixes #3814) - Fixes a “Comparison with -0” lint warning for customers that build from source.
f9004177e
#3772 - [feature] Added not-in
and !=
query operators for use with .where()
. not-in
finds documents where a specified field’s value is not in a specified array. !=
finds documents where a specified field’s value does not equal the specified value. Neither query operator will match documents where the specified field is not present.
a8ff3dbaa
#3418 - Use FirestoreError instead of Error in onSnapshot*() error callbacks.
e81c429ae
#3755 (fixes #3742) - Fixed a bug where CollectionReference.add() called FirestoreDataConverter.toFirestore() twice intead of once (#3742).
249d40cb6
#3700 - Fixes a bug that caused the client to not raise snapshots from cache if a user change happened while the network connection was disabled.
61b4cd31b
#3464 (fixes #3354) - feat: Added merge
option to firestore.settings()
, which merges the provided settings with
settings from a previous call. This allows adding settings on top of the settings that were applied
by @firebase/testing
.61b4cd31b
]:
960093d5b
#3575 (fixes #2755) - terminate()
can now be retried if it fails with an IndexedDB exception.
b97c7e758
#3487 - Enable fallback for auto-generated identifiers in environments that support crypto
but not crypto.getRandomValues
.
36be62a8
#3535 (fixes #3495) - The SDK no longer crashes with the error “The database connection is closing”. Instead, the individual operations that cause this error may be rejected.
68995c24
#3586 - Fixed a bug that caused slow retries for IndexedDB operations even when a webpage re-entered the foreground.
Updated dependencies [d4ca3da0
]:
7f0860a4
]:
a87676b8
]:
5a355360
#3162 Thanks @schmidt-sebastian! - The SDK no longer crashes if an IndexedDB failure occurs when unsubscribing from a Query.
9a9a81fe
#3279 Thanks @schmidt-sebastian! - [fixed] Removed a delay that may have prevented Firestore from immediately
reestablishing a network connection if a connectivity change occurred while
the app was in the background.
39ca8ecf
#3254 Thanks @thebrianchen! - Added support for set()
with merge options when using FirestoreDataConverter
.
877c060c
#3251 Thanks @schmidt-sebastian! - Re-adding the ReactNative bundle, which allows Firestore to be used without btoa
/atob
Polyfills.
a754645e
#3297 Thanks @renovate! - Update dependency typescript to v3.9.5
e90304c8
#3309 Thanks @schmidt-sebastian! - Removed internal wrapper around our public API that was meant to prevent incorrect SDK usage for JavaScript users, but caused our SDK to stop working in IE11.
[fixed] Fixed an issue that may have prevented the client from connecting to the backend immediately after a user signed in.
experimentalForceOwningTab
setting that can be used to
enable persistence in environments without LocalStorage, which allows
persistence to be used in Web Workers (#983).If you continue to see Indexed-related crashes, we appreciate feedback (https://github.com/firebase/firebase-js-sdk/issues/2755).
FirebaseFiresore.settings
with
{ ignoreUndefinedProperties: true }
. When set, Firestore ignores
undefined properties inside objects rather than rejecting the API call.FieldValue.increment
in combination with set({...}, {merge: true})
.onSnapshot()
listeners if they cannot be
registered in IndexedDB. Previously, these errors crashed the client.DocumentSnapshot.getData()
and DocumentSnapshot.toObject()
will see
the biggest improvement.-0.0
would lose its sign when
stored in Firestore.Timestamp.valueOf()
so that Timestamp
objects can be
compared for relative ordering using the JavaScript arithmetic comparison
operators (#2632).Query.limitToLast(n: number)
in Firestore 1.7.0 (Firebase 7.3.0) (#2620).CollectionReference.add()
would reject
custom types when using withConverter()
(#2606).withConverter()
to supply a custom data
converter that will convert between Firestore data and your custom type.limit()
API may not always benefit,
depending on the accumulated changes.in
and array-contains-any
query operators for use with
.where()
. in
finds documents where a specified field’s value is IN a
specified array. array-contains-any
finds documents where a specified field
is an array and contains ANY element of a specified array.Query.limitToLast(n: number)
, which returns the last
n
documents as the result.Firestore.onSnapshotsInSync()
method that notifies you
when all your snapshot listeners are in sync with each other.Firestore.waitForPendingWrites()
method that
allows users to wait until all pending writes are acknowledged by the
Firestore backend.Firestore.terminate()
method which terminates
the instance, releasing any held resources. Once it completes, you can
optionally call Firestore.clearPersistence()
to wipe persisted Firestore
data from disk.FieldValue.serverTimestamp()
and an update with a
FieldValue.increment()
were pending for the same document.window.addEventListener
,
such as in React Native with Expo (#1824).clearPersistence()
, which clears the persistent storage
including pending writes and cached documents. This is intended to help
write reliable tests (#449).experimentalTabSynchronization
setting in favor of
synchronizeTabs
. If you use multi-tab synchronization, it is recommended
that you update your call to enablePersistence()
. Firestore logs an error
if you continue to use experimentalTabSynchronization
.FirebaseFirestore.collectionGroup()
method.experimentalForceLongPolling
setting that that can be
used to work around proxies that prevent the Firestore client from connecting
to the Firestore backend.FieldValue.increment()
, which can be used in update()
and set(..., {merge:true})
to increment or decrement numeric field
values safely without transactions.enablePersistence()
was called in a second tab (#1531).timestampsInSnapshots
setting is now enabled by default.
Timestamp fields that read from a DocumentSnapshot
are now returned as
Timestamp
objects instead of Date
objects. This is a breaking change;
developers must update any code that expects to receive a Date
object. See
https://firebase.google.com/docs/reference/js/firebase.firestore.Settings#~timestampsInSnapshots
for more details.cacheSizeBytes
in
the settings passed to Firestore.settings()
. It must be set to a minimum of
1 MB. The garbage collection process can be disabled entirely by setting
cacheSizeBytes
to CACHE_SIZE_UNLIMITED
.enablePersistence()
with {experimentalTabSynchronization: true}
. All tabs accessing persistence
must use the same setting for this flag.get()
call made after being offline
could incorrectly return cached data without attempting to reach the backend.get()
to only make one attempt to reach the backend before
returning cached data, potentially reducing delays while offline.set(..., { merge: true })
.SnapshotMetadata.hasPendingWrites
metadata flag.get({source: 'cache'})
to be able to return nonexistent
documents from cache.firebase.firestore.FieldValue.arrayUnion()
and
firebase.firestore.FieldValue.arrayRemove()
to atomically add and remove
elements from an array field in a document.'array-contains'
query operator for use with .where()
to
find documents where an array field contains a specific element.includeQueryMetadataChanges
and
includeDocumentMetadataChanges
options passed to Query.onSnapshot()
into
a single includeMetadataChanges
option.QuerySnapshot.docChanges()
is now a method that optionally takes
an includeMetadataChanges
option. By default, even when listening to a query
with { includeMetadataChanges:true }
, metadata-only document changes are
suppressed in docChanges()
.{ mergeFields: (string|FieldPath)[] }
option to set()
which allows merging of a reduced subset of fields.Timestamp
class to represent timestamp fields,
currently supporting up to microsecond precision. It can be passed to API
methods anywhere a JS Date object is currently accepted. To make
DocumentSnapshot
s read timestamp fields back as Timestamp
s instead of
Dates, you can set the newly added flag timestampsInSnapshots
in
FirestoreSettings
to true
. Note that the current behavior
(DocumentSnapshot
s returning JS Date objects) will be removed in a future
release. Timestamp
supports higher precision than JS Date.enableNetwork()
that
could result in a “Mutation batchIDs must be acknowledged in order” assertion
crash.includeMetadataChanges
option
enabled) now receive an event with snapshot.metadata.fromCache
set to
true
if the SDK loses its connection to the backend. A new event with
snapshot.metadata.fromCache
set to false will be raised once the
connection is restored and the query is in sync with the backend again.SnapshotOptions
API to control how DocumentSnapshots
return unresolved server timestamps.disableNetwork()
and enableNetwork()
methods to
Firestore
class, allowing for explicit network management.DocumentSnapshot.data()
now returns
undefined
instead of throwing an exception. A new
QueryDocumentSnapshot
class is introduced for Queries to reduce the number
of undefined-checks in your code.isEqual
API to GeoPoint
, Blob
, SnapshotMetadata
,
DocumentSnapshot
, QuerySnapshot
, CollectionReference
, FieldValue
and FieldPath
.FieldValue.delete()
sentinels in set()
calls
with {merge:true}
.firebase.firestore.FieldPath.documentId()
in an orderBy()
or where()
clause in a query.