Skip to content

Commit 8a9a81f

Browse files
Merge master into release
2 parents d2e4774 + f002ef3 commit 8a9a81f

File tree

32 files changed

+365
-200
lines changed

32 files changed

+365
-200
lines changed

.changeset/afraid-waves-remember.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/auth": patch
3+
---
4+
5+
Fix FetchProvider in non-browser environments, by trying to get the `fetch` implementation from not only `self` but also standard `globalThis`.

.changeset/flat-eagles-obey.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
---
2+
---

.changeset/khaki-apricots-doubt.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/auth': patch
3+
---
4+
5+
Create getProviderEnforcementState method to get reCAPTCHA Enterprise enforcement state of a provider.
6+
This is an internal code change preparing for future features.

.changeset/lucky-dragons-juggle.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/auth': patch
3+
---
4+
5+
Create handleRecaptchaFlow helper method

.changeset/quick-otters-applaud.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/firestore': patch
3+
---
4+
5+
Clarify method documentation.

.github/workflows/test-changed-firestore-integration.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ jobs:
1616
- uses: 'google-github-actions/auth@v0'
1717
with:
1818
credentials_json: '${{ secrets.JSSDK_ACTIONS_SA_KEY }}'
19+
1920
# create composite indexes with Terraform
2021
- name: Setup Terraform
2122
uses: hashicorp/setup-terraform@v2
@@ -29,8 +30,21 @@ jobs:
2930
if: github.event_name == 'pull_request'
3031
run: |
3132
cd packages/firestore
32-
terraform apply -var-file=../../config/project.json -auto-approve
33+
34+
# Define a temporary file, redirect both stdout and stderr to it
35+
output_file=$(mktemp)
36+
if ! terraform apply -var-file=../../config/project.json -auto-approve > "$output_file" 2>&1 ; then
37+
cat "$output_file"
38+
if cat "$output_file" | grep -q "index already exists"; then
39+
echo "==================================================================================="
40+
echo -e "\e[93m\e[1mTerraform apply failed due to index already exists; We can safely ignore this error.\e[0m"
41+
echo "==================================================================================="
42+
fi
43+
exit 1
44+
fi
45+
rm -f "$output_file"
3346
continue-on-error: true
47+
3448
- name: Set up Node (16)
3549
uses: actions/setup-node@v3
3650
with:

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,4 +97,4 @@ toc/
9797
.terraform/*
9898
.terraform.lock.hcl
9999
*.tfstate
100-
*.tfstate.*
100+
*.tfstate.*

common/api-review/firestore.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -299,15 +299,15 @@ export function getDocsFromCache<AppModelType, DbModelType extends DocumentData>
299299
// @public
300300
export function getDocsFromServer<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>;
301301

302+
// @public
303+
export function getFirestore(): Firestore;
304+
302305
// @public
303306
export function getFirestore(app: FirebaseApp): Firestore;
304307

305308
// @beta
306309
export function getFirestore(databaseId: string): Firestore;
307310

308-
// @public
309-
export function getFirestore(): Firestore;
310-
311311
// @beta
312312
export function getFirestore(app: FirebaseApp, databaseId: string): Firestore;
313313

docs-devsite/app-check.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -155,7 +155,7 @@ export declare function onTokenChanged(appCheckInstance: AppCheck, onNext: (toke
155155
| Parameter | Type | Description |
156156
| --- | --- | --- |
157157
| appCheckInstance | [AppCheck](./app-check.appcheck.md#appcheck_interface) | The App Check service instance. |
158-
| onNext | (tokenResult: [AppCheckTokenResult](./app-check.appchecktokenresult.md#appchecktokenresult_interface)<!-- -->) =&gt; void | When the token changes, this function is called with aa [AppCheckTokenResult](./app-check.appchecktokenresult.md#appchecktokenresult_interface)<!-- -->. |
158+
| onNext | (tokenResult: [AppCheckTokenResult](./app-check.appchecktokenresult.md#appchecktokenresult_interface)<!-- -->) =&gt; void | When the token changes, this function is called with an [AppCheckTokenResult](./app-check.appchecktokenresult.md#appchecktokenresult_interface)<!-- -->. |
159159
| onError | (error: Error) =&gt; void | Optional. Called if there is an error thrown by the listener (the <code>onNext</code> function). |
160160
| onCompletion | () =&gt; void | Currently unused, as the token stream is unending. |
161161

docs-devsite/firestore_.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ https://github.com/firebase/firebase-js-sdk
1717
| --- | --- |
1818
| <b>function(app...)</b> |
1919
| [getFirestore(app)](./firestore_.md#getfirestore) | Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
20-
| [getFirestore(app, databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
20+
| [getFirestore(app, databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
2121
| [initializeFirestore(app, settings, databaseId)](./firestore_.md#initializefirestore) | Initializes a new instance of [Firestore](./firestore_.firestore.md#firestore_class) with the provided settings. Can only be called before any other function, including [getFirestore()](./firestore_.md#getfirestore)<!-- -->. If the custom settings are empty, this function is equivalent to calling [getFirestore()](./firestore_.md#getfirestore)<!-- -->. |
2222
| <b>function(firestore...)</b> |
2323
| [clearIndexedDbPersistence(firestore)](./firestore_.md#clearindexeddbpersistence) | Clears the persistent storage. This includes pending writes and cached documents.<!-- -->Must be called while the [Firestore](./firestore_.firestore.md#firestore_class) instance is not started (after the app is terminated or when the app is first initialized). On startup, this function must be called before other functions (other than [initializeFirestore()](./firestore_.md#initializefirestore) or [getFirestore()](./firestore_.md#getfirestore)<!-- -->)). If the [Firestore](./firestore_.firestore.md#firestore_class) instance is still running, the promise will be rejected with the error code of <code>failed-precondition</code>.<!-- -->Note: <code>clearIndexedDbPersistence()</code> is primarily intended to help write reliable tests that use Cloud Firestore. It uses an efficient mechanism for dropping existing data but does not attempt to securely overwrite or otherwise make cached data unrecoverable. For applications that are sensitive to the disclosure of cached data in between user sessions, we strongly recommend not enabling persistence at all. |
@@ -49,7 +49,7 @@ https://github.com/firebase/firebase-js-sdk
4949
| [persistentMultipleTabManager()](./firestore_.md#persistentmultipletabmanager) | Creates an instance of <code>PersistentMultipleTabManager</code>. |
5050
| [serverTimestamp()](./firestore_.md#servertimestamp) | Returns a sentinel used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) to include a server-generated timestamp in the written data. |
5151
| <b>function(databaseId...)</b> |
52-
| [getFirestore(databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
52+
| [getFirestore(databaseId)](./firestore_.md#getfirestore) | <b><i>(BETA)</i></b> Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings. |
5353
| <b>function(elements...)</b> |
5454
| [arrayRemove(elements)](./firestore_.md#arrayremove) | Returns a special value that can be used with [setDoc()](./firestore_.md#setdoc) or that tells the server to remove the given elements from any array value that already exists on the server. All instances of each element specified will be removed from the array. If the field being modified is not already an array it will be overwritten with an empty array. |
5555
| [arrayUnion(elements)](./firestore_.md#arrayunion) | Returns a special value that can be used with [setDoc()](./firestore_lite.md#setdoc) or [updateDoc()](./firestore_lite.md#updatedoc) that tells the server to union the given elements with any array value that already exists on the server. Each specified element that doesn't already exist in the array will be added to the end. If the field being modified is not already an array it will be overwritten with an array containing exactly the specified elements. |
@@ -240,14 +240,14 @@ export declare function getFirestore(app: FirebaseApp): Firestore;
240240

241241
[Firestore](./firestore_.firestore.md#firestore_class)
242242

243-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
243+
The default [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
244244

245245
## getFirestore()
246246

247247
> 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.
248248
>
249249
250-
Returns the existing default [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
250+
Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the provided [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
251251

252252
<b>Signature:</b>
253253

@@ -266,7 +266,7 @@ export declare function getFirestore(app: FirebaseApp, databaseId: string): Fire
266266

267267
[Firestore](./firestore_.firestore.md#firestore_class)
268268

269-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
269+
The named [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
270270

271271
## initializeFirestore()
272272

@@ -901,7 +901,7 @@ export declare function getFirestore(): Firestore;
901901

902902
[Firestore](./firestore_.firestore.md#firestore_class)
903903

904-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
904+
The default [Firestore](./firestore_.firestore.md#firestore_class) instance of the default app.
905905

906906
## memoryEagerGarbageCollector()
907907

@@ -947,7 +947,7 @@ export declare function serverTimestamp(): FieldValue;
947947
> 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.
948948
>
949949
950-
Returns the existing [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
950+
Returns the existing named [Firestore](./firestore_.firestore.md#firestore_class) instance that is associated with the default [FirebaseApp](./app.firebaseapp.md#firebaseapp_interface)<!-- -->. If no instance exists, initializes a new instance with default settings.
951951

952952
<b>Signature:</b>
953953

@@ -965,7 +965,7 @@ export declare function getFirestore(databaseId: string): Firestore;
965965

966966
[Firestore](./firestore_.firestore.md#firestore_class)
967967

968-
The [Firestore](./firestore_.firestore.md#firestore_class) instance of the provided app.
968+
The named [Firestore](./firestore_.firestore.md#firestore_class) instance of the default app.
969969

970970
## arrayRemove()
971971

0 commit comments

Comments
 (0)