Skip to content

Commit 6d4e08a

Browse files
Merge master into release
2 parents 7846076 + 807f06a commit 6d4e08a

File tree

25 files changed

+9227
-227
lines changed

25 files changed

+9227
-227
lines changed

.changeset/great-houses-trade.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/storage": patch
3+
---
4+
5+
Cleared retry timeouts when uploads are paused/canceled

.changeset/grumpy-suits-pump.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/util': patch
3+
---
4+
5+
Catch errors when the SDK checks for `__FIREBASE_DEFAULTS__` and do not block other app functionality.

.changeset/moody-icons-repeat.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/analytics': patch
3+
---
4+
5+
Correct `id` type in `setUserId`

common/api-review/analytics.api.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -421,7 +421,7 @@ export interface SettingsOptions {
421421
}
422422

423423
// @public
424-
export function setUserId(analyticsInstance: Analytics, id: string, options?: AnalyticsCallOptions): void;
424+
export function setUserId(analyticsInstance: Analytics, id: string | null, options?: AnalyticsCallOptions): void;
425425

426426
// @public
427427
export function setUserProperties(analyticsInstance: Analytics, properties: CustomParams, options?: AnalyticsCallOptions): void;

e2e/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,8 +33,8 @@
3333
"karma-typescript-es6-transform": "5.5.3",
3434
"mocha": "9.2.2",
3535
"typescript": "4.3.4",
36-
"webpack": "5.72.1",
37-
"webpack-cli": "4.9.2",
38-
"webpack-dev-server": "4.9.0"
36+
"webpack": "5.74.0",
37+
"webpack-cli": "4.10.0",
38+
"webpack-dev-server": "4.10.0"
3939
}
4040
}

package.json

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -67,9 +67,8 @@
6767
"@babel/preset-env": "7.17.10",
6868
"@babel/register": "7.17.7",
6969
"@babel/preset-typescript": "7.16.7",
70-
"babel-plugin-transform-import-meta": "2.1.1",
71-
"@changesets/changelog-github": "0.4.4",
72-
"@changesets/cli": "2.22.0",
70+
"@changesets/changelog-github": "0.4.7",
71+
"@changesets/cli": "2.25.0",
7372
"@types/chai": "4.3.1",
7473
"@types/chai-as-promised": "7.1.5",
7574
"@types/child-process-promise": "2.2.2",
@@ -108,8 +107,8 @@
108107
"find-free-port": "2.0.0",
109108
"firebase-functions": "3.22.0",
110109
"firebase-tools": "11.2.2",
111-
"glob": "7.2.0",
112-
"http-server": "14.1.0",
110+
"glob": "7.2.3",
111+
"http-server": "14.1.1",
113112
"indexeddbshim": "8.0.0",
114113
"inquirer": "8.2.4",
115114
"istanbul-instrumenter-loader": "3.0.1",

packages/analytics/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ export function setCurrentScreen(
177177
*/
178178
export function setUserId(
179179
analyticsInstance: Analytics,
180-
id: string,
180+
id: string | null,
181181
options?: AnalyticsCallOptions
182182
): void {
183183
analyticsInstance = getModularInstance(analyticsInstance);

packages/analytics/src/functions.test.ts

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,6 +116,18 @@ describe('FirebaseAnalytics methods', () => {
116116
});
117117
});
118118

119+
it('setUserId() with null (user) id calls gtag correctly (instance)', async () => {
120+
await setUserId(gtagStub, fakeInitializationPromise, null);
121+
expect(gtagStub).to.have.been.calledWith(
122+
GtagCommand.CONFIG,
123+
fakeMeasurementId,
124+
{
125+
'user_id': null,
126+
update: true
127+
}
128+
);
129+
});
130+
119131
it('setUserId() calls gtag correctly (instance)', async () => {
120132
await setUserId(gtagStub, fakeInitializationPromise, 'user123');
121133
expect(gtagStub).to.have.been.calledWith(
@@ -137,6 +149,15 @@ describe('FirebaseAnalytics methods', () => {
137149
});
138150
});
139151

152+
it('setUserId() with null (user) id calls gtag correctly (global)', async () => {
153+
await setUserId(gtagStub, fakeInitializationPromise, null, {
154+
global: true
155+
});
156+
expect(gtagStub).to.be.calledWith(GtagCommand.SET, {
157+
'user_id': null
158+
});
159+
});
160+
140161
it('setUserProperties() calls gtag correctly (instance)', async () => {
141162
await setUserProperties(gtagStub, fakeInitializationPromise, {
142163
'currency': 'USD',

packages/database/src/core/SyncTree.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,10 @@ export interface ListenProvider {
104104
*/
105105
let syncTreeNextQueryTag_ = 1;
106106

107+
export function resetSyncTreeTag() {
108+
syncTreeNextQueryTag_ = 1;
109+
}
110+
107111
/**
108112
* SyncTree is the central class for managing event callback registration, data caching, views
109113
* (query processing), and event generation. There are typically two SyncTree instances for

0 commit comments

Comments
 (0)