Skip to content

Commit 8d34d4a

Browse files
committed
Merge remote-tracking branch 'origin/master' at 1b33fda
2 parents 8524375 + 1b33fda commit 8d34d4a

File tree

27 files changed

+481
-128
lines changed

27 files changed

+481
-128
lines changed

.changeset/dirty-balloons-unite.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/auth": patch
3+
---
4+
5+
Fix typings where the constructor of `OAuthProvider` was missing.

.changeset/eleven-swans-drive.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
'@firebase/analytics-compat': patch
3+
'@firebase/app-check-compat': patch
4+
'@firebase/app-compat': patch
5+
'@firebase/functions-compat': patch
6+
---
7+
8+
Fix cjs builds by removing the named export from app-compat

.changeset/late-bobcats-swim.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+
Make firestore/lite available in nodejs

.changeset/slimy-jobs-wave.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
"@firebase/app-compat": patch
3+
---
4+
5+
Remove private types in app-compat

.changeset/twelve-items-wonder.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
---
2+
'@firebase/firestore': patch
3+
'@firebase/storage': patch
4+
---
5+
6+
Addressed incorrect use of the `node-fetch` polyfill

.github/CODEOWNERS

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,10 +57,10 @@ packages/messaging-interop-types @zwu52 @chliangGoogle @ciarand @firebase/jssdk-
5757
integration/messaging @zwu52 @chliangGoogle @ciarand @firebase/jssdk-global-approvers
5858

5959
# Auth Code
60-
packages/auth @bojeil-google @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
60+
packages/auth @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
6161
packages/auth-compat @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
62-
packages/auth-types @bojeil-google @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
63-
packages/auth-interop-types @bojeil-google @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
62+
packages/auth-types @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
63+
packages/auth-interop-types @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers
6464

6565
# Testing Code
6666
packages/rules-unit-testing @avolkovi @sam-gc @yuchenshi @firebase/jssdk-global-approvers

README.md

Lines changed: 20 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22

33
<!-- BADGES -->
44
![Build Status](https://img.shields.io/github/workflow/status/firebase/firebase-js-sdk/Run%20All%20Tests.svg)
5-
[![Build Status](https://saucelabs.com/buildstatus/firebase-oss)](https://saucelabs.com/u/firebase-oss)
65
[![Version](https://img.shields.io/npm/v/firebase.svg?label=version)](https://www.npmjs.com/package/firebase)
76
[![Coverage Status](https://coveralls.io/repos/github/firebase/firebase-js-sdk/badge.svg?branch=master)](https://coveralls.io/github/firebase/firebase-js-sdk?branch=master)
87
<!-- END BADGES -->
@@ -19,6 +18,8 @@ To get started using Firebase, see
1918

2019
[![Release Notes](https://img.shields.io/npm/v/firebase.svg?style=flat-square&label=Release%20Notes%20for&labelColor=039be5&color=666)](https://firebase.google.com/support/release-notes/js)
2120

21+
## Upgrade to Version 9
22+
Version 9 has a redesigned API that supports tree-shaking. Read the [Upgrade Guide](https://firebase.google.com/docs/web/modular-upgrade) to learn more.
2223
## Supported Environments
2324
Please see [Environment Support](https://firebase.google.com/support/guides/environments_js-sdk).
2425

@@ -88,9 +89,26 @@ $ yarn build
8889
A production project is required to test the Firebase JS SDK. You can create a
8990
new project by visiting the [Firebase Console](https://console.firebase.google.com/).
9091

92+
#### Web App Setup
93+
94+
Visit the "Project Overview" and select "Add app" under your project name. Register the app with a
95+
nickname and click through the remaining steps. Without performing this step, you will encounter
96+
the error in the test setup:
97+
98+
```
99+
FirebaseError: There are no WEB apps associated with this Firebase project
100+
```
101+
91102
#### Firestore Database Setup
92103

93-
Visit the "Database" section of the console and create a Cloud Firestore
104+
Visit the "Firestore Database" section of the console and create a Cloud Firestore
105+
database. When prompted to select the set of initial security rules, select
106+
any option (e.g. "Start in Production Mode") since these permission settings
107+
will be overwritten below.
108+
109+
#### Realtime Database Setup
110+
111+
Visit the "Realtime Database" section of the console and create a realtime
94112
database. When prompted to select the set of initial security rules, select
95113
any option (e.g. "Start in Production Mode") since these permission settings
96114
will be overwritten below.

integration/messaging/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"chai": "4.3.4",
1414
"chromedriver": "91.0.0",
1515
"express": "4.17.1",
16-
"geckodriver": "1.22.3",
16+
"geckodriver": "2.0.3",
1717
"mocha": "7.2.0",
1818
"node-fetch": "2.6.1",
1919
"selenium-assistant": "6.1.0"

packages/analytics-compat/src/service.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
import { expect, use } from 'chai';
1818
import { AnalyticsService } from './service';
19-
import { firebase, FirebaseApp } from '@firebase/app-compat';
19+
import firebase, { FirebaseApp } from '@firebase/app-compat';
2020
import * as analyticsExp from '@firebase/analytics';
2121
import { stub, match, SinonStub } from 'sinon';
2222
import * as sinonChai from 'sinon-chai';

packages/app-check-compat/src/service.test.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
*/
1717
import { expect, use } from 'chai';
1818
import { AppCheckService } from './service';
19-
import { firebase, FirebaseApp } from '@firebase/app-compat';
19+
import firebase, { FirebaseApp } from '@firebase/app-compat';
2020
import * as appCheckExp from '@firebase/app-check';
2121
import { stub, match, SinonStub } from 'sinon';
2222
import * as sinonChai from 'sinon-chai';
@@ -65,7 +65,7 @@ describe('Firebase App Check > Service', () => {
6565

6666
it(
6767
'activate("string") calls modular initializeAppCheck() with a ' +
68-
'ReCaptchaV3Provider',
68+
'ReCaptchaV3Provider',
6969
() => {
7070
const initializeAppCheckStub = stub(appCheckExp, 'initializeAppCheck');
7171
service = new AppCheckService(app);
@@ -80,7 +80,7 @@ describe('Firebase App Check > Service', () => {
8080

8181
it(
8282
'activate(CustomProvider) calls modular initializeAppCheck() with' +
83-
' a CustomProvider',
83+
' a CustomProvider',
8484
() => {
8585
const initializeAppCheckStub = stub(appCheckExp, 'initializeAppCheck');
8686
service = new AppCheckService(app);
@@ -167,7 +167,7 @@ describe('Firebase App Check > Service', () => {
167167

168168
it('onTokenChanged() throws if activate() has not been called', async () => {
169169
service = createTestService(app);
170-
expect(() => service.onTokenChanged(() => {})).to.throw(
170+
expect(() => service.onTokenChanged(() => { })).to.throw(
171171
AppCheckError.USE_BEFORE_ACTIVATION
172172
);
173173
});
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
{
2+
"extends": "../../config/api-extractor.json",
3+
// Point it to your entry point d.ts file.
4+
"mainEntryPointFilePath": "<projectFolder>/dist/src/index.d.ts",
5+
"dtsRollup": {
6+
"enabled": true,
7+
"untrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>.d.ts",
8+
"publicTrimmedFilePath": "<projectFolder>/dist/<unscopedPackageName>-public.d.ts"
9+
},
10+
"apiReport": {
11+
/**
12+
* only dts rollup is needed for app-compat
13+
*/
14+
"enabled": false
15+
}
16+
}

packages/app-compat/package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,15 +14,17 @@
1414
"scripts": {
1515
"lint": "eslint -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
1616
"lint:fix": "eslint --fix -c .eslintrc.js '**/*.ts' --ignore-path '../../.gitignore'",
17-
"build": "rollup -c",
17+
"build": "rollup -c && yarn api-report",
1818
"build:deps": "lerna run --scope @firebase/app-compat --include-dependencies build",
1919
"dev": "rollup -c -w",
2020
"test": "run-p lint test:all",
2121
"test:all": "run-p test:browser test:node",
2222
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test:all",
2323
"test:browser": "karma start --single-run",
2424
"test:browser:debug": "karma start --browsers Chrome --auto-watch",
25-
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* src/**/*.test.ts --config ../../config/mocharc.node.js"
25+
"test:node": "TS_NODE_FILES=true TS_NODE_CACHE=NO TS_NODE_COMPILER_OPTIONS='{\"module\":\"commonjs\"}' nyc --reporter lcovonly -- mocha test/**/*.test.* src/**/*.test.ts --config ../../config/mocharc.node.js",
26+
"api-report": "api-extractor run --local --verbose",
27+
"typings:public": "node ../../scripts/exp/use_typings.js ./dist/app-compat-public.d.ts"
2628
},
2729
"license": "Apache-2.0",
2830
"dependencies": {

packages/app-compat/src/firebaseApp.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,9 @@ export interface _FirebaseApp {
5959
/**
6060
* Global context object for a collection of services using
6161
* a shared authentication state.
62+
*
63+
* marked as internal because it references internal types exported from @firebase/app
64+
* @internal
6265
*/
6366
export class FirebaseAppImpl implements Compat<_FirebaseAppExp>, _FirebaseApp {
6467
private container: ComponentContainer;

packages/app-compat/src/index.lite.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
import { createFirebaseNamespaceLite } from './lite/firebaseNamespaceLite';
1919
import { registerCoreComponents } from './registerCoreComponents';
2020

21-
export const firebase = createFirebaseNamespaceLite();
21+
const firebase = createFirebaseNamespaceLite();
2222

2323
registerCoreComponents('lite');
2424

packages/app-compat/src/index.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ if (isBrowser() && (self as any).firebase !== undefined) {
3939
}
4040
}
4141

42-
export const firebase = firebaseNamespace;
42+
const firebase = firebaseNamespace;
4343

4444
registerCoreComponents();
4545

packages/app-compat/src/public-types.ts

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
* limitations under the License.
1616
*/
1717
import { LogCallback, LogLevelString, LogOptions } from '@firebase/logger';
18-
import { FirebaseAppImpl, _FirebaseApp } from './firebaseApp';
18+
import { _FirebaseApp } from './firebaseApp';
1919

2020
export interface FirebaseOptions {
2121
apiKey?: string;
@@ -31,6 +31,10 @@ export interface FirebaseOptions {
3131
export interface FirebaseAppConfig {
3232
name?: string;
3333
automaticDataCollectionEnabled?: boolean;
34+
}
35+
36+
interface FirebaseAppContructor {
37+
new (): FirebaseApp;
3438
}
3539

3640
/**
@@ -81,7 +85,7 @@ export interface FirebaseNamespace {
8185
*
8286
* DO NOT call this constuctor directly (use firebase.app() instead).
8387
*/
84-
App: typeof FirebaseAppImpl;
88+
App: FirebaseAppContructor;
8589
};
8690

8791
/**

packages/auth/cordova/demo/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -36,10 +36,10 @@
3636
]
3737
},
3838
"dependencies": {
39-
"@firebase/app": "0.0.900",
40-
"@firebase/auth": "0.0.900",
39+
"@firebase/app": "0.7.0",
40+
"@firebase/auth": "0.17.0",
4141
"@firebase/logger": "0.2.6",
42-
"@firebase/util": "1.1.0",
42+
"@firebase/util": "1.3.0",
4343
"cordova-plugin-browsertab": "0.2.0",
4444
"cordova-plugin-buildinfo": "4.0.0",
4545
"cordova-plugin-compat": "1.2.0",

packages/auth/demo/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@
1616
"dev": "rollup -c -w"
1717
},
1818
"dependencies": {
19-
"@firebase/app": "0.0.900",
20-
"@firebase/auth": "0.0.900",
19+
"@firebase/app": "0.7.0",
20+
"@firebase/auth": "0.17.0",
2121
"@firebase/logger": "0.2.6",
22-
"@firebase/util": "1.1.0",
22+
"@firebase/util": "1.3.0",
2323
"tslib": "^2.1.0"
2424
},
2525
"license": "Apache-2.0",

packages/auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@
4141
"test:node:integration": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration",
4242
"test:node:integration:local": "ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --integration --local",
4343
"test:webdriver": "rollup -c test/integration/webdriver/static/rollup.config.js && ts-node -O '{\"module\": \"commonjs\", \"target\": \"es6\"}' scripts/run_node_tests.ts --webdriver",
44-
"api-report": "api-extractor run --local --verbose && ts-node-script ../../repo-scripts/prune-dts/prune-dts.ts --input dist/auth-public.d.ts --output dist/auth-public.d.ts",
44+
"api-report": "api-extractor run --local --verbose",
4545
"doc": "api-documenter markdown --input temp --output docs",
4646
"build:doc": "yarn build && yarn doc",
4747
"typings:public": "node ../../scripts/exp/use_typings.js ./dist/auth-public.d.ts"

0 commit comments

Comments
 (0)