Skip to content

Commit 4dd243c

Browse files
committed
Merge remote-tracking branch 'origin/master' into LongPollingTimeout
2 parents 00c08e6 + 9c31727 commit 4dd243c

File tree

62 files changed

+211
-216
lines changed

Some content is hidden

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

62 files changed

+211
-216
lines changed

.changeset/dry-cats-lick.md

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

.changeset/funny-ways-carry.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
---
2+
'@firebase/app': patch
3+
---
4+
5+
Make the error more helpful when `getApp()` is called before `initializeApp()`.

.changeset/grumpy-bees-shake.md

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

.changeset/olive-cycles-count.md

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

.changeset/olive-goats-greet.md

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

.changeset/silent-islands-fix.md

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

.changeset/strong-ghosts-compare.md

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

.changeset/swift-eels-change.md

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

.changeset/wicked-tomatoes-smoke.md

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

.vscode/settings.json

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,5 +10,6 @@
1010
"**/node_modules": true
1111
},
1212
"typescript.tsdk": "node_modules/typescript/lib",
13-
"files.associations": { "*.json": "jsonc" }
13+
"files.associations": { "*.json": "jsonc" },
14+
"eslint.workingDirectories": [{ "mode": "auto" }]
1415
}

docs-devsite/auth.auth.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ export interface Auth
4141
| [onAuthStateChanged(nextOrObserver, error, completed)](./auth.auth.md#authonauthstatechanged) | Adds an observer for changes to the user's sign-in state. |
4242
| [onIdTokenChanged(nextOrObserver, error, completed)](./auth.auth.md#authonidtokenchanged) | Adds an observer for changes to the signed-in user's ID token. |
4343
| [setPersistence(persistence)](./auth.auth.md#authsetpersistence) | Changes the type of persistence on the <code>Auth</code> instance. |
44-
| [signOut()](./auth.auth.md#authsignout) | Signs out the current user. |
44+
| [signOut()](./auth.auth.md#authsignout) | Signs out the current user. This does not automatically revoke the user's ID token. |
4545
| [updateCurrentUser(user)](./auth.auth.md#authupdatecurrentuser) | Asynchronously sets the provided user as [Auth.currentUser](./auth.auth.md#authcurrentuser) on the [Auth](./auth.auth.md#auth_interface) instance. |
4646
| [useDeviceLanguage()](./auth.auth.md#authusedevicelanguage) | Sets the current language to the default device/browser preference. |
4747

@@ -247,7 +247,7 @@ auth.setPersistence(browserSessionPersistence);
247247

248248
## Auth.signOut()
249249

250-
Signs out the current user.
250+
Signs out the current user. This does not automatically revoke the user's ID token.
251251

252252
<b>Signature:</b>
253253

integration/compat-interop/package.json

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,12 +8,12 @@
88
"test:debug": "karma start --browsers Chrome --auto-watch"
99
},
1010
"dependencies": {
11-
"@firebase/app": "0.9.8",
12-
"@firebase/app-compat": "0.2.8",
13-
"@firebase/analytics": "0.9.5",
14-
"@firebase/analytics-compat": "0.2.5",
15-
"@firebase/auth": "0.23.0",
16-
"@firebase/auth-compat": "0.4.0",
11+
"@firebase/app": "0.9.9",
12+
"@firebase/app-compat": "0.2.9",
13+
"@firebase/analytics": "0.10.0",
14+
"@firebase/analytics-compat": "0.2.6",
15+
"@firebase/auth": "0.23.1",
16+
"@firebase/auth-compat": "0.4.1",
1717
"@firebase/functions": "0.9.4",
1818
"@firebase/functions-compat": "0.3.4",
1919
"@firebase/messaging": "0.12.4",

integration/firebase/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"test:ci": "node ../../scripts/run_tests_in_ci.js -s test"
88
},
99
"devDependencies": {
10-
"firebase": "9.20.0",
10+
"firebase": "9.21.0",
1111
"@types/chai": "4.3.4",
1212
"@types/mocha": "9.1.1",
1313
"chai": "4.3.7",

integration/firestore/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,8 @@
1515
"test:memory:debug": "yarn build:memory; karma start --auto-watch --browsers Chrome"
1616
},
1717
"dependencies": {
18-
"@firebase/app": "0.9.8",
19-
"@firebase/firestore": "3.10.1"
18+
"@firebase/app": "0.9.9",
19+
"@firebase/firestore": "3.11.0"
2020
},
2121
"devDependencies": {
2222
"@types/mocha": "9.1.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": "9.20.0",
12+
"firebase": "9.21.0",
1313
"chai": "4.3.7",
1414
"chromedriver": "98.0.1",
1515
"express": "4.18.2",

packages/analytics-compat/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @firebase/analytics-compat
22

3+
## 0.2.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`0a27d2fbf`](https://github.com/firebase/firebase-js-sdk/commit/0a27d2fbf268f07099d4fa5ecab7fbf35a579780)]:
8+
- @firebase/analytics@0.10.0
9+
310
## 0.2.5
411

512
### Patch Changes

packages/analytics-compat/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/analytics-compat",
3-
"version": "0.2.5",
3+
"version": "0.2.6",
44
"description": "",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -24,7 +24,7 @@
2424
"@firebase/app-compat": "0.x"
2525
},
2626
"devDependencies": {
27-
"@firebase/app-compat": "0.2.8",
27+
"@firebase/app-compat": "0.2.9",
2828
"rollup": "2.79.1",
2929
"@rollup/plugin-json": "4.1.0",
3030
"rollup-plugin-typescript2": "0.31.2",
@@ -54,7 +54,7 @@
5454
"typings": "dist/src/index.d.ts",
5555
"dependencies": {
5656
"@firebase/component": "0.6.4",
57-
"@firebase/analytics": "0.9.5",
57+
"@firebase/analytics": "0.10.0",
5858
"@firebase/analytics-types": "0.8.0",
5959
"@firebase/util": "1.9.3",
6060
"tslib": "^2.1.0"

packages/analytics/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @firebase/analytics
22

3+
## 0.10.0
4+
5+
### Minor Changes
6+
7+
- [`0a27d2fbf`](https://github.com/firebase/firebase-js-sdk/commit/0a27d2fbf268f07099d4fa5ecab7fbf35a579780) [#7158](https://github.com/firebase/firebase-js-sdk/pull/7158) - 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.
8+
39
## 0.9.5
410

511
### Patch Changes

packages/analytics/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/analytics",
3-
"version": "0.9.5",
3+
"version": "0.10.0",
44
"description": "A analytics package for new firebase packages",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -48,7 +48,7 @@
4848
},
4949
"license": "Apache-2.0",
5050
"devDependencies": {
51-
"@firebase/app": "0.9.8",
51+
"@firebase/app": "0.9.9",
5252
"rollup": "2.79.1",
5353
"@rollup/plugin-commonjs": "21.1.0",
5454
"@rollup/plugin-json": "4.1.0",

packages/app-check-compat/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @firebase/app-check-compat
22

3+
## 0.3.6
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`195e82ebb`](https://github.com/firebase/firebase-js-sdk/commit/195e82ebba29d501892cf9269ecee74eec9df220)]:
8+
- @firebase/app-check@0.7.0
9+
310
## 0.3.5
411

512
### Patch Changes

packages/app-check-compat/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/app-check-compat",
3-
"version": "0.3.5",
3+
"version": "0.3.6",
44
"description": "A compat App Check package for new firebase packages",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -35,7 +35,7 @@
3535
"@firebase/app-compat": "0.x"
3636
},
3737
"dependencies": {
38-
"@firebase/app-check": "0.6.5",
38+
"@firebase/app-check": "0.7.0",
3939
"@firebase/app-check-types": "0.5.0",
4040
"@firebase/logger": "0.4.0",
4141
"@firebase/util": "1.9.3",
@@ -44,7 +44,7 @@
4444
},
4545
"license": "Apache-2.0",
4646
"devDependencies": {
47-
"@firebase/app-compat": "0.2.8",
47+
"@firebase/app-compat": "0.2.9",
4848
"rollup": "2.79.1",
4949
"@rollup/plugin-commonjs": "21.1.0",
5050
"@rollup/plugin-json": "4.1.0",

packages/app-check/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @firebase/app-check
22

3+
## 0.7.0
4+
5+
### Minor Changes
6+
7+
- [`195e82ebb`](https://github.com/firebase/firebase-js-sdk/commit/195e82ebba29d501892cf9269ecee74eec9df220) [#7169](https://github.com/firebase/firebase-js-sdk/pull/7169) - Add new limited use token method to App Check
8+
39
## 0.6.5
410

511
### Patch Changes

packages/app-check/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/app-check",
3-
"version": "0.6.5",
3+
"version": "0.7.0",
44
"description": "The App Check component of the Firebase JS SDK",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -45,7 +45,7 @@
4545
},
4646
"license": "Apache-2.0",
4747
"devDependencies": {
48-
"@firebase/app": "0.9.8",
48+
"@firebase/app": "0.9.9",
4949
"rollup": "2.79.1",
5050
"@rollup/plugin-commonjs": "21.1.0",
5151
"@rollup/plugin-json": "4.1.0",

packages/app-compat/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @firebase/app-compat
22

3+
## 0.2.9
4+
5+
### Patch Changes
6+
7+
- Updated dependencies []:
8+
- @firebase/app@0.9.9
9+
310
## 0.2.8
411

512
### Patch Changes

packages/app-compat/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/app-compat",
3-
"version": "0.2.8",
3+
"version": "0.2.9",
44
"description": "The primary entrypoint to the Firebase JS SDK",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",
@@ -40,7 +40,7 @@
4040
},
4141
"license": "Apache-2.0",
4242
"dependencies": {
43-
"@firebase/app": "0.9.8",
43+
"@firebase/app": "0.9.9",
4444
"@firebase/util": "1.9.3",
4545
"@firebase/logger": "0.4.0",
4646
"@firebase/component": "0.6.4",

packages/app/CHANGELOG.md

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# @firebase/app
22

3+
## 0.9.9
4+
5+
### Patch Changes
6+
7+
- Update SDK_VERSION.
8+
39
## 0.9.8
410

511
### Patch Changes

packages/app/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@firebase/app",
3-
"version": "0.9.8",
3+
"version": "0.9.9",
44
"description": "The primary entrypoint to the Firebase JS SDK",
55
"author": "Firebase <[email protected]> (https://firebase.google.com/)",
66
"main": "dist/index.cjs.js",

packages/app/src/api.test.ts

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -199,9 +199,20 @@ describe('API tests', () => {
199199
expect(getApp(appName)).to.equal(app);
200200
});
201201

202-
it('throws retrieving a non existing App', () => {
202+
it('throws retrieving a non existing App (custom name)', () => {
203203
expect(() => getApp('RandomName')).throws(/No Firebase App 'RandomName'/);
204204
});
205+
206+
it('throws retrieving a non existing App (default name)', () => {
207+
expect(() => getApp()).throws(/No Firebase App/);
208+
});
209+
210+
it('does not throw on a non existing App (default name) if a defaults object exists', () => {
211+
global.__FIREBASE_DEFAULTS__ = { config: { apiKey: 'abcd' } };
212+
const app = getApp();
213+
expect(app.options.apiKey).to.equal('abcd');
214+
global.__FIREBASE_DEFAULTS__ = undefined;
215+
});
205216
});
206217

207218
describe('getApps', () => {

packages/app/src/api.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -202,7 +202,7 @@ export function initializeApp(
202202
*/
203203
export function getApp(name: string = DEFAULT_ENTRY_NAME): FirebaseApp {
204204
const app = _apps.get(name);
205-
if (!app && name === DEFAULT_ENTRY_NAME) {
205+
if (!app && name === DEFAULT_ENTRY_NAME && getDefaultAppConfig()) {
206206
return initializeApp();
207207
}
208208
if (!app) {

packages/app/src/errors.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ export const enum AppError {
3434
const ERRORS: ErrorMap<AppError> = {
3535
[AppError.NO_APP]:
3636
"No Firebase App '{$appName}' has been created - " +
37-
'call Firebase App.initializeApp()',
37+
'call initializeApp() first',
3838
[AppError.BAD_APP_NAME]: "Illegal App name: '{$appName}",
3939
[AppError.DUPLICATE_APP]:
4040
"Firebase App named '{$appName}' already exists with different options or config",

packages/app/src/internal.test.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ import {
3030
_getProvider,
3131
_removeServiceInstance
3232
} from './internal';
33+
import { logger } from './logger';
3334

3435
declare module '@firebase/component' {
3536
interface NameServiceMapping {
@@ -60,10 +61,12 @@ describe('Internal API tests', () => {
6061
it('does NOT throw registering duplicate components', () => {
6162
const app = initializeApp({}) as FirebaseAppImpl;
6263
const testComp = createTestComponent('test');
64+
const debugStub = stub(logger, 'debug');
6365

6466
_addComponent(app, testComp);
6567

6668
expect(() => _addComponent(app, testComp)).to.not.throw();
69+
expect(debugStub).to.be.called;
6770
expect(app.container.getProvider('test').getComponent()).to.equal(
6871
testComp
6972
);

packages/auth-compat/CHANGELOG.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,12 @@
11
# @firebase/auth-compat
22

3+
## 0.4.1
4+
5+
### Patch Changes
6+
7+
- Updated dependencies [[`1d6771eb3`](https://github.com/firebase/firebase-js-sdk/commit/1d6771eb358fd5cb9a6b53b7a0141b08f83f0b47)]:
8+
- @firebase/auth@0.23.1
9+
310
## 0.4.0
411

512
### Minor Changes

0 commit comments

Comments
 (0)