-
479226bf3
#8475 - Remove ES5 bundles. The minimum required ES version is now ES2017. -
479226bf3
#8475 - Removed dependency on undici and node-fetch in our node bundles, replacing them with the native fetch implementation. -
Updated dependencies [
479226bf3
]:- @firebase/webchannel-wrapper@1.0.2
- @firebase/component@0.6.10
- @firebase/logger@0.4.3
- @firebase/util@1.10.1
-
ff0475c41
#8259 - Re-enable useFetchStreams with the latest WebChannel implementation. This reduces the memory usage of WebChannel. -
47b091324
#8430 - Refactor Firestore client instantiation. This prepares for future features that require client to restart.
-
629919ea7
#8343 - Fix an issue with metadatafromCache
defaulting totrue
when listening to cache in multi-tabs. -
Updated dependencies [
16d62d4fa
]:- @firebase/util@1.10.0
- @firebase/component@0.6.9
62348e116
#8432 (fixes #8431) - Update undici dependency to 6.19.7 due to a memory leak in older versions.
025f2a103
#8280 (fixes #8279) - Fixed typos in documentation and some internal variables and parameters.
-
ecadbe380
#8339 (fixes #8314) - Fix persistence multi-tab snapshot listener metadata sync issue. -
Updated dependencies [
192561b15
,b09a267ba
]:- @firebase/util@1.9.7
- @firebase/webchannel-wrapper@1.0.1
- @firebase/component@0.6.8
-
4b49630c7
#8190 - Use closure-net as a dependency of webchannel-wrapper and Firestore. -
Updated dependencies [
14f9da66f
,4b49630c7
,ab883d016
]:- @firebase/webchannel-wrapper@1.0.0
- @firebase/component@0.6.7
- @firebase/logger@0.4.2
- @firebase/util@1.9.6
-
224419457
#8145 - Prevent spurious "Backend didn't respond within 10 seconds" errors when network is indeed responding, just slowly. -
bd12e83cd
#8150 - Updated protobufjs transitive dependency in Firestore. -
e1a7764cf
#8197 - Go back using xmlhttprequest for bidi-streams, as fetch streams seem to be having connection issue. -
84f9ff008
#8178 - Reduce code bundle size by 6.5 kB in applications that only use memory persistence (the default persistence mode). This bundle size regression was accidentally introduced in v10.7.2.
-
fe09d8338
#8138 (fixes #8132) - Update undici version to 5.28.4 due to CVE-2024-30260. -
c6ecac8ac
#8090 (fixes #8031) - Fixed the CSI issue where indexing on timestamp fields leads to incorrect query results. -
a6fa54417
#8142 - Fix internal assertion due to Buffer value not evaluating to instanceof Uint8Array, encountered when testing with jsdom. -
ad8d5470d
#8134 - Updated dependencies. See GitHub PR #8098.
-
0c5150106
#8079 - Updaterepository.url
field in allpackage.json
files to NPM's preferred format. -
Updated dependencies [
0c5150106
]:- @firebase/webchannel-wrapper@0.10.6
- @firebase/component@0.6.6
- @firebase/logger@0.4.1
- @firebase/util@1.9.5
- Updated dependencies [
434f8418c
]:- @firebase/util@1.9.4
- @firebase/component@0.6.5
-
7481098d4
#7847 (fixes #7747) - Fixed leak of grpc-js resources on terminate. -
f4788453e
#7402 - Support special characters in query paths sent togetCountFromServer(...)
,getCount(...)
(lite API), andgetDocs(...)
(lite API). -
d7ace80d4
#7929 - Tweak the automatic index creation parameters to use more optimal values for the platform/browser detected at runtime. -
a476c4692
#7861 (fixes #7706) - Update theisEqual
function for arrayUnion, arrayRemove and increment.
bebecdaad
#7705 - Replaced node-fetch v2.6.7 dependency with the latest version of undici (v5.26.5) in Node.js SDK builds for auth, firestore, functions and storage.
-
0d29adc97
#7740 - Fixed an issue in the local cache synchronization logic where all locally-cached documents that matched a resumed query would be unnecessarily re-downloaded; with the fix it now only downloads the documents that are known to be out-of-sync. -
00235ba68
#7771 (fixes #6118) - Fix high memory usage of Firestore in browsers. -
Updated dependencies [
00235ba68
]:- @firebase/webchannel-wrapper@0.10.5
f27baf423
#7729 - Rolling back the use of useFetchStreams, which has lead to hanging and incomplete queries.
-
cca47353c
#7441 - Added a default template type parameter to withConverter() functions to improve backwards compatibility with the v9 SDK
fbd8e0e2e
#7599 - AddenablePersistentCacheIndexAutoCreation()
function to enable automatic creation of local cache query indexes, which can improve performance of local query execution.
-
60e4a07d2
#7593 - Fix an issue where Firestore was incorrectly using XHR instead of fetch for streaming response. -
2d0a9f5fd
#7592 - Updated minor dependencies grpc (firestore) and firebase-admin (rules-unit-testing). -
Updated dependencies [
60e4a07d2
]:- @firebase/webchannel-wrapper@0.10.3
-
12221ddb4
#7542 - Implemented internal logic to auto-create client-side indexes -
25cda8af6
#7587 - Implemented internal logic to delete all client-side indexes
-
Updated dependencies [
78d2738c2
]:- @firebase/webchannel-wrapper@0.10.2
-
43e402fb4
#7520 - Update @grpc/proto-loader from v0.6.13 to v0.7.8 -
b395277f3
#7507 - Refactored aggregate query order-by normalization to support future aggregate operations.
f2fb56fc0
#7310 - Fixed updateDoc() typing issue by adding a 2nd type parameter to FirestoreDataConverter
57f2a863f
#7318 (fixes #6105) - Changing UpdateData to expand support for types with index signatures.
-
aaf3fa396
#7385 - Fix an issue where localCache is not copied as part of Settings. -
d86c89f9c
#7382 - Fix source maps that incorrectly referenced yet another minified and mangled bundle, rendering them useless. The fixed bundles' source maps are: index.esm2017.js, index.cjs.js, index.node.mjs, and index.browser.esm2017.js (lite sdk only).
- Updated dependencies [
23581c540
]:- @firebase/webchannel-wrapper@0.10.1
-
e45fea9b8
#7236 - Enabled long-polling networking mode auto detection by default. It can be explicitly disabled by settingFirestoreSettings.experimentalForceLongPolling
tofalse
. -
8051e4a99
#7176 - Added the ability to configure the long-polling hanging get request timeout using the newexperimentalLongPollingOptions.timeoutSeconds
setting
-
253b998fc
#6943 - Introduces a new LRU garbage document collector for memory cache. -
98abcd5ed
#7229 - Implemented an optimization in the local cache synchronization logic that reduces the number of billed document reads when documents were deleted on the server while the client was not actively listening to the query (e.g. while the client was offline).
-
a57a2b5d4
#7139 - Fixed stack overflow caused by deeply nested server timestamps. -
510c9b520
#7170 - Simplified the internal handling of aggregation results. -
Updated dependencies [
5e5c41225
,98abcd5ed
]:- @firebase/webchannel-wrapper@0.10.0
b66908df6
#7212 (fixes #7198) - Fix a bug that sometimes prevented aggregations from being run when multi-tab persistence was enabled.
-
7d23aa4bd
#7130 - Check that DOMException exists before referencing it, to fix react-native, which was broken by #7019 in v9.17.2. -
ce79f7fe2
#7100 - Remove the deprecated gapi.auth from FirstPartyToken.
-
e2bf2eca2
#7076 - Improved debug logging of networking abstractions -
5099f0f60
#6899 (fixes #6509) - Check navigator.userAgent, in addition to navigator.appVersion, when determining whether to work around an IndexedDb bug in Safari.
-
36558bd2e
#7024 - Relaxing query validation performed by the SDK -
b5f86b1a3
#7018 - Internal refactor of platform-specific logic to create TextEncoder and TextDecoder objects. -
c59f537b1
#7019 - Modify base64 decoding logic to throw on invalid input, rather than silently truncating it. -
67c5a0dc5
#6952 - Refactoring the aggregation implementation to support future aggregate functions. -
b30186ffc
#7058 - Fix unimplemented error when loading bundles -
Updated dependencies [
c59f537b1
]:- @firebase/util@1.9.3
- @firebase/component@0.6.4
-
d071bd1ac
#7007 (fixes #7005) - Move exports.default fields to always be the last field. This fixes a bug caused in 9.17.0 that prevented some bundlers and frameworks from building. -
Updated dependencies [
d071bd1ac
]:- @firebase/util@1.9.2
- @firebase/component@0.6.3
-
0bab0b7a7
#6981 - Added browser CJS entry points (expected by Jest when using JSDOM mode). -
27b5e7d70
#6989 - Reduce memory usage by applying query check sooner in remote document cache. -
Updated dependencies [
0bab0b7a7
]:- @firebase/util@1.9.1
- @firebase/component@0.6.2
-
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. -
Updated dependencies [
d4114a4f7
,06dc1364d
]:- @firebase/util@1.9.0
- @firebase/component@0.6.1
-
fde5adf63
#6694 - Functions in the Firestore package that return QueryConstraints (for example:where(...)
,limit(...)
, andorderBy(...)
) now return a more specific type, which extends QueryConstraint. Refactoring and code that supports future features is also included in this release.
- Updated dependencies [
c20633ed3
,1625f7a95
]:- @firebase/util@1.8.0
- @firebase/component@0.6.0
- @firebase/logger@0.4.0
- @firebase/webchannel-wrapper@0.9.0
-
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
]:- @firebase/component@0.5.21
- @firebase/logger@0.3.4
- @firebase/util@1.7.3
- @firebase/webchannel-wrapper@0.8.1
- Updated dependencies [
807f06aa2
]:- @firebase/util@1.7.2
- @firebase/component@0.5.20
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. -
Updated dependencies [
397317b53
,171b78b76
,29d034072
]:- @firebase/webchannel-wrapper@0.8.0
- @firebase/util@1.7.1
- @firebase/component@0.5.19
ee871fc0b
#6608 - AddedgetCountFromServer()
(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
]:- @firebase/util@1.7.0
- @firebase/component@0.5.18
-
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.
- Updated dependencies [
7c0c640a4
]:- @firebase/webchannel-wrapper@0.7.0
b993aeec4
#6550 (fixes #5871) - Fix FAILED_PRECONDITION when writing to a deleted document in a transaction (#5871)
1703bb31a
#6442 (fixes #6438) - Update@grpc/proto-loader
andfirebase-admin
dependencies to addressprotobufjs
security issue.
-
ad773fa45
#6418 (fixes #6414) - Fix Node ESM export paths for firestore/lite. -
Updated dependencies [
b12af44a5
]:- @firebase/util@1.6.3
- @firebase/component@0.5.17
- Updated dependencies [
efe2000fc
]:- @firebase/util@1.6.2
- @firebase/component@0.5.16
-
Updated dependencies [
2cd1cc76f
]:- @firebase/component@0.5.15
- @firebase/logger@0.3.3
- @firebase/util@1.6.1
- @firebase/webchannel-wrapper@0.6.2
-
dfab18af6
#6189 - AddTransactionOptions
param torunTransaction
method -
Updated dependencies [
9c5c9c36d
]:- @firebase/util@1.6.0
- @firebase/component@0.5.14
-
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
]:- @firebase/util@1.5.2
- @firebase/component@0.5.13
-
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 callclearIndexedDbPersistence()
before invokingenableIndexedDbPersistence()
. -
Updated dependencies [
3198d58dc
]:- @firebase/util@1.5.1
- @firebase/component@0.5.12
- Updated dependencies [
2d672cead
]:- @firebase/util@1.5.0
- @firebase/component@0.5.11
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 invoketransaction.commit()
to speed up data processing.
c1b9cf120
#5985 - Some database operations now useIndexedDB.getAll()
on browsers where support is available.
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.
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.
-
7f05d22e8
#5835 - Fixed an issue that can cause incomplete Query snapshots when the SDK is backgrounded during query execution. -
Updated dependencies [
3b481f572
]:- @firebase/util@1.4.3
- @firebase/component@0.5.10
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) - ExpandedFirestore.WithFieldValue<T>
to includeT
. This allows developers to delegateWithFieldValue<T>
inside wrappers of typeT
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
]:- @firebase/component@0.5.9
- @firebase/logger@0.3.2
- @firebase/util@1.4.2
- Updated dependencies [
2322b6023
]:- @firebase/component@0.5.8
- @firebase/logger@0.3.1
- @firebase/util@1.4.1
- @firebase/webchannel-wrapper@0.6.1
4d3640481
#5532 (fixes #5499) - Fix exports field to also point to Node ESM builds. This change requires Node.js version 10+.
f78ceca1c
#5394 - Fixed a bug whereUpdateData
did not recognize union types or optional, dot-separated string fields.
-
Updated dependencies [
a99943fe3
,456d664ae
,b835b4cba
]:- @firebase/logger@0.3.0
- @firebase/util@1.4.0
- @firebase/webchannel-wrapper@0.6.0
- @firebase/component@0.5.7
8180a2b77
#5396 - Improved the error handling when opening IndexedDb fails in a Firefox private browsing session.
dca28a10d
#5461 - Temporary fix for a bug causinginitializeFirestore()
to not work with certain bundling pipelines.
5bc6afb75
#5268 (fixes #4277) - This change contains multiple quality-of-life improvements when using theFirestoreDataConverter
in@firebase/firestore/lite
and@firebase/firestore
:- Support for passing in
FieldValue
property values when using a converter (viaWithFieldValue<T>
andPartialWithFieldValue<T>
). - Support for omitting properties in nested fields when performing a set operation with
{merge: true}
with a converter (viaPartialWithFieldValue<T>
). - Support for typed update operations when using a converter (via the newly typed
UpdateData
). Improperly typed fields in update operations on typed document references will no longer compile.
- Support for passing in
-
f825b1d83
#5288 - Fixed a regression that prevented the garbage collector from running if multi-tab was disabled. -
Updated dependencies [
bb6b5abff
,3c6a11c8d
]:- @firebase/component@0.5.6
- @firebase/firestore-types@2.4.0
- @firebase/util@1.3.0
- Updated dependencies [
a3cbe719b
]:- @firebase/util@1.2.0
- @firebase/component@0.5.5
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 viaupdate()
when connected to the Emulator
- Updated dependencies [
85f73abb5
,56a6a9d4a
]:- @firebase/webchannel-wrapper@0.5.1
- @firebase/component@0.5.4
- Updated dependencies [
725ab4684
]:- @firebase/component@0.5.3
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
]:- @firebase/component@0.5.2
- Updated dependencies [
10fb5b87f
]:- @firebase/webchannel-wrapper@0.5.0
- Updated dependencies [
5fbc5fb01
]:- @firebase/component@0.5.1
169174520
#4929 - Added a warning message when the host settings are overridden without{merge: true}
.
- Updated dependencies [
c34ac7a92
,97f61e6f3
,ac4ad08a2
]:- @firebase/component@0.5.0
- @firebase/firestore-types@2.3.0
- @firebase/util@1.1.0
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 toTimestamp.fromMillis()
calculated incorrectly due to floating point precision loss -
Updated dependencies [
7354a0ed4
]:- @firebase/util@1.0.0
- @firebase/component@0.4.1
- Updated dependencies [
f24d8961b
]:- @firebase/component@0.4.0
-
4cb0945c6
#3888 - Added new internal HTTP header to all network requests. -
Updated dependencies [
de5f90501
]:- @firebase/util@0.4.1
- @firebase/component@0.3.1
-
5c1a83ed7
#4595 - Component factory now takes an options object. And addedProvider.initialize()
that can be used to pass an options object to the component factory. -
Updated dependencies [
5c1a83ed7
]:- @firebase/component@0.3.0
b6080a857
#4577 - Added support to remove a FirestoreDataConverter on a Firestore reference by callingwithConverter(null)
- Updated dependencies [
ec95df3d0
,b6080a857
]:- @firebase/util@0.4.0
- @firebase/firestore-types@2.2.0
- @firebase/component@0.2.1
- Updated dependencies [
6afe42613
]:- @firebase/component@0.2.0
9533688b1
#4347 (fixes #1392) - handleignoreUndefinedProperties
inset({ merge: true })
. Previously this would behave as if the undefined value wereFieldValue.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 throughDocumentSnapshot.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.
- Updated dependencies [
b662f8c0a
]:- @firebase/firestore-types@2.1.0
8993f16b8
#4136 (fixes #4125) - Fixes an issue that returned invalidDocumentReference
s inQuerySnapshot
s.
-
9822e125c
#4078 - Fix an issue that preventedexperimentalAutoDetectLongPolling
from working correctly. -
Updated dependencies [
9822e125c
]:- @firebase/webchannel-wrapper@0.4.1
e0bf3f70b
#4080 (fixes #4071) - Fixes a regression introduced in v8.0.2 that returned invalid values forDocumentChange.newIndex
.
d2adf4e3e
#4051 - Fixed an issue that causedDocumentReference
s inDocumentSnapshot
s to be returned with the custom converter of the originalDocumentReference
.
-
007ddd1eb
#4030 - Internal changes to support upcoming modular API. -
Updated dependencies [
9cf727fcc
]:- @firebase/util@0.3.4
- @firebase/component@0.1.21
344bd8856
#3943 - Removed deprecatedexperimentalTabSynchronization
settings. To enable multi-tab synchronization, usesynchronizeTabs
instead.
4b540f91d
#3939 - This releases removes all input validation. Please use our TypeScript types to validate API usage.
ffef32e38
#3897 (fixes #3879) - Removed thetimestampsInSnapshots
option fromFirestoreSettings
. Now, Firestore always returnsTimestamp
values for all timestamp values.
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';
-
Updated dependencies [
a5768b0aa
,79b049375
,ffef32e38
,7d916d905
]:- @firebase/component@0.1.20
- @firebase/util@0.3.3
- @firebase/firestore-types@2.0.0
4f997bce1
#3724 - Adds a newexperimentalAutoDetectLongPolling
to FirestoreSettings. When enabled, the SDK's underlying transport (WebChannel) automatically detects if long-polling should be used. This is very similar toexperimentalForceLongPolling
, 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
]:- @firebase/firestore-types@1.14.0
- @firebase/webchannel-wrapper@0.4.0
a10c18f89
#3871 - The SDK now include more information in the error message for failed IndexedDB transactions.
4dc8817c3
#3821 - Fixes an issue that preventswaitForPendingWrites()
from resolving in background tabs when multi-tab is used (#3816).
16c6ba979
#3820 (fixes #3814) - Fixes a "Comparison with -0" lint warning for customers that build from source.
f9004177e
#3772 - [feature] Addednot-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.
-
e81c429ae
#3755 (fixes #3742) - Fixed a bug where CollectionReference.add() called FirestoreDataConverter.toFirestore() twice instead of once (#3742). -
Updated dependencies [
f9004177e
,a8ff3dbaa
]:- @firebase/firestore-types@1.13.0
-
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. -
Updated dependencies [
da1c7df79
,fb3b095e4
]:- @firebase/component@0.1.19
- @firebase/util@0.3.2
61b4cd31b
#3464 (fixes #3354) - feat: Addedmerge
option tofirestore.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
.- Updated dependencies [
61b4cd31b
]:- @firebase/firestore-types@1.12.1
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 supportcrypto
but notcrypto.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
]:- @firebase/util@0.3.1
- @firebase/component@0.1.18
- Updated dependencies [
7f0860a4
]:- @firebase/webchannel-wrapper@0.3.0
- Updated dependencies [
a87676b8
]:- @firebase/util@0.3.0
- @firebase/component@0.1.17
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 forset()
with merge options when usingFirestoreDataConverter
.
877c060c
#3251 Thanks @schmidt-sebastian! - Re-adding the ReactNative bundle, which allows Firestore to be used withoutbtoa
/atob
Polyfills.
-
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. -
Updated dependencies [
a754645e
,39ca8ecf
]:- @firebase/component@0.1.16
- @firebase/logger@0.2.6
- @firebase/firestore-types@1.12.0
-
[fixed] Fixed an issue that may have prevented the client from connecting to the backend immediately after a user signed in.
-
[feature] Added an
experimentalForceOwningTab
setting that can be used to enable persistence in environments without LocalStorage, which allows persistence to be used in Web Workers (#983). -
[changed] All known failure cases for Indexed-related crashes have now been addressed. Instead of crashing the client, IndexedDB failures will result in rejected operations (e.g. rejected Writes or errored Query listeners). If these rejections surface in your app, you can retry these operations when IndexedDB access is restored. IndexedDB failures that occur due to background work are automatically retried.
If you continue to see Indexed-related crashes, we appreciate feedback (#2755).
- [fixed] Fixed an issue that could cause Firestore to temporarily go offline when a Window visibility event occurred.
- [feature] Added support for calling
FirebaseFirestore.settings
with{ ignoreUndefinedProperties: true }
. When set, Firestore ignores undefined properties inside objects rather than rejecting the API call.
- [fixed] Fixed a regression introduced in v7.14.2 that incorrectly applied
a
FieldValue.increment
in combination withset({...}, {merge: true})
.
- [fixed] Firestore now rejects
onSnapshot()
listeners if they cannot be registered in IndexedDB. Previously, these errors crashed the client.
- [fixed] Firestore now rejects write operations if they cannot be persisted in IndexedDB. Previously, these errors crashed the client.
- [fixed] Fixed a source of IndexedDB-related crashes for tabs that receive multi-tab notifications while the file system is locked.
- [fixed] Temporarily reverted the use of window.crypto to generate document IDs to address compatibility issues with IE 11, WebWorkers, and React Native.
- [changed] Firestore now limits the number of concurrent document lookups it will perform when resolving inconsistencies in the local cache (#2683).
- [changed] Changed the in-memory representation of Firestore documents to
reduce memory allocations and improve performance. Calls to
DocumentSnapshot.getData()
andDocumentSnapshot.toObject()
will see the biggest improvement.
- [fixed] Fixed an issue where the number value
-0.0
would lose its sign when stored in Firestore.
- [feature] Implemented
Timestamp.valueOf()
so thatTimestamp
objects can be compared for relative ordering using the JavaScript arithmetic comparison operators (#2632). - [fixed] Fixed an issue where auth credentials were not respected in Cordova environments (#2626).
- [fixed] Fixed a performance regression introduced by the addition of
Query.limitToLast(n: number)
in Firestore 1.7.0 (Firebase 7.3.0) (#2620). - [fixed] Fixed an issue where
CollectionReference.add()
would reject custom types when usingwithConverter()
(#2606).
- [fixed] Fixed an issue where auth credentials were not respected in some Firefox or Chrome extensions. (#1491)
- [changed] Firestore previously required that every document read in a transaction must also be written. This requirement has been removed, and you can now read a document in transaction without writing to it.
- [fixed] Fixed an issue where auth credentials were not respected in certain browser environments (Electron 7, IE11 in trusted zone, UWP apps). (#1491)
- [feature] Added support for storing and retrieving custom types in Firestore.
Added support for strongly typed collections, documents, and
queries. You can now use
withConverter()
to supply a custom data converter that will convert between Firestore data and your custom type.
- [changed] Improved the performance of repeatedly executed queries when
persistence is enabled. Recently executed queries should see dramatic
improvements. This benefit is reduced if changes accumulate while the query
is inactive. Queries that use the
limit()
API may not always benefit, depending on the accumulated changes.
- [changed] The client can now recover if certain periodic IndexedDB operations fail.
- [feature] Added
in
andarray-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. - [feature] Added
Query.limitToLast(n: number)
, which returns the lastn
documents as the result.
- [changed] Improved iOS 13 support by eliminating an additional crash in our IndexedDB persistence layer.
- [changed] Fixed a crash on iOS 13 that occurred when persistence was enabled in a background tab (#2232).
- [fixed] Fixed an issue in the interaction with the Firestore Emulator that caused requests with timestamps to fail.
- [feature] Added a
Firestore.onSnapshotsInSync()
method that notifies you when all your snapshot listeners are in sync with each other. - [fixed] Fixed a regression that caused queries with nested field filters to crash the client if the field was not present in the local copy of the document.
- [feature] Added a
Firestore.waitForPendingWrites()
method that allows users to wait until all pending writes are acknowledged by the Firestore backend. - [feature] Added a
Firestore.terminate()
method which terminates the instance, releasing any held resources. Once it completes, you can optionally callFirestore.clearPersistence()
to wipe persisted Firestore data from disk. - [changed] Improved performance for queries with filters that only return a small subset of the documents in a collection.
- [fixed] Fixed a race condition between authenticating and initializing Firestore that could result in initial writes to the database being dropped.
- [changed] Transactions now perform exponential backoff before retrying. This means transactions on highly contended documents are more likely to succeed.
- [changed] Transactions are now more flexible. Some sequences of operations that were previously incorrectly disallowed are now allowed. For example, after reading a document that doesn't exist, you can now set it multiple times successfully in a transaction.
- [fixed] Fixed an issue where query results were temporarily missing documents that previously had not matched but had been updated to now match the query (firebase/firebase-android-sdk#155).
- [fixed] Fixed an internal assertion that was triggered when an update
with a
FieldValue.serverTimestamp()
and an update with aFieldValue.increment()
were pending for the same document.
- [changed] Added logging and a custom error message to help users hitting https://bugs.webkit.org/show_bug.cgi?id=197050 (a bug in iOS 12.2 causing the SDK to potentially crash when persistence is enabled).
- [fixed] Fixed an issue for environments missing
window.addEventListener
, such as in React Native with Expo (#1824).
- [feature] Added
clearPersistence()
, which clears the persistent storage including pending writes and cached documents. This is intended to help write reliable tests (#449).
- [changed] Firestore now recovers more quickly after network connectivity changes (airplane mode, Wi-Fi availability, etc.).
- [changed] Deprecated the
experimentalTabSynchronization
setting in favor ofsynchronizeTabs
. If you use multi-tab synchronization, it is recommended that you update your call toenablePersistence()
. Firestore logs an error if you continue to useexperimentalTabSynchronization
. - [feature] You can now query across all collections in your database with a
given collection ID using the
FirebaseFirestore.collectionGroup()
method.
- [feature] Added an
experimentalForceLongPolling
setting that can be used to work around proxies that prevent the Firestore client from connecting to the Firestore backend.
- [changed] Increased a connection timeout that could lead to large writes perpetually retrying without ever succeeding (#1447).
- [fixed] Fixed an issue with IndexedDb persistence that triggered an internal assert for Queries that use nested DocumentReferences in where() clauses (#1524, #1596).
- [fixed] Fixed an issue where transactions in a Node.JS app could be sent without auth credentials, leading to Permission Denied errors.
- [feature] Added
FieldValue.increment()
, which can be used inupdate()
andset(..., {merge:true})
to increment or decrement numeric field values safely without transactions. - [changed] Prepared the persistence layer to support collection group queries. While this feature is not yet available, all schema changes are included in this release. Once you upgrade, you will not be able to use an older version of the Firestore SDK with persistence enabled.
- [changed] Improved performance when querying over documents that contain subcollections.
- [fixed] Fixed an uncaught promise error occurring when
enablePersistence()
was called in a second tab (#1531).
- [changed] The
timestampsInSnapshots
setting is now enabled by default. Timestamp fields that read from aDocumentSnapshot
are now returned asTimestamp
objects instead ofDate
objects. This is a breaking change; developers must update any code that expects to receive aDate
object. See https://firebase.google.com/docs/reference/js/firebase.firestore.Settings#~timestampsInSnapshots for more details. - [fixed] Fixed a crash that could happen when the app is shut down after a write has been sent to the server but before it has been received on a listener.
- [fixed] Fixed a regression introduced in 5.7.0 that caused apps using experimentalTabSynchronization to hit an exception for "Failed to obtain primary lease for action 'Collect garbage'".
- [changed] Added a custom error for schema downgrades.
- [changed] Removed eval()-based fallback for JSON parsing, allowing SDK to be used in environments that prohibit eval().
- [feature] Added a garbage collection process to on-disk persistence that
removes older documents. This is enabled automatically if persistence is
enabled, and the SDK will attempt to periodically clean up older, unused
documents once the on-disk cache passes a threshold size (default: 40 MB).
This threshold can be configured by changing the setting
cacheSizeBytes
in the settings passed toFirestore.settings()
. It must be set to a minimum of 1 MB. The garbage collection process can be disabled entirely by settingcacheSizeBytes
toCACHE_SIZE_UNLIMITED
.
- [fixed] Fixed an issue that prevented query synchronization between multiple tabs.
- [fixed] Fixed an issue where native ES6 module loading was not working.
- [fixed] Fixed an issue where typings are created in the wrong location.
- [feature] Access to offline persistence is no longer limited to a single tab.
You can opt into this new experimental mode by invoking
enablePersistence()
with{experimentalTabSynchronization: true}
. All tabs accessing persistence must use the same setting for this flag. - [fixed] Fixed an issue where the first
get()
call made after being offline could incorrectly return cached data without attempting to reach the backend. - [changed] Changed
get()
to only make one attempt to reach the backend before returning cached data, potentially reducing delays while offline. - [fixed] Fixed an issue that caused Firebase to drop empty objects from calls
to
set(..., { merge: true })
. - [changed] Improved argument validation for several API methods.
- [changed] Changed the internal handling for locally updated documents that
haven't yet been read back from Firestore. This can lead to slight behavior
changes and may affect the
SnapshotMetadata.hasPendingWrites
metadata flag. - [changed] Eliminated superfluous update events for locally cached documents that are known to lag behind the server version. Instead, we buffer these events until the client has caught up with the server.
- [fixed] Fixed a regression that prevented use of Firestore on ReactNative's Expo platform (#1138).
- [fixed] Fixed
get({source: 'cache'})
to be able to return nonexistent documents from cache. - [changed] Prepared the persistence layer to allow shared access from multiple tabs. While this feature is not yet available, all schema changes are included in this release. Once you upgrade, you will not be able to use an older version of the Firestore SDK with persistence enabled.
- [fixed] Fixed an issue where changes to custom authentication claims did not take effect until you did a full sign-out and sign-in. (firebase/firebase-ios-sdk#1499)
- [changed] Improved how Firestore handles idle queries to reduce the cost of re-listening within 30 minutes.
- [changed] Improved offline performance with many outstanding writes.
- [fixed] Fixed an issue where queries returned fewer results than they should, caused by documents that were cached as deleted when they should not have been (firebase/firebase-ios-sdk#1548). Because some cache data is cleared, clients might use extra bandwidth the first time they launch with this version of the SDK.
- [feature] Added
firebase.firestore.FieldValue.arrayUnion()
andfirebase.firestore.FieldValue.arrayRemove()
to atomically add and remove elements from an array field in a document. - [feature] Added
'array-contains'
query operator for use with.where()
to find documents where an array field contains a specific element.
- [changed] Merged the
includeQueryMetadataChanges
andincludeDocumentMetadataChanges
options passed toQuery.onSnapshot()
into a singleincludeMetadataChanges
option. - [changed]
QuerySnapshot.docChanges()
is now a method that optionally takes anincludeMetadataChanges
option. By default, even when listening to a query with{ includeMetadataChanges:true }
, metadata-only document changes are suppressed indocChanges()
. - [feature] Added new
{ mergeFields: (string|FieldPath)[] }
option toset()
which allows merging of a reduced subset of fields.
- [fixed] Fixed a regression in Firebase JS release 4.13.0 regarding the loading of proto files, causing Node.JS support to break.
- [feature] Added a new
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 makeDocumentSnapshot
s read timestamp fields back asTimestamp
s instead of Dates, you can set the newly added flagtimestampsInSnapshots
inFirestoreSettings
totrue
. 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. - [feature] Added ability to control whether DocumentReference.get() and Query.get() should fetch from server only, (by passing { source: 'server' }), cache only (by passing { source: 'cache' }), or attempt server and fall back to the cache (which was the only option previously, and is now the default).
- [fixed] Fixed a regression in the Firebase JS release 4.11.0 that could cause get() requests made while offline to be delayed by up to 10 seconds (rather than returning from cache immediately).
- [fixed] Fixed a regression in the Firebase JS release 4.11.0 that could cause a crash if a user signs out while the client is offline, resulting in an error of "Attempted to schedule multiple operations with timer id listen_stream_connection_backoff".
- [changed] If the SDK's attempt to connect to the Cloud Firestore backend neither succeeds nor fails within 10 seconds, the SDK will consider itself "offline", causing get() calls to resolve with cached results, rather than continuing to wait.
- [fixed] Fixed a potential race condition after calling
enableNetwork()
that could result in a "Mutation batchIDs must be acknowledged in order" assertion crash.
- [fixed] Fixed a regression in Firebase JS release 4.9.0 that could in certain cases result in an "OnlineState should not affect limbo documents." assertion crash when the client loses its network connection.
- [changed] Snapshot listeners (with the
includeMetadataChanges
option enabled) now receive an event withsnapshot.metadata.fromCache
set totrue
if the SDK loses its connection to the backend. A new event withsnapshot.metadata.fromCache
set to false will be raised once the connection is restored and the query is in sync with the backend again. - [feature] Added
SnapshotOptions
API to control how DocumentSnapshots return unresolved server timestamps. - [feature] Added
disableNetwork()
andenableNetwork()
methods toFirestore
class, allowing for explicit network management. - [changed] For non-existing documents,
DocumentSnapshot.data()
now returnsundefined
instead of throwing an exception. A newQueryDocumentSnapshot
class is introduced for Queries to reduce the number of undefined-checks in your code. - [added] Added
isEqual
API toGeoPoint
,Blob
,SnapshotMetadata
,DocumentSnapshot
,QuerySnapshot
,CollectionReference
,FieldValue
andFieldPath
. - [changed] A "Could not reach Firestore backend." message will be logged when the initial connection to the Firestore backend fails.
- [changed] A "Using maximum backoff delay to prevent overloading the backend." message will be logged when we get a resource-exhausted error from the backend.
- [feature] Added Node.js support for Cloud Firestore (with the exception of the offline persistence feature).
- [changed] Webchannel requests use $httpHeaders URL parameter rather than normal HTTP headers to avoid an extra CORS preflight request when initiating streams / RPCs.
- [changed] Network streams are automatically closed after 60 seconds of idleness.
- [changed] We no longer log 'RPC failed' messages for expected failures.
- [changed] We now support
FieldValue.delete()
sentinels inset()
calls with{merge:true}
. - [fixed] Fixed validation of nested arrays to allow indirect nesting
- [fixed] Fixed an issue causing exceptions when trying to use
firebase.firestore.FieldPath.documentId()
in anorderBy()
orwhere()
clause in a query.
- Initial public release.