Skip to content

Commit 8884984

Browse files
committed
Merge branch 'master' into fei-typename-database
2 parents bac86bf + d56ab5c commit 8884984

File tree

113 files changed

+4082
-4978
lines changed

Some content is hidden

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

113 files changed

+4082
-4978
lines changed

.changeset/curly-shrimps-wait.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/storage': minor
3+
'firebase': minor
4+
---
5+
6+
Add NodeJS support to Cloud Storage for Firebase. This release changes the `main` field in package.json to point to a Node specific build. If you are building a bundle for borwser usage, please make sure that your bundler uses the `browser` field (the default).

.changeset/nasty-hats-hope.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/analytics-types': minor
3+
'firebase': minor
4+
---
5+
6+
Add `firebase_screen` and `firebase_screen_class` to `logEvent()` overload for `screen_view` events.

.changeset/nine-needles-compare.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+
The SDK no longer accesses IndexedDB during a page unload event on Safari 14. This aims to reduce the occurrence of an IndexedDB bug in Safari (https://bugs.webkit.org/show_bug.cgi?id=226547).

.changeset/silent-seals-approve.md

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

.changeset/thirty-suits-switch.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
"firebase": patch
3+
"@firebase/firestore": patch
4+
---
5+
6+
Fixed an issue that prevented Timestamps from being used via `update()` when connected to the Emulator

.changeset/wet-pets-travel.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/database': patch
3+
---
4+
5+
Fix sending of auth tokens on node.

.github/CODEOWNERS

Lines changed: 3 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,6 @@
1515
#
1616
# - @Feiyang1
1717
# - @hiranya911
18-
# - @bojeil-google
19-
# - @depoll
2018
# - @hsubox76
2119

2220

@@ -90,13 +88,13 @@ packages-exp/auth-exp @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-appro
9088
packages-exp/auth-compat-exp @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
9189

9290
# Installations-Exp Code
93-
packages/installations-exp @andirayo @ChaoqunCHEN @firebase/jssdk-global-approvers
94-
packages/installations-types-exp @andirayo @ChaoqunCHEN @firebase/jssdk-global-approvers
91+
packages/installations-exp @avolkovi @yoyomyo @firebase/jssdk-global-approvers
92+
packages/installations-types-exp @avolkovi @yoyomyo @firebase/jssdk-global-approvers
9593

9694
# Perf-Exp Code
9795
packages/performance-exp @alikn @zijianjoy @firebase/jssdk-global-approvers
9896
packages/performance-types-exp @alikn @zijianjoy @firebase/jssdk-global-approvers
9997

10098
# RC-Exp Code
10199
packages/remote-config-exp @erikeldridge @firebase/jssdk-global-approvers
102-
packages/remote-config-compat @erikeldridge @firebase/jssdk-global-approvers
100+
packages/remote-config-compat @erikeldridge @firebase/jssdk-global-approvers

.github/workflows/label-doc-changes.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,4 +33,4 @@ jobs:
3333
if: ${{steps.check-doc-changes.outputs.DOC_CHANGED == 'true'}}
3434
with:
3535
labels: doc-changes
36-
github_token: ${{ secrets.GITHUB_TOKEN }}
36+
github_token: ${{ secrets.OSS_BOT_GITHUB_TOKEN }}

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -143,7 +143,7 @@ an individual package directory.
143143
The Firebase JS SDK is built with a series of individual packages that are all
144144
contained in this repository. Development is coordinated via [yarn
145145
workspaces](https://yarnpkg.com/blog/2017/08/02/introducing-workspaces/) and
146-
[Lerna](https://lernajs.io/) (a monorepo management tool).
146+
[Lerna](https://lerna.js.org/) (a monorepo management tool).
147147

148148
Each package in the `packages` directory, constitute a piece of our
149149
implementation. The SDK is built via a combination of all of these packages

common/api-review/analytics-exp.api.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -74,6 +74,8 @@ export interface EventParams {
7474
event_label?: string;
7575
// (undocumented)
7676
fatal?: boolean;
77+
firebase_screen?: string;
78+
firebase_screen_class?: string;
7779
// (undocumented)
7880
item_list_id?: string;
7981
// (undocumented)
@@ -295,6 +297,8 @@ export function logEvent(analyticsInstance: Analytics, eventName: 'purchase' | '
295297
export function logEvent(analyticsInstance: Analytics, eventName: 'screen_view', eventParams?: {
296298
app_name: string;
297299
screen_name: EventParams['screen_name'];
300+
firebase_screen: EventParams['firebase_screen'];
301+
firebase_screen_class: EventParams['firebase_screen_class'];
298302
app_id?: string;
299303
app_version?: string;
300304
app_installer_id?: string;

common/api-review/auth-exp.api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -173,6 +173,11 @@ export interface ConfirmationResult {
173173
// @public
174174
export function confirmPasswordReset(auth: Auth, oobCode: string, newPassword: string): Promise<void>;
175175

176+
// @public
177+
export function connectAuthEmulator(auth: Auth, url: string, options?: {
178+
disableWarnings: boolean;
179+
}): void;
180+
176181
// @public
177182
export function createUserWithEmailAndPassword(auth: Auth, email: string, password: string): Promise<UserCredential>;
178183

@@ -644,11 +649,6 @@ export function updateProfile(user: User, { displayName, photoURL: photoUrl }: {
644649
photoURL?: string | null;
645650
}): Promise<void>;
646651

647-
// @public
648-
export function useAuthEmulator(auth: Auth, url: string, options?: {
649-
disableWarnings: boolean;
650-
}): void;
651-
652652
// @public
653653
export function useDeviceLanguage(auth: Auth): void;
654654

common/api-review/database.api.md

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,11 @@ export interface DatabaseReference extends Query {
2323
readonly root: DatabaseReference;
2424
}
2525

26+
// @public
27+
export function connectDatabaseEmulator(db: FirebaseDatabase, host: string, port: number, options?: {
28+
mockUserToken?: EmulatorMockTokenOptions;
29+
}): void;
30+
2631
// @public
2732
export class DataSnapshot {
2833
child(path: string): DataSnapshot;
@@ -229,10 +234,5 @@ export type Unsubscribe = () => void;
229234
// @public
230235
export function update(ref: DatabaseReference, values: object): Promise<void>;
231236

232-
// @public
233-
export function useDatabaseEmulator(db: Database, host: string, port: number, options?: {
234-
mockUserToken?: EmulatorMockTokenOptions;
235-
}): void;
236-
237237

238238
```

common/api-review/functions-exp.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,9 @@
77
import { FirebaseApp } from '@firebase/app-exp';
88
import { FirebaseError } from '@firebase/util';
99

10+
// @public
11+
export function connectFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;
12+
1013
// @public
1114
export interface Functions {
1215
app: FirebaseApp;
@@ -42,8 +45,5 @@ export interface HttpsCallableResult<ResponseData = unknown> {
4245
readonly data: ResponseData;
4346
}
4447

45-
// @public
46-
export function useFunctionsEmulator(functionsInstance: Functions, host: string, port: number): void;
47-
4848

4949
```

common/api-review/storage.api.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,9 @@ import { Provider } from '@firebase/component';
1515
import { Subscribe } from '@firebase/util';
1616
import { Unsubscribe } from '@firebase/util';
1717

18+
// @public
19+
export function connectStorageEmulator(storage: StorageService, host: string, port: number): void;
20+
1821
// @public
1922
export function deleteObject(ref: StorageReference): Promise<void>;
2023

@@ -254,8 +257,5 @@ export interface UploadTaskSnapshot {
254257
totalBytes: number;
255258
}
256259

257-
// @public
258-
export function useStorageEmulator(storage: StorageService, host: string, port: number): void;
259-
260260

261261
```

integration/firebase/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -7,11 +7,11 @@
77
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
88
},
99
"devDependencies": {
10-
"firebase": "8.7.0",
10+
"firebase": "8.7.1",
1111
"@types/chai": "4.2.14",
12-
"@types/mocha": "7.0.2",
12+
"@types/mocha": "8.2.3",
1313
"chai": "4.3.4",
14-
"karma": "5.2.3",
14+
"karma": "6.3.4",
1515
"karma-babel-preprocessor": "8.0.1",
1616
"karma-chrome-launcher": "3.1.0",
1717
"karma-firefox-launcher": "2.1.0",

integration/firestore/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,11 +16,11 @@
1616
"devDependencies": {
1717
"@firebase/app": "0.6.28",
1818
"@firebase/firestore": "2.3.8",
19-
"@types/mocha": "7.0.2",
19+
"@types/mocha": "8.2.3",
2020
"gulp": "4.0.2",
21-
"gulp-filter": "6.0.0",
21+
"gulp-filter": "7.0.0",
2222
"gulp-replace": "1.1.3",
23-
"karma": "5.2.3",
23+
"karma": "6.3.4",
2424
"karma-chrome-launcher": "3.1.0",
2525
"karma-firefox-launcher": "2.1.0",
2626
"karma-mocha": "2.0.1",

integration/messaging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"test:manual": "mocha --exit"
1010
},
1111
"devDependencies": {
12-
"firebase": "8.7.0",
12+
"firebase": "8.7.1",
1313
"chai": "4.3.4",
1414
"chromedriver": "91.0.0",
1515
"express": "4.17.1",

package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@
8080
"@types/inquirer": "7.3.1",
8181
"@types/listr": "0.14.2",
8282
"@types/long": "4.0.1",
83-
"@types/mocha": "7.0.2",
83+
"@types/mocha": "8.2.3",
8484
"@types/mz": "2.7.3",
8585
"@types/node": "12.20.15",
8686
"@types/sinon": "9.0.10",
@@ -117,10 +117,10 @@
117117
"inquirer": "8.1.1",
118118
"istanbul-instrumenter-loader": "3.0.1",
119119
"js-yaml": "4.1.0",
120-
"karma": "5.2.3",
120+
"karma": "6.3.4",
121121
"karma-chrome-launcher": "3.1.0",
122122
"karma-cli": "2.0.0",
123-
"karma-coverage-istanbul-reporter": "2.1.1",
123+
"karma-coverage-istanbul-reporter": "3.0.3",
124124
"karma-firefox-launcher": "2.1.0",
125125
"karma-mocha": "2.0.1",
126126
"karma-mocha-reporter": "2.2.5",
@@ -130,7 +130,7 @@
130130
"karma-summary-reporter": "2.0.0",
131131
"karma-webpack": "4.0.2",
132132
"lcov-result-merger": "3.1.0",
133-
"lerna": "3.22.1",
133+
"lerna": "4.0.0",
134134
"listr": "0.14.3",
135135
"lodash": "4.17.20",
136136
"long": "3.2.0",

packages-exp/analytics-exp/src/api.ts

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -450,6 +450,8 @@ export function logEvent(
450450
eventParams?: {
451451
app_name: string;
452452
screen_name: EventParams['screen_name'];
453+
firebase_screen: EventParams['firebase_screen'];
454+
firebase_screen_class: EventParams['firebase_screen_class'];
453455
app_id?: string;
454456
app_version?: string;
455457
app_installer_id?: string;

packages-exp/analytics-exp/src/public-types.ts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,14 @@ export interface EventParams {
279279
number?: string;
280280
promotions?: Promotion[];
281281
screen_name?: string;
282+
/**
283+
* Firebase-specific. Use to log a `screen_name` to Firebase Analytics.
284+
*/
285+
firebase_screen?: string;
286+
/**
287+
* Firebase-specific. Use to log a `screen_class` to Firebase Analytics.
288+
*/
289+
firebase_screen_class?: string;
282290
search_term?: string;
283291
shipping?: Currency;
284292
tax?: Currency;

packages-exp/app-check-exp/src/client.test.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -52,7 +52,8 @@ describe('client', () => {
5252
});
5353

5454
it('returns a AppCheck token', async () => {
55-
useFakeTimers();
55+
// To get a consistent expireTime/issuedAtTime.
56+
const clock = useFakeTimers();
5657
fetchStub.returns(
5758
Promise.resolve({
5859
status: 200,
@@ -77,6 +78,7 @@ describe('client', () => {
7778
expireTimeMillis: 3600,
7879
issuedAtTimeMillis: 0
7980
});
81+
clock.restore();
8082
});
8183

8284
it('throws when there is a network error', async () => {

packages-exp/app-check-exp/src/factory.ts

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,7 @@ import {
2424
removeTokenListener
2525
} from './internal-api';
2626
import { Provider } from '@firebase/component';
27+
import { getState } from './state';
2728

2829
/**
2930
* AppCheck Service class.
@@ -34,6 +35,10 @@ export class AppCheckService implements AppCheck, _FirebaseService {
3435
public platformLoggerProvider: Provider<'platform-logger'>
3536
) {}
3637
_delete(): Promise<void> {
38+
const { tokenObservers } = getState(this.app);
39+
for (const tokenObserver of tokenObservers) {
40+
removeTokenListener(this.app, tokenObserver.next);
41+
}
3742
return Promise.resolve();
3843
}
3944
}

0 commit comments

Comments
 (0)