Skip to content

Commit 8a0fef2

Browse files
Merge main into release
2 parents d094e60 + 313faf6 commit 8a0fef2

File tree

211 files changed

+8711
-9942
lines changed

Some content is hidden

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

211 files changed

+8711
-9942
lines changed

.changeset/chilled-clocks-remember.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@firebase/database": patch
3+
'firebase': patch
4+
---
5+
6+
Fix a potential for a negative offset when calculating last reconnect times. This could cause lengthy reconnect delays in some scenarios. Fixes #8718.

.changeset/config.json

-1
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,6 @@
1010
"baseBranch": "main",
1111
"updateInternalDependencies": "patch",
1212
"ignore": [
13-
"firebase-namespace-integration-test",
1413
"firebase-firestore-integration-test",
1514
"firebase-messaging-integration-test",
1615
"firebase-compat-interop-test",

.changeset/kind-dingos-work.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/performance': minor
3+
'firebase': minor
4+
---
5+
6+
Collect web vital metrics (INP,CLS,LCP) as part of page load event.

.changeset/kind-pets-sin.md

+15
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
---
2+
'@firebase/app': minor
3+
'firebase': minor
4+
'@firebase/data-connect': patch
5+
'@firebase/firestore': patch
6+
'@firebase/functions': patch
7+
'@firebase/database': patch
8+
'@firebase/vertexai': patch
9+
'@firebase/storage': patch
10+
'@firebase/auth': patch
11+
---
12+
13+
`FirebaseServerApp` can now be initalized with an App Check token instead of invoking the App Check
14+
`getToken` method. This should unblock the use of App Check enforced products in SSR environments
15+
where the App Check SDK cannot be initialized.

.changeset/little-news-sniff.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/data-connect': minor
3+
'firebase': minor
4+
---
5+
6+
Add custom request headers based on the type of SDK (JS/TS, React, Angular, etc) that's invoking Data Connect requests. This will help us understand how users interact with Data Connect when using the Web SDK.

.changeset/polite-lies-vanish.md

+7
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'firebase': minor
3+
'@firebase/auth-types': minor
4+
'@firebase/auth': minor
5+
---
6+
7+
Added `ActionCodeSettings.linkDomain` to customize the Firebase Hosting link domain that is used in mobile out-of-band email action flows. Also, deprecated `ActionCodeSettings.dynamicLinkDomain`.

.changeset/spotty-trainers-lay.md

+6
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/firestore': patch
3+
'firebase': patch
4+
---
5+
6+
Fixed a server and sdk mismatch in unicode string sorting.

.changeset/yellow-rice-kneel.md

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/app': patch
3+
---
4+
5+
Discard the earliest heartbeat once a limit of 30 heartbeats in storage has been hit.

.github/CODEOWNERS

+3-3
Original file line numberDiff line numberDiff line change
@@ -51,9 +51,9 @@ packages/installations-compat @avolkovi @yoyomyo @firebase/jssdk-global-approver
5151
packages/installations-types @avolkovi @yoyomyo @firebase/jssdk-global-approvers
5252

5353
# Performance Code
54-
packages/performance @jposuna @firebase/jssdk-global-approvers
55-
packages/performance-compat @jposuna @firebase/jssdk-global-approvers
56-
packages/performance-types @jposuna @firebase/jssdk-global-approvers
54+
packages/performance @visumickey @firebase/jssdk-global-approvers
55+
packages/performance-compat @visumickey @firebase/jssdk-global-approvers
56+
packages/performance-types @visumickey @firebase/jssdk-global-approvers
5757

5858
# Analytics Code
5959
packages/analytics @hsubox76 @firebase/jssdk-global-approvers

.github/workflows/check-vertexai-responses.yml

+41-32
Original file line numberDiff line numberDiff line change
@@ -19,36 +19,45 @@ on: pull_request
1919
jobs:
2020
check-version:
2121
runs-on: ubuntu-latest
22+
# Allow GITHUB_TOKEN to have write permissions
23+
permissions:
24+
contents: write
25+
pull-requests: write
2226
steps:
23-
- uses: actions/checkout@v4
24-
- name: Clone mock responses
25-
run: scripts/update_vertexai_responses.sh
26-
- name: Find cloned and latest versions
27-
run: |
28-
CLONED=$(git describe --tags)
29-
LATEST=$(git tag --sort=v:refname | tail -n1)
30-
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
31-
echo "latest_tag=$LATEST" >> $GITHUB_ENV
32-
working-directory: packages/vertexai/test-utils/vertexai-sdk-test-data
33-
- name: Find comment from previous run if exists
34-
uses: peter-evans/find-comment@3eae4d37986fb5a8592848f6a574fdf654e61f9e
35-
id: fc
36-
with:
37-
issue-number: ${{github.event.number}}
38-
body-includes: Vertex AI Mock Responses Check
39-
- name: Comment on PR if newer version is available
40-
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
41-
uses: peter-evans/create-or-update-comment@71345be0265236311c031f5c7866368bd1eff043
42-
with:
43-
issue-number: ${{github.event.number}}
44-
body: >
45-
### Vertex AI Mock Responses Check :warning:
46-
47-
A newer major version of the mock responses for Vertex AI unit tests is available.
48-
[update_vertexai_responses.sh](https://github.com/firebase/firebase-js-sdk/blob/main/scripts/update_vertexai_responses.sh)
49-
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
50-
- name: Delete comment when version gets updated
51-
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}
52-
uses: detomarco/delete-comment@850734dd44d8b15fef55b45252613b903ceb06f0
53-
with:
54-
comment-id: ${{ steps.fc.outputs.comment-id }}
27+
- uses: actions/checkout@v4
28+
- name: Clone mock responses
29+
run: scripts/update_vertexai_responses.sh
30+
- name: Find cloned and latest versions
31+
run: |
32+
CLONED=$(git describe --tags)
33+
LATEST=$(git tag --sort=v:refname | tail -n1)
34+
echo "cloned_tag=$CLONED" >> $GITHUB_ENV
35+
echo "latest_tag=$LATEST" >> $GITHUB_ENV
36+
working-directory: packages/vertexai/test-utils/vertexai-sdk-test-data
37+
- name: Find comment from previous run if exists
38+
uses: peter-evans/find-comment@v3
39+
id: fc
40+
with:
41+
issue-number: ${{github.event.number}}
42+
body-includes: Vertex AI Mock Responses Check
43+
- name: Comment on PR if newer version is available
44+
if: ${{env.cloned_tag != env.latest_tag && !steps.fc.outputs.comment-id}}
45+
uses: peter-evans/create-or-update-comment@v4
46+
with:
47+
issue-number: ${{github.event.number}}
48+
body: >
49+
### Vertex AI Mock Responses Check :warning:
50+
51+
A newer major version of the mock responses for Vertex AI unit tests is available.
52+
[update_vertexai_responses.sh](https://github.com/firebase/firebase-js-sdk/blob/main/scripts/update_vertexai_responses.sh)
53+
should be updated to clone the latest version of the responses: `${{env.latest_tag}}`
54+
- name: Delete comment when version gets updated
55+
if: ${{env.cloned_tag == env.latest_tag && steps.fc.outputs.comment-id}}
56+
uses: actions/github-script@v7
57+
with:
58+
script: |
59+
github.rest.issues.deleteComment({
60+
owner: context.repo.owner,
61+
repo: context.repo.repo,
62+
comment_id: ${{ steps.fc.outputs.comment-id }},
63+
})

.github/workflows/test-all.yml

+3-7
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ env:
2323
# the behavior to use the new URLs.
2424
CHROMEDRIVER_CDNURL: https://googlechromelabs.github.io/
2525
CHROMEDRIVER_CDNBINARIESURL: https://storage.googleapis.com/chrome-for-testing-public
26-
CHROME_VALIDATED_VERSION: linux-120.0.6099.71
27-
CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
26+
CHROME_VALIDATED_VERSION: linux-132.0.6834.110
27+
CHROME_VERSION_MISMATCH_MESSAGE: "The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass, or rollback the installed Chrome version if tests fail."
2828
artifactRetentionDays: 14
2929
# Bump Node memory limit
3030
NODE_OPTIONS: "--max_old_space_size=4096"
@@ -117,13 +117,9 @@ jobs:
117117
npx @puppeteer/browsers install chrome@stable
118118
chromeVersionString=$(ls chrome)
119119
if [ "$CHROME_VALIDATED_VERSION" != "$chromeVersionString" ]; then
120-
echo "::warning ::The Chrome version doesn't match the previously validated version. Consider updating CHROME_VALIDATED_VERSION in the GitHub workflow if tests pass."
120+
echo "::warning ::${CHROME_VERSION_MISMATCH_MESSAGE}"
121121
echo "::warning ::Previously validated version: ${CHROME_VALIDATED_VERSION} vs. Installed version: $chromeVersionString"
122-
echo "CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE" >> "$GITHUB_ENV"
123122
fi
124-
- name: Test Evn TEMP
125-
run: |
126-
echo $CHROME_VERSION_NOTES=$CHROME_VERSION_MISMATCH_MESSAGE
127123
- name: Download build archive
128124
uses: actions/download-artifact@v4
129125
with:

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

+1-1
Original file line numberDiff line numberDiff line change
@@ -106,7 +106,7 @@ jobs:
106106
with:
107107
fetch-depth: 0
108108
- name: Set up Node (20)
109-
uses: actions/setup-node@v3
109+
uses: actions/setup-node@v4
110110
with:
111111
node-version: 22.10.0
112112
- name: Test setup and yarn install

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

+4-4
Original file line numberDiff line numberDiff line change
@@ -210,7 +210,7 @@ jobs:
210210
- name: Unzip build artifact
211211
run: tar xf build.tar.gz
212212
- name: Set up Node (20)
213-
uses: actions/setup-node@v3
213+
uses: actions/setup-node@v4
214214
with:
215215
node-version: 22.10.0
216216
- name: Test setup and yarn install
@@ -228,11 +228,11 @@ jobs:
228228
if: ${{ needs.build.outputs.changed == 'true'}}
229229
steps:
230230
- name: Set up Node (20)
231-
uses: actions/setup-node@v3
231+
uses: actions/setup-node@v4
232232
with:
233233
node-version: 22.10.0
234234
- name: Download build archive
235-
uses: actions/download-artifact@v3
235+
uses: actions/download-artifact@v4
236236
with:
237237
name: build.tar.gz
238238
- name: Unzip build artifact
@@ -259,7 +259,7 @@ jobs:
259259
if: ${{ needs.build.outputs.changed == 'true'}}
260260
steps:
261261
- name: Download build archive
262-
uses: actions/download-artifact@v3
262+
uses: actions/download-artifact@v4
263263
with:
264264
name: build.tar.gz
265265
- name: Unzip build artifact

.github/workflows/test-changed.yml

+1-1
Original file line numberDiff line numberDiff line change
@@ -85,7 +85,7 @@ jobs:
8585
with:
8686
fetch-depth: 0
8787
- name: Set up Node (20)
88-
uses: actions/setup-node@v3
88+
uses: actions/setup-node@v4
8989
with:
9090
node-version: 22.10.0
9191
- name: Test setup and yarn install

.github/workflows/test-firebase-integration.yml

-49
This file was deleted.

common/api-review/app.api.md

+2-1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ export interface FirebaseServerApp extends FirebaseApp {
7979

8080
// @public
8181
export interface FirebaseServerAppSettings extends Omit<FirebaseAppSettings, 'name'> {
82+
appCheckToken?: string;
8283
authIdToken?: string;
8384
releaseOnDeref?: object;
8485
}
@@ -115,7 +116,7 @@ export function initializeServerApp(options: FirebaseOptions | FirebaseApp, conf
115116
export function _isFirebaseApp(obj: FirebaseApp | FirebaseOptions): obj is FirebaseApp;
116117

117118
// @internal (undocumented)
118-
export function _isFirebaseServerApp(obj: FirebaseApp | FirebaseServerApp): obj is FirebaseServerApp;
119+
export function _isFirebaseServerApp(obj: FirebaseApp | FirebaseServerApp | null | undefined): obj is FirebaseServerApp;
119120

120121
// @public
121122
export function onLog(logCallback: LogCallback | null, options?: LogOptions): void;

common/api-review/auth.api.md

+3
Original file line numberDiff line numberDiff line change
@@ -40,11 +40,13 @@ export interface ActionCodeSettings {
4040
minimumVersion?: string;
4141
packageName: string;
4242
};
43+
// @deprecated
4344
dynamicLinkDomain?: string;
4445
handleCodeInApp?: boolean;
4546
iOS?: {
4647
bundleId: string;
4748
};
49+
linkDomain?: string;
4850
url: string;
4951
}
5052

@@ -236,6 +238,7 @@ export const AuthErrorCodes: {
236238
readonly MISSING_RECAPTCHA_VERSION: "auth/missing-recaptcha-version";
237239
readonly INVALID_RECAPTCHA_VERSION: "auth/invalid-recaptcha-version";
238240
readonly INVALID_REQ_TYPE: "auth/invalid-req-type";
241+
readonly INVALID_HOSTING_LINK_DOMAIN: "auth/invalid-hosting-link-domain";
239242
};
240243

241244
// @public

common/api-review/data-connect.api.md

+13
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,19 @@ import { FirebaseError } from '@firebase/util';
1111
import { LogLevelString } from '@firebase/logger';
1212
import { Provider } from '@firebase/component';
1313

14+
// @public
15+
export type CallerSdkType = 'Base' | 'Generated' | 'TanstackReactCore' | 'GeneratedReact' | 'TanstackAngularCore' | 'GeneratedAngular';
16+
17+
// @public (undocumented)
18+
export const CallerSdkTypeEnum: {
19+
readonly Base: "Base";
20+
readonly Generated: "Generated";
21+
readonly TanstackReactCore: "TanstackReactCore";
22+
readonly GeneratedReact: "GeneratedReact";
23+
readonly TanstackAngularCore: "TanstackAngularCore";
24+
readonly GeneratedAngular: "GeneratedAngular";
25+
};
26+
1427
// @public
1528
export function connectDataConnectEmulator(dc: DataConnect, host: string, port?: number, sslEnabled?: boolean): void;
1629

config/api-extractor.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@
100100
*
101101
* DEFAULT VALUE: false
102102
*/
103-
// "skipLibCheck": true,
103+
"skipLibCheck": true,
104104
},
105105

106106
/**

config/karma.base.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,8 @@ const config = {
5454
// Doing 65 seconds to allow for the 20 second firestore tests
5555
browserNoActivityTimeout: 65000,
5656

57-
// preprocess matching files before serving them to the browser
58-
// available preprocessors:
57+
// Preprocess matching files before serving them to the browser.
58+
// Available preprocessors:
5959
// https://npmjs.org/browse/keyword/karma-preprocessor
6060
preprocessors: {
6161
'test/**/*.ts': ['webpack', 'sourcemap'],

docs-devsite/app.firebaseserverappsettings.md

+17-2
Original file line numberDiff line numberDiff line change
@@ -23,16 +23,31 @@ export interface FirebaseServerAppSettings extends Omit<FirebaseAppSettings, 'na
2323
2424
| Property | Type | Description |
2525
| --- | --- | --- |
26-
| [authIdToken](./app.firebaseserverappsettings.md#firebaseserverappsettingsauthidtoken) | string | An optional Auth ID token used to resume a signed in user session from a client runtime environment.<!-- -->Invoking <code>getAuth</code> with a <code>FirebaseServerApp</code> configured with a validated <code>authIdToken</code> causes an automatic attempt to sign in the user that the <code>authIdToken</code> represents. The token needs to have been recently minted for this operation to succeed.<!-- -->If the token fails local verification, or if the Auth service has failed to validate it when the Auth SDK is initialized, then a warning is logged to the console and the Auth SDK will not sign in a user on initialization.<!-- -->If a user is successfully signed in, then the Auth instance's <code>onAuthStateChanged</code> callback is invoked with the <code>User</code> object as per standard Auth flows. However, <code>User</code> objects created via an <code>authIdToken</code> do not have a refresh token. Attempted <code>refreshToken</code> operations fail. |
26+
| [appCheckToken](./app.firebaseserverappsettings.md#firebaseserverappsettingsappchecktoken) | string | An optional App Check token. If provided, the Firebase SDKs that use App Check will utilize this App Check token in place of requiring an instance of App Check to be initialized.<!-- -->If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of the <code>FirebaseServerApp</code> instance. |
27+
| [authIdToken](./app.firebaseserverappsettings.md#firebaseserverappsettingsauthidtoken) | string | An optional Auth ID token used to resume a signed in user session from a client runtime environment.<!-- -->Invoking <code>getAuth</code> with a <code>FirebaseServerApp</code> configured with a validated <code>authIdToken</code> causes an automatic attempt to sign in the user that the <code>authIdToken</code> represents. The token needs to have been recently minted for this operation to succeed.<!-- -->If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of the <code>FirebaseServerApp</code> instance.<!-- -->If the Auth service has failed to validate the token when the Auth SDK is initialized, then an warning is logged to the console and the Auth SDK will not sign in a user on initialization.<!-- -->If a user is successfully signed in, then the Auth instance's <code>onAuthStateChanged</code> callback is invoked with the <code>User</code> object as per standard Auth flows. However, <code>User</code> objects created via an <code>authIdToken</code> do not have a refresh token. Attempted <code>refreshToken</code> operations fail. |
2728
| [releaseOnDeref](./app.firebaseserverappsettings.md#firebaseserverappsettingsreleaseonderef) | object | An optional object. If provided, the Firebase SDK uses a <code>FinalizationRegistry</code> object to monitor the garbage collection status of the provided object. The Firebase SDK releases its reference on the <code>FirebaseServerApp</code> instance when the provided <code>releaseOnDeref</code> object is garbage collected.<!-- -->You can use this field to reduce memory management overhead for your application. If provided, an app running in a SSR pass does not need to perform <code>FirebaseServerApp</code> cleanup, so long as the reference object is deleted (by falling out of SSR scope, for instance.)<!-- -->If an object is not provided then the application must clean up the <code>FirebaseServerApp</code> instance by invoking <code>deleteApp</code>.<!-- -->If the application provides an object in this parameter, but the application is executed in a JavaScript engine that predates the support of <code>FinalizationRegistry</code> (introduced in node v14.6.0, for instance), then an error is thrown at <code>FirebaseServerApp</code> initialization. |
2829
30+
## FirebaseServerAppSettings.appCheckToken
31+
32+
An optional App Check token. If provided, the Firebase SDKs that use App Check will utilize this App Check token in place of requiring an instance of App Check to be initialized.
33+
34+
If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of the `FirebaseServerApp` instance.
35+
36+
<b>Signature:</b>
37+
38+
```typescript
39+
appCheckToken?: string;
40+
```
41+
2942
## FirebaseServerAppSettings.authIdToken
3043
3144
An optional Auth ID token used to resume a signed in user session from a client runtime environment.
3245
3346
Invoking `getAuth` with a `FirebaseServerApp` configured with a validated `authIdToken` causes an automatic attempt to sign in the user that the `authIdToken` represents. The token needs to have been recently minted for this operation to succeed.
3447
35-
If the token fails local verification, or if the Auth service has failed to validate it when the Auth SDK is initialized, then a warning is logged to the console and the Auth SDK will not sign in a user on initialization.
48+
If the token fails local verification due to expiration or parsing errors, then a console error is logged at the time of initialization of the `FirebaseServerApp` instance.
49+
50+
If the Auth service has failed to validate the token when the Auth SDK is initialized, then an warning is logged to the console and the Auth SDK will not sign in a user on initialization.
3651
3752
If a user is successfully signed in, then the Auth instance's `onAuthStateChanged` callback is invoked with the `User` object as per standard Auth flows. However, `User` objects created via an `authIdToken` do not have a refresh token. Attempted `refreshToken` operations fail.
3853

0 commit comments

Comments
 (0)