Skip to content

Commit

Permalink
Merge branch 'master' into ddb-upgrade-node-fetch
Browse files Browse the repository at this point in the history
  • Loading branch information
DellaBitta committed Oct 30, 2023
2 parents a9f1f90 + 12ad9f1 commit 4caec8d
Show file tree
Hide file tree
Showing 61 changed files with 678 additions and 269 deletions.
2 changes: 0 additions & 2 deletions .changeset/flat-eagles-obey.md

This file was deleted.

5 changes: 0 additions & 5 deletions .changeset/lucky-dragons-juggle.md

This file was deleted.

16 changes: 15 additions & 1 deletion .github/workflows/test-changed-firestore-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ jobs:
- uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.JSSDK_ACTIONS_SA_KEY }}'

# create composite indexes with Terraform
- name: Setup Terraform
uses: hashicorp/setup-terraform@v2
Expand All @@ -29,8 +30,21 @@ jobs:
if: github.event_name == 'pull_request'
run: |
cd packages/firestore
terraform apply -var-file=../../config/project.json -auto-approve &> /dev/null
# Define a temporary file, redirect both stdout and stderr to it
output_file=$(mktemp)
if ! terraform apply -var-file=../../config/project.json -auto-approve > "$output_file" 2>&1 ; then
cat "$output_file"
if cat "$output_file" | grep -q "index already exists"; then
echo "==================================================================================="
echo -e "\e[93m\e[1mTerraform apply failed due to index already exists; We can safely ignore this error.\e[0m"
echo "==================================================================================="
fi
exit 1
fi
rm -f "$output_file"
continue-on-error: true

- name: Set up Node (16)
uses: actions/setup-node@v3
with:
Expand Down
6 changes: 3 additions & 3 deletions common/api-review/firestore.api.md
Original file line number Diff line number Diff line change
Expand Up @@ -299,15 +299,15 @@ export function getDocsFromCache<AppModelType, DbModelType extends DocumentData>
// @public
export function getDocsFromServer<AppModelType, DbModelType extends DocumentData>(query: Query<AppModelType, DbModelType>): Promise<QuerySnapshot<AppModelType, DbModelType>>;

// @public
export function getFirestore(): Firestore;

// @public
export function getFirestore(app: FirebaseApp): Firestore;

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

// @public
export function getFirestore(): Firestore;

// @beta
export function getFirestore(app: FirebaseApp, databaseId: string): Firestore;

Expand Down
2 changes: 1 addition & 1 deletion docs-devsite/app-check.md
Original file line number Diff line number Diff line change
Expand Up @@ -155,7 +155,7 @@ export declare function onTokenChanged(appCheckInstance: AppCheck, onNext: (toke
| Parameter | Type | Description |
| --- | --- | --- |
| appCheckInstance | [AppCheck](./app-check.appcheck.md#appcheck_interface) | The App Check service instance. |
| 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)<!-- -->. |
| 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)<!-- -->. |
| onError | (error: Error) =&gt; void | Optional. Called if there is an error thrown by the listener (the <code>onNext</code> function). |
| onCompletion | () =&gt; void | Currently unused, as the token stream is unending. |

Expand Down
16 changes: 8 additions & 8 deletions docs-devsite/firestore_.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ https://github.com/firebase/firebase-js-sdk
| --- | --- |
| <b>function(app...)</b> |
| [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. |
| [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. |
| [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. |
| [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)<!-- -->. |
| <b>function(firestore...)</b> |
| [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. |
Expand Down Expand Up @@ -49,7 +49,7 @@ https://github.com/firebase/firebase-js-sdk
| [persistentMultipleTabManager()](./firestore_.md#persistentmultipletabmanager) | Creates an instance of <code>PersistentMultipleTabManager</code>. |
| [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. |
| <b>function(databaseId...)</b> |
| [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. |
| [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. |
| <b>function(elements...)</b> |
| [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. |
| [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. |
Expand Down Expand Up @@ -240,14 +240,14 @@ export declare function getFirestore(app: FirebaseApp): Firestore;

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

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

## getFirestore()

> 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.
>
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.
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.

<b>Signature:</b>

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

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

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

## initializeFirestore()

Expand Down Expand Up @@ -901,7 +901,7 @@ export declare function getFirestore(): Firestore;

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

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

## memoryEagerGarbageCollector()

Expand Down Expand Up @@ -947,7 +947,7 @@ export declare function serverTimestamp(): FieldValue;
> 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.
>
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.
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.

<b>Signature:</b>

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

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

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

## arrayRemove()

Expand Down
8 changes: 4 additions & 4 deletions integration/compat-interop/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,12 +8,12 @@
"test:debug": "karma start --browsers Chrome --auto-watch"
},
"dependencies": {
"@firebase/app": "0.9.20",
"@firebase/app-compat": "0.2.20",
"@firebase/app": "0.9.22",
"@firebase/app-compat": "0.2.22",
"@firebase/analytics": "0.10.0",
"@firebase/analytics-compat": "0.2.6",
"@firebase/auth": "1.3.0",
"@firebase/auth-compat": "0.4.6",
"@firebase/auth": "1.3.2",
"@firebase/auth-compat": "0.4.8",
"@firebase/functions": "0.10.0",
"@firebase/functions-compat": "0.3.5",
"@firebase/messaging": "0.12.4",
Expand Down
2 changes: 1 addition & 1 deletion integration/firebase/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
},
"devDependencies": {
"firebase": "10.5.0",
"firebase": "10.5.2",
"@types/chai": "4.3.5",
"@types/mocha": "9.1.1",
"chai": "4.3.7",
Expand Down
4 changes: 2 additions & 2 deletions integration/firestore/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
},
"dependencies": {
"@firebase/app": "0.9.20",
"@firebase/firestore": "4.3.0"
"@firebase/app": "0.9.22",
"@firebase/firestore": "4.3.2"
},
"devDependencies": {
"@types/mocha": "9.1.1",
Expand Down
2 changes: 1 addition & 1 deletion integration/messaging/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
"test:manual": "mocha --exit"
},
"devDependencies": {
"firebase": "10.5.0",
"firebase": "10.5.2",
"chai": "4.3.7",
"chromedriver": "114.0.2",
"express": "4.18.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@
"@firebase/app-compat": "0.x"
},
"devDependencies": {
"@firebase/app-compat": "0.2.20",
"@firebase/app-compat": "0.2.22",
"rollup": "2.79.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.20",
"@firebase/app": "0.9.22",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.2.20",
"@firebase/app-compat": "0.2.22",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.20",
"@firebase/app": "0.9.22",
"rollup": "2.79.1",
"@rollup/plugin-commonjs": "21.1.0",
"@rollup/plugin-json": "4.1.0",
Expand Down
2 changes: 1 addition & 1 deletion packages/app-check/src/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -259,7 +259,7 @@ export function onTokenChanged(
* the current token associated with this App Check instance changes.
*
* @param appCheckInstance - The App Check service instance.
* @param onNext - When the token changes, this function is called with aa
* @param onNext - When the token changes, this function is called with an
* {@link AppCheckTokenResult}.
* @param onError - Optional. Called if there is an error thrown by the
* listener (the `onNext` function).
Expand Down
14 changes: 14 additions & 0 deletions packages/app-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @firebase/app-compat

## 0.2.22

### Patch Changes

- Updated dependencies []:
- @firebase/app@0.9.22

## 0.2.21

### Patch Changes

- Updated dependencies []:
- @firebase/app@0.9.21

## 0.2.20

### Patch Changes
Expand Down
4 changes: 2 additions & 2 deletions packages/app-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/app-compat",
"version": "0.2.20",
"version": "0.2.22",
"description": "The primary entrypoint to the Firebase JS SDK",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/index.cjs.js",
Expand Down Expand Up @@ -40,7 +40,7 @@
},
"license": "Apache-2.0",
"dependencies": {
"@firebase/app": "0.9.20",
"@firebase/app": "0.9.22",
"@firebase/util": "1.9.3",
"@firebase/logger": "0.4.0",
"@firebase/component": "0.6.4",
Expand Down
12 changes: 12 additions & 0 deletions packages/app/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,17 @@
# @firebase/app

## 0.9.22

### Patch Changes

- Update SDK_VERSION.

## 0.9.21

### Patch Changes

- Update SDK_VERSION.

## 0.9.20

### Patch Changes
Expand Down
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/app",
"version": "0.9.20",
"version": "0.9.22",
"description": "The primary entrypoint to the Firebase JS SDK",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/index.cjs.js",
Expand Down
14 changes: 14 additions & 0 deletions packages/auth-compat/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,19 @@
# @firebase/auth-compat

## 0.4.8

### Patch Changes

- Updated dependencies [[`33a2298af`](https://github.com/firebase/firebase-js-sdk/commit/33a2298af3dc669a23548ee1703de788435aa6b5)]:
- @firebase/auth@1.3.2

## 0.4.7

### Patch Changes

- Updated dependencies [[`f002ef36a`](https://github.com/firebase/firebase-js-sdk/commit/f002ef36a6b427fd526696f9cd6077a217ccc6ef), [`68927ced1`](https://github.com/firebase/firebase-js-sdk/commit/68927ced1159d9b79407c7823d7f48d30ccb591e), [`3533b32b1`](https://github.com/firebase/firebase-js-sdk/commit/3533b32b1be6a9800b1b58a6a2b08f50fae18eeb)]:
- @firebase/auth@1.3.1

## 0.4.6

### Patch Changes
Expand Down
6 changes: 3 additions & 3 deletions packages/auth-compat/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/auth-compat",
"version": "0.4.6",
"version": "0.4.8",
"description": "FirebaseAuth compatibility package that uses API style compatible with Firebase@8 and prior versions",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/index.node.cjs.js",
Expand Down Expand Up @@ -50,7 +50,7 @@
"@firebase/app-compat": "0.x"
},
"dependencies": {
"@firebase/auth": "1.3.0",
"@firebase/auth": "1.3.2",
"@firebase/auth-types": "0.12.0",
"@firebase/component": "0.6.4",
"@firebase/util": "1.9.3",
Expand All @@ -59,7 +59,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app-compat": "0.2.20",
"@firebase/app-compat": "0.2.22",
"@rollup/plugin-json": "4.1.0",
"rollup": "2.79.1",
"rollup-plugin-replace": "2.2.0",
Expand Down
17 changes: 17 additions & 0 deletions packages/auth/CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,5 +1,22 @@
# @firebase/auth

## 1.3.2

### Patch Changes

- [`33a2298af`](https://github.com/firebase/firebase-js-sdk/commit/33a2298af3dc669a23548ee1703de788435aa6b5) [#7720](https://github.com/firebase/firebase-js-sdk/pull/7720) - fixes github issue https://github.com/firebase/firebase-js-sdk/issues/7701.

## 1.3.1

### Patch Changes

- [`f002ef36a`](https://github.com/firebase/firebase-js-sdk/commit/f002ef36a6b427fd526696f9cd6077a217ccc6ef) [#7634](https://github.com/firebase/firebase-js-sdk/pull/7634) (fixes [#7633](https://github.com/firebase/firebase-js-sdk/issues/7633)) - Fix FetchProvider in non-browser environments, by trying to get the `fetch` implementation from not only `self` but also standard `globalThis`.

- [`68927ced1`](https://github.com/firebase/firebase-js-sdk/commit/68927ced1159d9b79407c7823d7f48d30ccb591e) [#7685](https://github.com/firebase/firebase-js-sdk/pull/7685) - Create getProviderEnforcementState method to get reCAPTCHA Enterprise enforcement state of a provider.
This is an internal code change preparing for future features.

- [`3533b32b1`](https://github.com/firebase/firebase-js-sdk/commit/3533b32b1be6a9800b1b58a6a2b08f50fae18eeb) [#7666](https://github.com/firebase/firebase-js-sdk/pull/7666) - Create handleRecaptchaFlow helper method

## 1.3.0

### Minor Changes
Expand Down
4 changes: 4 additions & 0 deletions packages/auth/index.rn.ts
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ export {

// MFA
export { PhoneMultiFactorGenerator } from './src/platform_browser/mfa/assertions/phone';
export {
TotpMultiFactorGenerator,
TotpSecret
} from './src/mfa/assertions/totp';

export { getReactNativePersistence } from './src/platform_react_native/persistence/react_native';

Expand Down
4 changes: 2 additions & 2 deletions packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@firebase/auth",
"version": "1.3.0",
"version": "1.3.2",
"description": "The Firebase Authenticaton component of the Firebase JS SDK.",
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
"main": "dist/node/index.js",
Expand Down Expand Up @@ -120,7 +120,7 @@
},
"license": "Apache-2.0",
"devDependencies": {
"@firebase/app": "0.9.20",
"@firebase/app": "0.9.22",
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-strip": "2.1.0",
"@types/express": "4.17.17",
Expand Down
Loading

0 comments on commit 4caec8d

Please sign in to comment.