Skip to content

Commit 0392a37

Browse files
committed
Merge remote-tracking branch 'origin/master' into UpdateDataTypeFix2
2 parents a93a353 + f5aec7b commit 0392a37

File tree

163 files changed

+4124
-786
lines changed

Some content is hidden

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

163 files changed

+4124
-786
lines changed

.changeset/brave-ducks-relax.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/grumpy-bees-shake.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+
Fixed stack overflow caused by deeply nested server timestamps.

.changeset/olive-cycles-count.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'firebase': minor
3+
'@firebase/firestore': minor
4+
---
5+
6+
Introduces a new LRU garbage document collector for memory cache.

.changeset/shaggy-zebras-leave.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/silent-islands-fix.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/analytics': minor
3+
'firebase': minor
4+
---
5+
6+
Add method `getGoogleAnalyticsClientId()` to retrieve an unique identifier for a web client. This allows users to log purchase and other events from their backends using Google Analytics 4 Measurement Protocol and to have those events be connected to actions taken on the client within their Firebase web app. `getGoogleAnalyticsClientId()` will simplify this event recording process.

.changeset/smart-llamas-compete.md

Lines changed: 0 additions & 6 deletions
This file was deleted.

.changeset/strong-ghosts-compare.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/webchannel-wrapper': patch
3+
---
4+
5+
Make webchannel-wrapper exports Node-ESM-friendly.

.changeset/swift-eels-change.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
---
2+
'@firebase/webchannel-wrapper': minor
3+
'@firebase/firestore': minor
4+
'firebase': minor
5+
---
6+
7+
Implemented an optimization in the local cache synchronization logic that reduces the number of billed document reads when documents were deleted on the server while the client was not actively listening to the query (e.g. while the client was offline).

.changeset/three-months-lie.md

Lines changed: 0 additions & 5 deletions
This file was deleted.

.changeset/wicked-tomatoes-smoke.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"@firebase/app-check": minor
3+
"firebase": minor
4+
---
5+
6+
Add new limited use token method to App Check

common/api-review/analytics.api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -133,6 +133,9 @@ export interface EventParams {
133133
// @public
134134
export function getAnalytics(app?: FirebaseApp): Analytics;
135135

136+
// @public
137+
export function getGoogleAnalyticsClientId(analyticsInstance: Analytics): Promise<string>;
138+
136139
// @public
137140
export interface GtagConfigParams {
138141
// (undocumented)

common/api-review/app-check.api.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,9 @@ export interface CustomProviderOptions {
6060
getToken: () => Promise<AppCheckToken>;
6161
}
6262

63+
// @public
64+
export function getLimitedUseToken(appCheckInstance: AppCheck): Promise<AppCheckTokenResult>;
65+
6366
// @public
6467
export function getToken(appCheckInstance: AppCheck, forceRefresh?: boolean): Promise<AppCheckTokenResult>;
6568

common/api-review/firestore.api.md

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -331,14 +331,42 @@ export interface LoadBundleTaskProgress {
331331

332332
export { LogLevel }
333333

334+
// @public
335+
export interface MemoryCacheSettings {
336+
garbageCollector?: MemoryGarbageCollector;
337+
}
338+
339+
// @public
340+
export interface MemoryEagerGarbageCollector {
341+
// (undocumented)
342+
kind: 'memoryEager';
343+
}
344+
345+
// @public
346+
export function memoryEagerGarbageCollector(): MemoryEagerGarbageCollector;
347+
348+
// @public
349+
export type MemoryGarbageCollector = MemoryEagerGarbageCollector | MemoryLruGarbageCollector;
350+
334351
// @public
335352
export interface MemoryLocalCache {
336353
// (undocumented)
337354
kind: 'memory';
338355
}
339356

340357
// @public
341-
export function memoryLocalCache(): MemoryLocalCache;
358+
export function memoryLocalCache(settings?: MemoryCacheSettings): MemoryLocalCache;
359+
360+
// @public
361+
export interface MemoryLruGarbageCollector {
362+
// (undocumented)
363+
kind: 'memoryLru';
364+
}
365+
366+
// @public
367+
export function memoryLruGarbageCollector(settings?: {
368+
cacheSizeBytes?: number;
369+
}): MemoryLruGarbageCollector;
342370

343371
// @public
344372
export function namedQuery(firestore: Firestore, name: string): Promise<Query | null>;

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.5.0",
6+
"firebase-admin": "11.6.0",
77
"firebase-functions": "3.24.1"
88
},
99
"private": true,

docs-devsite/analytics.md

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ Firebase Analytics
2020
| [getAnalytics(app)](./analytics.md#getanalytics) | Returns an [Analytics](./analytics.analytics.md#analytics_interface) instance for the given app. |
2121
| [initializeAnalytics(app, options)](./analytics.md#initializeanalytics) | Returns an [Analytics](./analytics.analytics.md#analytics_interface) instance for the given app. |
2222
| <b>function(analyticsInstance...)</b> |
23+
| [getGoogleAnalyticsClientId(analyticsInstance)](./analytics.md#getgoogleanalyticsclientid) | Retrieves a unique Google Analytics identifier for the web client. See [client\_id](https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id)<!-- -->. |
2324
| [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.md#logevent) | Sends a Google Analytics event with given <code>eventParams</code>. This method automatically associates this logged event with this Firebase web app instance on this device.<!-- -->List of recommended event parameters can be found in [the GA4 reference documentation](https://developers.google.com/gtagjs/reference/ga4-events)<!-- -->. |
2425
| [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.md#logevent) | Sends a Google Analytics event with given <code>eventParams</code>. This method automatically associates this logged event with this Firebase web app instance on this device.<!-- -->List of recommended event parameters can be found in [the GA4 reference documentation](https://developers.google.com/gtagjs/reference/ga4-events)<!-- -->. |
2526
| [logEvent(analyticsInstance, eventName, eventParams, options)](./analytics.md#logevent) | Sends a Google Analytics event with given <code>eventParams</code>. This method automatically associates this logged event with this Firebase web app instance on this device.<!-- -->See [Track Screenviews](https://firebase.google.com/docs/analytics/screenviews)<!-- -->. |
@@ -121,6 +122,26 @@ export declare function initializeAnalytics(app: FirebaseApp, options?: Analytic
121122

122123
[Analytics](./analytics.analytics.md#analytics_interface)
123124

125+
## getGoogleAnalyticsClientId()
126+
127+
Retrieves a unique Google Analytics identifier for the web client. See [client\_id](https://developers.google.com/analytics/devguides/collection/ga4/reference/config#client_id)<!-- -->.
128+
129+
<b>Signature:</b>
130+
131+
```typescript
132+
export declare function getGoogleAnalyticsClientId(analyticsInstance: Analytics): Promise<string>;
133+
```
134+
135+
### Parameters
136+
137+
| Parameter | Type | Description |
138+
| --- | --- | --- |
139+
| analyticsInstance | [Analytics](./analytics.analytics.md#analytics_interface) | |
140+
141+
<b>Returns:</b>
142+
143+
Promise&lt;string&gt;
144+
124145
## logEvent()
125146

126147
Sends a Google Analytics event with given `eventParams`<!-- -->. This method automatically associates this logged event with this Firebase web app instance on this device.

docs-devsite/app-check.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ Firebase App Check
1919
| <b>function(app...)</b> |
2020
| [initializeAppCheck(app, options)](./app-check.md#initializeappcheck) | Activate App Check for the given app. Can be called only once per app. |
2121
| <b>function(appCheckInstance...)</b> |
22+
| [getLimitedUseToken(appCheckInstance)](./app-check.md#getlimitedusetoken) | Requests a Firebase App Check token. This method should be used only if you need to authorize requests to a non-Firebase backend.<!-- -->Returns limited-use tokens that are intended for use with your non-Firebase backend endpoints that are protected with <a href="https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection"> Replay Protection</a>. This method does not affect the token generation behavior of the \#getAppCheckToken() method. |
2223
| [getToken(appCheckInstance, forceRefresh)](./app-check.md#gettoken) | Get the current App Check token. Attaches to the most recent in-flight request if one is present. Returns null if no token is present and no token requests are in-flight. |
2324
| [onTokenChanged(appCheckInstance, observer)](./app-check.md#ontokenchanged) | Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes. |
2425
| [onTokenChanged(appCheckInstance, onNext, onError, onCompletion)](./app-check.md#ontokenchanged) | Registers a listener to changes in the token state. There can be more than one listener registered at the same time for one or more App Check instances. The listeners call back on the UI thread whenever the current token associated with this App Check instance changes. |
@@ -69,6 +70,30 @@ export declare function initializeAppCheck(app: FirebaseApp | undefined, options
6970

7071
[AppCheck](./app-check.appcheck.md#appcheck_interface)
7172

73+
## getLimitedUseToken()
74+
75+
Requests a Firebase App Check token. This method should be used only if you need to authorize requests to a non-Firebase backend.
76+
77+
Returns limited-use tokens that are intended for use with your non-Firebase backend endpoints that are protected with <a href="https://firebase.google.com/docs/app-check/custom-resource-backend#replay-protection"> Replay Protection</a>. This method does not affect the token generation behavior of the \#getAppCheckToken() method.
78+
79+
<b>Signature:</b>
80+
81+
```typescript
82+
export declare function getLimitedUseToken(appCheckInstance: AppCheck): Promise<AppCheckTokenResult>;
83+
```
84+
85+
### Parameters
86+
87+
| Parameter | Type | Description |
88+
| --- | --- | --- |
89+
| appCheckInstance | [AppCheck](./app-check.appcheck.md#appcheck_interface) | The App Check service instance. |
90+
91+
<b>Returns:</b>
92+
93+
Promise&lt;[AppCheckTokenResult](./app-check.appchecktokenresult.md#appchecktokenresult_interface)<!-- -->&gt;
94+
95+
The limited use token.
96+
7297
## getToken()
7398

7499
Get the current App Check token. Attaches to the most recent in-flight request if one is present. Returns null if no token is present and no token requests are in-flight.

0 commit comments

Comments
 (0)