Skip to content

Commit

Permalink
Merge master into release
Browse files Browse the repository at this point in the history
  • Loading branch information
google-oss-bot authored Jul 18, 2023
2 parents b58a617 + 3f3f536 commit cc4a7b9
Show file tree
Hide file tree
Showing 37 changed files with 782 additions and 414 deletions.
5 changes: 5 additions & 0 deletions .changeset/eighty-roses-appear.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
"@firebase/firestore": patch
---

Fixed issue where count and lite API queries did not work with named databases.
6 changes: 6 additions & 0 deletions .changeset/new-bananas-decide.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@firebase/firestore": minor
"firebase": minor
---

Update the grpc dependency to the latest version.
5 changes: 5 additions & 0 deletions .changeset/odd-bats-hug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/auth': patch
---

Unpin `@react-native-async-storage/async-storage` dependency to give users more control over the exact version.
6 changes: 6 additions & 0 deletions .changeset/pretty-donkeys-brush.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
---
"@firebase/database-compat": patch
"@firebase/database": patch
---

Included `initStandalone` as an internal method to RTDB.
37 changes: 36 additions & 1 deletion .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ jobs:
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
- name: Run unit tests
run: |
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '{@firebase/firestore*,firebase-firestore-integration-test}'
xvfb-run yarn lerna run --concurrency 4 test:ci --scope '@firebase/firestore*'
node scripts/print_test_logs.js
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
Expand All @@ -184,3 +184,38 @@ jobs:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: ./lcov-all.info
continue-on-error: true

test-firestore-integration:
name: Firestore Integration Tests
needs: build
runs-on: ubuntu-latest
steps:
# install Chrome so the correct version of webdriver can be installed by chromedriver when setting up the repo
- name: install Chrome stable
run: |
sudo apt-get update
sudo apt-get install google-chrome-stable
- name: Download build archive
uses: actions/download-artifact@v3
with:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Set up Node (16)
uses: actions/setup-node@v3
with:
node-version: 16.x
- name: Bump Node memory limit
run: echo "NODE_OPTIONS=--max_old_space_size=4096" >> $GITHUB_ENV
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
yarn
- name: Set start timestamp env var
run: echo "FIREBASE_CI_TEST_START_TIME=$(date +%s)" >> $GITHUB_ENV
- name: Run unit tests
run: |
xvfb-run yarn lerna run --concurrency 4 test:ci --scope firebase-firestore-integration-test
node scripts/print_test_logs.js
env:
FIREBASE_TOKEN: ${{ secrets.FIREBASE_CLI_TOKEN }}
2 changes: 1 addition & 1 deletion config/functions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
"description": "Cloud Functions for Firebase",
"dependencies": {
"cors": "2.8.5",
"firebase-admin": "11.6.0",
"firebase-admin": "11.9.0",
"firebase-functions": "3.24.1"
},
"private": true,
Expand Down
2 changes: 1 addition & 1 deletion docs-devsite/messaging_.fcmoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# FcmOptions interface
Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)
Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)<!-- -->.

<b>Signature:</b>

Expand Down
10 changes: 5 additions & 5 deletions docs-devsite/messaging_.gettokenoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# GetTokenOptions interface
Options for [getToken()](./messaging_.md#gettoken)
Options for [getToken()](./messaging_.md#gettoken)<!-- -->.

<b>Signature:</b>

Expand All @@ -22,12 +22,12 @@ export interface GetTokenOptions

| Property | Type | Description |
| --- | --- | --- |
| [serviceWorkerRegistration](./messaging_.gettokenoptions.md#gettokenoptionsserviceworkerregistration) | ServiceWorkerRegistration | The service worker registration for receiving push messaging. If the registration is not provided explicitly, you need to have a <code>firebase-messaging-sw.js</code> at your root location. See [Retrieve the current registration token](https://firebase.google.com/docs/cloud-messaging/js/client#retrieve-the-current-registration-token) for more details. |
| [vapidKey](./messaging_.gettokenoptions.md#gettokenoptionsvapidkey) | string | The public server key provided to push services. It is used to authenticate the push subscribers to receive push messages only from sending servers that hold the corresponding private key. If it is not provided, a default VAPID key is used. Note that some push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended to generate and import a VAPID key for your project with [Configure Web Credentials with FCM](https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_with_fcm)<!-- -->. See [The Web Push Protocol](https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol) for details on web push services. |
| [serviceWorkerRegistration](./messaging_.gettokenoptions.md#gettokenoptionsserviceworkerregistration) | ServiceWorkerRegistration | The service worker registration for receiving push messaging. If the registration is not provided explicitly, you need to have a <code>firebase-messaging-sw.js</code> at your root location. See [Access the registration token](https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token) for more details. |
| [vapidKey](./messaging_.gettokenoptions.md#gettokenoptionsvapidkey) | string | The public server key provided to push services. The key is used to authenticate push subscribers to receive push messages only from sending servers that hold the corresponding private key. If it is not provided, a default VAPID key is used. Note that some push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended to generate and import a VAPID key for your project with [Configure Web Credentials with FCM](https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app)<!-- -->. See [The Web Push Protocol](https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol) for details on web push services. |

## GetTokenOptions.serviceWorkerRegistration

The service worker registration for receiving push messaging. If the registration is not provided explicitly, you need to have a `firebase-messaging-sw.js` at your root location. See [Retrieve the current registration token](https://firebase.google.com/docs/cloud-messaging/js/client#retrieve-the-current-registration-token) for more details.
The service worker registration for receiving push messaging. If the registration is not provided explicitly, you need to have a `firebase-messaging-sw.js` at your root location. See [Access the registration token](https://firebase.google.com/docs/cloud-messaging/js/client#access_the_registration_token) for more details.

<b>Signature:</b>

Expand All @@ -37,7 +37,7 @@ serviceWorkerRegistration?: ServiceWorkerRegistration;

## GetTokenOptions.vapidKey

The public server key provided to push services. It is used to authenticate the push subscribers to receive push messages only from sending servers that hold the corresponding private key. If it is not provided, a default VAPID key is used. Note that some push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended to generate and import a VAPID key for your project with [Configure Web Credentials with FCM](https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_with_fcm)<!-- -->. See [The Web Push Protocol](https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol) for details on web push services.
The public server key provided to push services. The key is used to authenticate push subscribers to receive push messages only from sending servers that hold the corresponding private key. If it is not provided, a default VAPID key is used. Note that some push services (Chrome Push Service) require a non-default VAPID key. Therefore, it is recommended to generate and import a VAPID key for your project with [Configure Web Credentials with FCM](https://firebase.google.com/docs/cloud-messaging/js/client#configure_web_credentials_in_your_app)<!-- -->. See [The Web Push Protocol](https://developers.google.com/web/fundamentals/push-notifications/web-push-protocol) for details on web push services.

<b>Signature:</b>

Expand Down
16 changes: 8 additions & 8 deletions docs-devsite/messaging_.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ https://github.com/firebase/firebase-js-sdk
| [getMessaging(app)](./messaging_.md#getmessaging) | Retrieves a Firebase Cloud Messaging instance. |
| <b>function(messaging...)</b> |
| [deleteToken(messaging)](./messaging_.md#deletetoken) | Deletes the registration token associated with this [Messaging](./messaging_.messaging.md#messaging_interface) instance and unsubscribes the [Messaging](./messaging_.messaging.md#messaging_interface) instance from the push subscription. |
| [getToken(messaging, options)](./messaging_.md#gettoken) | Subscribes the [Messaging](./messaging_.messaging.md#messaging_interface) instance to push notifications. Returns an Firebase Cloud Messaging registration token that can be used to send push messages to that [Messaging](./messaging_.messaging.md#messaging_interface) instance.<!-- -->If a notification permission isn't already granted, this method asks the user for permission. The returned promise rejects if the user does not allow the app to show notifications. |
| [getToken(messaging, options)](./messaging_.md#gettoken) | Subscribes the [Messaging](./messaging_.messaging.md#messaging_interface) instance to push notifications. Returns a Firebase Cloud Messaging registration token that can be used to send push messages to that [Messaging](./messaging_.messaging.md#messaging_interface) instance.<!-- -->If notification permission isn't already granted, this method asks the user for permission. The returned promise rejects if the user does not allow the app to show notifications. |
| [onMessage(messaging, nextOrObserver)](./messaging_.md#onmessage) | When a push message is received and the user is currently on a page for your origin, the message is passed to the page and an <code>onMessage()</code> event is dispatched with the payload of the push message. |
| <b>function()</b> |
| [isSupported()](./messaging_.md#issupported) | Checks if all required APIs exist in the browser. |
Expand All @@ -28,11 +28,11 @@ https://github.com/firebase/firebase-js-sdk

| Interface | Description |
| --- | --- |
| [FcmOptions](./messaging_.fcmoptions.md#fcmoptions_interface) | Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions) |
| [GetTokenOptions](./messaging_.gettokenoptions.md#gettokenoptions_interface) | Options for [getToken()](./messaging_.md#gettoken) |
| [MessagePayload](./messaging_.messagepayload.md#messagepayload_interface) | Message payload that contains the notification payload that is represented with [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) and the data payload that contains an arbitrary number of key-value pairs sent by developers through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification) |
| [FcmOptions](./messaging_.fcmoptions.md#fcmoptions_interface) | Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)<!-- -->. |
| [GetTokenOptions](./messaging_.gettokenoptions.md#gettokenoptions_interface) | Options for [getToken()](./messaging_.md#gettoken)<!-- -->. |
| [MessagePayload](./messaging_.messagepayload.md#messagepayload_interface) | Message payload that contains the notification payload that is represented with [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) and the data payload that contains an arbitrary number of key-value pairs sent by developers through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)<!-- -->. |
| [Messaging](./messaging_.messaging.md#messaging_interface) | Public interface of the Firebase Cloud Messaging SDK. |
| [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) | Display notification details. They are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification) |
| [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) | Display notification details. Details are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)<!-- -->. |

## getMessaging()

Expand Down Expand Up @@ -80,9 +80,9 @@ The promise resolves when the token has been successfully deleted.

## getToken()

Subscribes the [Messaging](./messaging_.messaging.md#messaging_interface) instance to push notifications. Returns an Firebase Cloud Messaging registration token that can be used to send push messages to that [Messaging](./messaging_.messaging.md#messaging_interface) instance.
Subscribes the [Messaging](./messaging_.messaging.md#messaging_interface) instance to push notifications. Returns a Firebase Cloud Messaging registration token that can be used to send push messages to that [Messaging](./messaging_.messaging.md#messaging_interface) instance.

If a notification permission isn't already granted, this method asks the user for permission. The returned promise rejects if the user does not allow the app to show notifications.
If notification permission isn't already granted, this method asks the user for permission. The returned promise rejects if the user does not allow the app to show notifications.

<b>Signature:</b>

Expand All @@ -95,7 +95,7 @@ export declare function getToken(messaging: Messaging, options?: GetTokenOptions
| Parameter | Type | Description |
| --- | --- | --- |
| messaging | [Messaging](./messaging_.messaging.md#messaging_interface) | The [Messaging](./messaging_.messaging.md#messaging_interface) instance. |
| options | [GetTokenOptions](./messaging_.gettokenoptions.md#gettokenoptions_interface) | Provides an optional vapid key and an optinoal service worker registration |
| options | [GetTokenOptions](./messaging_.gettokenoptions.md#gettokenoptions_interface) | Provides an optional vapid key and an optional service worker registration. |

<b>Returns:</b>

Expand Down
14 changes: 7 additions & 7 deletions docs-devsite/messaging_.messagepayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# MessagePayload interface
Message payload that contains the notification payload that is represented with [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) and the data payload that contains an arbitrary number of key-value pairs sent by developers through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)
Message payload that contains the notification payload that is represented with [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) and the data payload that contains an arbitrary number of key-value pairs sent by developers through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)<!-- -->.

<b>Signature:</b>

Expand All @@ -24,10 +24,10 @@ export interface MessagePayload
| --- | --- | --- |
| [collapseKey](./messaging_.messagepayload.md#messagepayloadcollapsekey) | string | The collapse key of the message. See [Non-collapsible and collapsible messages](https://firebase.google.com/docs/cloud-messaging/concept-options#collapsible_and_non-collapsible_messages) |
| [data](./messaging_.messagepayload.md#messagepayloaddata) | { \[key: string\]: string; } | Arbitrary key/value payload. |
| [fcmOptions](./messaging_.messagepayload.md#messagepayloadfcmoptions) | [FcmOptions](./messaging_.fcmoptions.md#fcmoptions_interface) | Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions) |
| [fcmOptions](./messaging_.messagepayload.md#messagepayloadfcmoptions) | [FcmOptions](./messaging_.fcmoptions.md#fcmoptions_interface) | Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)<!-- -->. |
| [from](./messaging_.messagepayload.md#messagepayloadfrom) | string | The sender of this message. |
| [messageId](./messaging_.messagepayload.md#messagepayloadmessageid) | string | The message id of a message. |
| [notification](./messaging_.messagepayload.md#messagepayloadnotification) | [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) | Display notification details. They are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification) |
| [messageId](./messaging_.messagepayload.md#messagepayloadmessageid) | string | The message ID of a message. |
| [notification](./messaging_.messagepayload.md#messagepayloadnotification) | [NotificationPayload](./messaging_.notificationpayload.md#notificationpayload_interface) | Display notification details. Details are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)<!-- -->. |

## MessagePayload.collapseKey

Expand All @@ -53,7 +53,7 @@ data?: {

## MessagePayload.fcmOptions

Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)
Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)<!-- -->.

<b>Signature:</b>

Expand All @@ -73,7 +73,7 @@ from: string;

## MessagePayload.messageId

The message id of a message.
The message ID of a message.

<b>Signature:</b>

Expand All @@ -83,7 +83,7 @@ messageId: string;

## MessagePayload.notification

Display notification details. They are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)
Display notification details. Details are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)<!-- -->.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion docs-devsite/messaging_.notificationpayload.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# NotificationPayload interface
Display notification details. They are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)
Display notification details. Details are sent through the [Send API](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#notification)<!-- -->.

<b>Signature:</b>

Expand Down
2 changes: 1 addition & 1 deletion docs-devsite/messaging_sw.fcmoptions.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ https://github.com/firebase/firebase-js-sdk
{% endcomment %}

# FcmOptions interface
Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)
Options for features provided by the FCM SDK for Web. See [WebpushFcmOptions](https://firebase.google.com/docs/reference/fcm/rest/v1/projects.messages#webpushfcmoptions)<!-- -->.

<b>Signature:</b>

Expand Down
Loading

0 comments on commit cc4a7b9

Please sign in to comment.