Skip to content

Commit aa0f8a9

Browse files
Merge master into release
2 parents b2f6084 + 98cfcbd commit aa0f8a9

File tree

85 files changed

+3395
-1446
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

85 files changed

+3395
-1446
lines changed

.changeset/fresh-frogs-heal.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@firebase/firestore": patch
3+
"@firebase/webchannel-wrapper": patch
4+
---
5+
6+
Fix an issue where Firestore was incorrectly using XHR instead of fetch for streaming response.

.changeset/hip-cougars-float.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/firestore': minor
3+
'firebase': minor
4+
---
5+
6+
Add `enablePersistentCacheIndexAutoCreation()` function to enable automatic creation of local cache query indexes, which can improve performance of local query execution.

.changeset/lucky-horses-sin.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/rules-unit-testing': patch
3+
'@firebase/firestore': patch
4+
---
5+
6+
Updated minor dependencies grpc (firestore) and firebase-admin (rules-unit-testing).

.github/workflows/test-all.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,13 +17,14 @@ jobs:
1717
# Install Chrome so the correct version of webdriver can be installed by chromedriver when
1818
# setting up the repo. This must be done to build and execute Auth properly.
1919
- name: install Chrome stable
20-
# Install Chrome version 110.0.5481.177-1 as some Auth tests start to fail on version 111.
21-
# Temporary: Auth team will explore what's going wrong with the auth tests.
20+
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
21+
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
22+
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
2223
run: |
2324
sudo apt-get update
2425
sudo apt-get install wget
25-
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.177-1_amd64.deb
26-
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
26+
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
27+
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
2728
- uses: actions/checkout@v3
2829
- name: Set up Node (16)
2930
uses: actions/setup-node@v3
@@ -102,13 +103,14 @@ jobs:
102103
steps:
103104
# install Chrome so the correct version of webdriver can be installed by chromedriver when setting up the repo
104105
- name: install Chrome stable
105-
# Install Chrome version 110.0.5481.177-1 as some Auth tests start to fail on version 111.
106-
# Temporary: Auth team will explore what's going wrong with the auth tests.
106+
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
107+
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
108+
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
107109
run: |
108110
sudo apt-get update
109111
sudo apt-get install wget
110-
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.177-1_amd64.deb
111-
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
112+
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
113+
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
112114
- name: Download build archive
113115
uses: actions/download-artifact@v3
114116
with:

.github/workflows/test-changed-auth.yml

Lines changed: 10 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,14 @@ jobs:
1414
steps:
1515
# install Chrome first, so the correct version of webdriver can be installed by chromedriver when setting up the repo
1616
- name: install Chrome stable
17-
# Install Chrome version 110.0.5481.177-1 as test starts to fail on version 111.
18-
# Temporary: Auth team will explore what's going wrong with the auth tests.
17+
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
18+
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
19+
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
1920
run: |
2021
sudo apt-get update
2122
sudo apt-get install wget
22-
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.177-1_amd64.deb
23-
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
23+
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
24+
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
2425
- name: Checkout Repo
2526
uses: actions/checkout@master
2627
with:
@@ -48,16 +49,17 @@ jobs:
4849

4950
runs-on: ubuntu-20.04
5051

51-
# Chrome webdriver version is pinned to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790"
52-
# These are installed even in the Firefox test due to `yarn` command which pulls the devDependency listed in package.json.
52+
# Pin Chrome version 114.0.5735.90-1 to avoid install failures like "No such object: chromedriver/LATEST_RELEASE_115.0.5790".
53+
# The failure happens because https://chromedriver.chromium.org/downloads only goes up to version 114.
54+
# TODO(b/297380444) Update script to install the latest Chrome and ChromeDriver.
5355
steps:
5456
- name: install Firefox stable
5557
run: |
5658
sudo apt-get update
5759
sudo apt-get install firefox
5860
sudo apt-get install wget
59-
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_110.0.5481.177-1_amd64.deb
60-
sudo apt-get install -f ./google-chrome-stable_110.0.5481.177-1_amd64.deb --allow-downgrades
61+
sudo wget http://dl.google.com/linux/chrome/deb/pool/main/g/google-chrome-stable/google-chrome-stable_114.0.5735.90-1_amd64.deb
62+
sudo apt-get install -f ./google-chrome-stable_114.0.5735.90-1_amd64.deb --allow-downgrades
6163
6264
- name: Checkout Repo
6365
uses: actions/checkout@master

common/api-review/firestore.api.md

Lines changed: 22 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -101,6 +101,9 @@ export function connectFirestoreEmulator(firestore: Firestore, host: string, por
101101
mockUserToken?: EmulatorMockTokenOptions | string;
102102
}): void;
103103

104+
// @public
105+
export function deleteAllPersistentCacheIndexes(indexManager: PersistentCacheIndexManager): void;
106+
104107
// @public
105108
export function deleteDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>): Promise<void>;
106109

@@ -110,6 +113,9 @@ export function deleteField(): FieldValue;
110113
// @public
111114
export function disableNetwork(firestore: Firestore): Promise<void>;
112115

116+
// @public
117+
export function disablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
118+
113119
// @public
114120
export function doc(firestore: Firestore, path: string, ...pathSegments: string[]): DocumentReference<DocumentData, DocumentData>;
115121

@@ -172,6 +178,9 @@ export function enableMultiTabIndexedDbPersistence(firestore: Firestore): Promis
172178
// @public
173179
export function enableNetwork(firestore: Firestore): Promise<void>;
174180

181+
// @public
182+
export function enablePersistentCacheIndexAutoCreation(indexManager: PersistentCacheIndexManager): void;
183+
175184
// @public
176185
export function endAt<AppModelType, DbModelType extends DocumentData>(snapshot: DocumentSnapshot<AppModelType, DbModelType>): QueryEndAtConstraint;
177186

@@ -286,25 +295,28 @@ export function getFirestore(): Firestore;
286295
// @beta
287296
export function getFirestore(app: FirebaseApp, databaseId: string): Firestore;
288297

298+
// @public
299+
export function getPersistentCacheIndexManager(firestore: Firestore): PersistentCacheIndexManager | null;
300+
289301
// @public
290302
export function increment(n: number): FieldValue;
291303

292-
// @beta
304+
// @beta @deprecated
293305
export interface Index {
294306
// (undocumented)
295307
[key: string]: unknown;
296308
readonly collectionGroup: string;
297309
readonly fields?: IndexField[];
298310
}
299311

300-
// @beta
312+
// @beta @deprecated
301313
export interface IndexConfiguration {
302314
// (undocumented)
303315
[key: string]: unknown;
304316
readonly indexes?: Index[];
305317
}
306318

307-
// @beta
319+
// @beta @deprecated
308320
export interface IndexField {
309321
// (undocumented)
310322
[key: string]: unknown;
@@ -457,6 +469,11 @@ export interface PersistenceSettings {
457469
forceOwnership?: boolean;
458470
}
459471

472+
// @public
473+
export class PersistentCacheIndexManager {
474+
readonly type: 'PersistentCacheIndexManager';
475+
}
476+
460477
// @public
461478
export interface PersistentCacheSettings {
462479
cacheSizeBytes?: number;
@@ -596,10 +613,10 @@ export function setDoc<AppModelType, DbModelType extends DocumentData>(reference
596613
// @public
597614
export function setDoc<AppModelType, DbModelType extends DocumentData>(reference: DocumentReference<AppModelType, DbModelType>, data: PartialWithFieldValue<AppModelType>, options: SetOptions): Promise<void>;
598615

599-
// @beta
616+
// @beta @deprecated
600617
export function setIndexConfiguration(firestore: Firestore, configuration: IndexConfiguration): Promise<void>;
601618

602-
// @beta
619+
// @beta @deprecated
603620
export function setIndexConfiguration(firestore: Firestore, json: string): Promise<void>;
604621

605622
// @public

config/functions/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@
33
"description": "Cloud Functions for Firebase",
44
"dependencies": {
55
"cors": "2.8.5",
6-
"firebase-admin": "11.9.0",
6+
"firebase-admin": "11.10.1",
77
"firebase-functions": "3.24.1"
88
},
99
"private": true,

docs-devsite/firestore_.index.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ https://github.com/firebase/firebase-js-sdk
1313
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1414
>
1515
16+
> Warning: This API is now obsolete.
17+
>
18+
> Instead of creating cache indexes manually, consider using `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to create cache indexes for queries running locally.
19+
>
20+
1621
The SDK definition of a Firestore index.
1722

1823
<b>Signature:</b>

docs-devsite/firestore_.indexconfiguration.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ https://github.com/firebase/firebase-js-sdk
1313
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1414
>
1515
16+
> Warning: This API is now obsolete.
17+
>
18+
> Instead of creating cache indexes manually, consider using `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to create cache indexes for queries running locally.
19+
>
20+
1621
A list of Firestore indexes to speed up local query execution.
1722

1823
See [JSON Format](https://firebase.google.com/docs/reference/firestore/indexes/#json_format) for a description of the format of the index definition.

docs-devsite/firestore_.indexfield.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,11 @@ https://github.com/firebase/firebase-js-sdk
1313
> This API is provided as a preview for developers and may change based on feedback that we receive. Do not use this API in a production environment.
1414
>
1515
16+
> Warning: This API is now obsolete.
17+
>
18+
> Instead of creating cache indexes manually, consider using `enablePersistentCacheIndexAutoCreation()` to let the SDK decide whether to create cache indexes for queries running locally.
19+
>
20+
1621
A single field element in an index configuration.
1722

1823
<b>Signature:</b>

0 commit comments

Comments
 (0)