Skip to content

Add expectedCount to Target in listen request #6854

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
Merged
Changes from 6 commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 5 additions & 0 deletions .changeset/eighty-ants-do.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'firebase': patch
---

Modify entry point ESM bundles to conform to Node ESM specs.
5 changes: 5 additions & 0 deletions .changeset/three-glasses-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@firebase/util': patch
---

Fix for third party window content that cannot access IndexedDB if the browser is set to never accept third party cookies on Firefox.
47 changes: 47 additions & 0 deletions .changeset/tidy-games-fry.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
---
'@firebase/analytics': minor
'@firebase/analytics-compat': minor
'@firebase/analytics-interop-types': minor
'@firebase/analytics-types': minor
'@firebase/app': minor
'@firebase/app-check': minor
'@firebase/app-check-compat': minor
'@firebase/app-check-interop-types': minor
'@firebase/app-check-types': minor
'@firebase/app-compat': minor
'@firebase/app-types': minor
'@firebase/auth': minor
'@firebase/auth-compat': minor
'@firebase/auth-interop-types': minor
'@firebase/auth-types': minor
'@firebase/component': minor
'@firebase/database': minor
'@firebase/database-compat': minor
'@firebase/database-types': minor
'@firebase/functions': minor
'@firebase/functions-compat': minor
'@firebase/functions-types': minor
'@firebase/installations': minor
'@firebase/installations-compat': minor
'@firebase/installations-types': minor
'@firebase/logger': minor
'@firebase/messaging': minor
'@firebase/messaging-compat': minor
'@firebase/messaging-interop-types': minor
'@firebase/performance': minor
'@firebase/performance-compat': minor
'@firebase/performance-types': minor
'@firebase/remote-config': minor
'@firebase/remote-config-compat': minor
'@firebase/remote-config-types': minor
'@firebase/storage': minor
'@firebase/storage-compat': minor
'@firebase/storage-types': minor
'@firebase/template': minor
'@firebase/template-types': minor
'@firebase/util': minor
'@firebase/webchannel-wrapper': minor
'firebase': minor
---

Update TypeScript version to 4.7.4.
2 changes: 1 addition & 1 deletion e2e/package.json
Original file line number Diff line number Diff line change
@@ -21,7 +21,7 @@
"devDependencies": {
"@babel/core": "7.17.10",
"@babel/preset-env": "7.19.4",
"@types/chai": "4.3.3",
"@types/chai": "4.3.4",
"@types/mocha": "9.1.1",
"babel-loader": "8.2.5",
"chai": "4.3.6",
4 changes: 2 additions & 2 deletions integration/compat-interop/package.json
Original file line number Diff line number Diff line change
@@ -24,6 +24,6 @@
"@firebase/remote-config-compat": "0.1.16"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
}
2 changes: 1 addition & 1 deletion integration/compat-typings/package.json
Original file line number Diff line number Diff line change
@@ -10,6 +10,6 @@
"firebase": "*"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
4 changes: 2 additions & 2 deletions integration/firebase/package.json
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
},
"devDependencies": {
"firebase": "9.14.0",
"@types/chai": "4.3.3",
"@types/chai": "4.3.4",
"@types/mocha": "9.1.1",
"chai": "4.3.6",
"karma": "6.4.1",
@@ -20,6 +20,6 @@
"karma-typescript": "5.5.3",
"mocha": "9.2.2",
"npm-run-all": "4.1.5",
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion integration/messaging/package.json
Original file line number Diff line number Diff line change
@@ -12,7 +12,7 @@
"firebase": "9.14.0",
"chai": "4.3.6",
"chromedriver": "98.0.1",
"express": "4.18.1",
"express": "4.18.2",
"geckodriver": "2.0.4",
"mocha": "9.2.2",
"node-fetch": "2.6.7",
12 changes: 6 additions & 6 deletions package.json
Original file line number Diff line number Diff line change
@@ -69,7 +69,7 @@
"@babel/register": "7.18.9",
"@changesets/changelog-github": "0.4.7",
"@changesets/cli": "2.25.0",
"@types/chai": "4.3.3",
"@types/chai": "4.3.4",
"@types/chai-as-promised": "7.1.5",
"@types/child-process-promise": "2.2.2",
"@types/clone": "2.1.1",
@@ -86,9 +86,9 @@
"@types/sinon-chai": "3.2.8",
"@types/tmp": "0.2.3",
"@types/yargs": "17.0.13",
"@typescript-eslint/eslint-plugin": "4.33.0",
"@typescript-eslint/eslint-plugin-tslint": "4.33.0",
"@typescript-eslint/parser": "4.33.0",
"@typescript-eslint/eslint-plugin": "5.43.0",
"@typescript-eslint/eslint-plugin-tslint": "5.43.0",
"@typescript-eslint/parser": "5.43.0",
"api-documenter-me": "0.1.1",
"api-extractor-me": "0.1.2",
"babel-loader": "8.2.5",
@@ -103,7 +103,7 @@
"eslint": "7.32.0",
"eslint-plugin-import": "2.26.0",
"eslint-plugin-unused-imports": "2.0.0",
"express": "4.18.1",
"express": "4.18.2",
"find-free-port": "2.0.0",
"firebase-tools": "11.2.2",
"glob": "7.2.3",
@@ -152,6 +152,6 @@
"typescript": "4.7.4",
"watch": "1.0.2",
"webpack": "4.46.0",
"yargs": "17.6.0"
"yargs": "17.6.2"
}
}
2 changes: 1 addition & 1 deletion packages/analytics-compat/package.json
Original file line number Diff line number Diff line change
@@ -28,7 +28,7 @@
"rollup": "2.79.1",
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/analytics-compat",
2 changes: 1 addition & 1 deletion packages/analytics-interop-types/package.json
Original file line number Diff line number Diff line change
@@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion packages/analytics-types/package.json
Original file line number Diff line number Diff line change
@@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion packages/analytics/package.json
Original file line number Diff line number Diff line change
@@ -54,7 +54,7 @@
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/analytics",
4 changes: 2 additions & 2 deletions packages/analytics/src/get-config.test.ts
Original file line number Diff line number Diff line change
@@ -16,7 +16,7 @@
*/

import { expect } from 'chai';
import { SinonStub, stub, useFakeTimers, restore } from 'sinon';
import { SinonStub, stub, useFakeTimers, restore, match } from 'sinon';
import '../testing/setup';
import {
fetchDynamicConfig,
@@ -246,7 +246,7 @@ describe('Dynamic Config Fetch Functions', () => {
});
// Set fetch timeout to 50 ms.
await fetchDynamicConfigWithRetry(app, fakeRetryData, 50);
expect(consoleStub.args[0][1]).to.include(fakeMeasurementId);
expect(consoleStub).calledWith(match.any, match(fakeMeasurementId));
consoleStub.restore();
}
);
2 changes: 1 addition & 1 deletion packages/app-check-compat/package.json
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/app-check",
2 changes: 1 addition & 1 deletion packages/app-check-interop-types/package.json
Original file line number Diff line number Diff line change
@@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion packages/app-check-types/package.json
Original file line number Diff line number Diff line change
@@ -20,6 +20,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion packages/app-check/package.json
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@
"@rollup/plugin-json": "4.1.0",
"@rollup/plugin-node-resolve": "13.3.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/app-check",
5 changes: 4 additions & 1 deletion packages/app-check/src/client.test.ts
Original file line number Diff line number Diff line change
@@ -31,7 +31,10 @@ import { BASE_ENDPOINT } from './constants';

describe('client', () => {
let app: FirebaseApp;
let fetchStub: SinonStub<[RequestInfo, RequestInit?], Promise<Response>>;
let fetchStub: SinonStub<
[RequestInfo | URL, RequestInit?],
Promise<Response>
>;
beforeEach(() => {
app = getFakeApp();
fetchStub = stub(window, 'fetch').returns(
2 changes: 1 addition & 1 deletion packages/app-compat/package.json
Original file line number Diff line number Diff line change
@@ -51,7 +51,7 @@
"@rollup/plugin-json": "4.1.0",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/app-compat",
2 changes: 1 addition & 1 deletion packages/app-types/package.json
Original file line number Diff line number Diff line change
@@ -24,6 +24,6 @@
"@firebase/logger": "0.2.6"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion packages/app/package.json
Original file line number Diff line number Diff line change
@@ -50,7 +50,7 @@
"rollup": "2.79.1",
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.31.2",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/app",
2 changes: 1 addition & 1 deletion packages/auth-compat/demo/package.json
Original file line number Diff line number Diff line change
@@ -34,7 +34,7 @@
"rollup-plugin-sourcemaps": "0.6.3",
"rollup-plugin-typescript2": "0.31.2",
"rollup-plugin-uglify": "6.0.4",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/auth-compat/demo",
2 changes: 1 addition & 1 deletion packages/auth-compat/package.json
Original file line number Diff line number Diff line change
@@ -61,7 +61,7 @@
"rollup-plugin-replace": "2.2.0",
"rollup-plugin-typescript2": "0.31.2",
"selenium-webdriver": "4.5.0",
"typescript": "4.2.2"
"typescript": "4.7.4"
},
"repository": {
"directory": "packages/auth-compat",
2 changes: 1 addition & 1 deletion packages/auth-interop-types/package.json
Original file line number Diff line number Diff line change
@@ -24,6 +24,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion packages/auth-types/package.json
Original file line number Diff line number Diff line change
@@ -24,6 +24,6 @@
"url": "https://github.com/firebase/firebase-js-sdk/issues"
},
"devDependencies": {
"typescript": "4.2.2"
"typescript": "4.7.4"
}
}
2 changes: 1 addition & 1 deletion packages/auth/package.json
Original file line number Diff line number Diff line change
@@ -118,7 +118,7 @@
"rollup-plugin-sourcemaps": "0.6.3",
"rollup-plugin-typescript2": "0.31.2",
"selenium-webdriver": "4.5.0",
"typescript": "4.2.2",
"typescript": "4.7.4",
"@types/express": "4.17.14"
},
"repository": {
12 changes: 9 additions & 3 deletions packages/auth/src/api/index.test.ts
Original file line number Diff line number Diff line change
@@ -383,7 +383,9 @@ describe('api/_performApiRequest', () => {
);
assert.fail('Call should have failed');
} catch (e) {
expect(e.code).to.eq(`auth/${AuthErrorCode.NEED_CONFIRMATION}`);
expect((e as FirebaseError).code).to.eq(
`auth/${AuthErrorCode.NEED_CONFIRMATION}`
);
expect((e as FirebaseError).customData!._tokenResponse).to.eql({
needConfirmation: true,
idToken: 'id-token'
@@ -413,7 +415,9 @@ describe('api/_performApiRequest', () => {
);
assert.fail('Call should have failed');
} catch (e) {
expect(e.code).to.eq(`auth/${AuthErrorCode.CREDENTIAL_ALREADY_IN_USE}`);
expect((e as FirebaseError).code).to.eq(
`auth/${AuthErrorCode.CREDENTIAL_ALREADY_IN_USE}`
);
expect((e as FirebaseError).customData!._tokenResponse).to.eql(
response
);
@@ -444,7 +448,9 @@ describe('api/_performApiRequest', () => {
);
assert.fail('Call should have failed');
} catch (e) {
expect(e.code).to.eq(`auth/${AuthErrorCode.EMAIL_EXISTS}`);
expect((e as FirebaseError).code).to.eq(
`auth/${AuthErrorCode.EMAIL_EXISTS}`
);
expect((e as FirebaseError).customData!.email).to.eq('[email protected]');
expect((e as FirebaseError).customData!.phoneNumber).to.eq(
'+1555-this-is-a-number'
Original file line number Diff line number Diff line change
@@ -76,7 +76,7 @@ export abstract class AbstractPopupRedirectOperation
await this.onExecution();
this.eventManager.registerConsumer(this);
} catch (e) {
this.reject(e);
this.reject(e as Error);
}
}
);
@@ -102,7 +102,7 @@ export abstract class AbstractPopupRedirectOperation
try {
this.resolve(await this.getIdpTask(type)(params));
} catch (e) {
this.reject(e);
this.reject(e as Error);
}
}

2 changes: 1 addition & 1 deletion packages/auth/src/platform_browser/popup_redirect.test.ts
Original file line number Diff line number Diff line change
@@ -93,7 +93,7 @@ describe('platform_browser/popup_redirect', () => {
});

context('#_openPopup', () => {
let popupUrl: string | undefined;
let popupUrl: string | URL | undefined;
let provider: OAuthProvider;
const event = AuthEventType.LINK_VIA_POPUP;

5 changes: 4 additions & 1 deletion packages/auth/test/helpers/mock_fetch.ts
Original file line number Diff line number Diff line change
@@ -34,7 +34,10 @@ let fetchImpl: typeof fetch | null;
const routes = new Map<string, Route>();

// Using a constant rather than a function to enforce the type matches fetch()
const fakeFetch: typeof fetch = (input: RequestInfo, request?: RequestInit) => {
const fakeFetch: typeof fetch = (
input: RequestInfo | URL,
request?: RequestInit
) => {
if (typeof input !== 'string') {
throw new Error('URL passed to fetch was not a string');
}
Loading