Skip to content

Commit 2307905

Browse files
committed
auth
1 parent 5178f6e commit 2307905

File tree

10 files changed

+13
-13
lines changed

10 files changed

+13
-13
lines changed

packages/auth-compat/demo/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@
3434
"rollup-plugin-sourcemaps": "0.6.3",
3535
"rollup-plugin-typescript2": "0.31.2",
3636
"rollup-plugin-uglify": "6.0.4",
37-
"typescript": "4.2.2"
37+
"typescript": "4.7.4"
3838
},
3939
"repository": {
4040
"directory": "packages/auth-compat/demo",

packages/auth-compat/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@
6161
"rollup": "2.79.1",
6262
"rollup-plugin-replace": "2.2.0",
6363
"rollup-plugin-typescript2": "0.31.2",
64-
"typescript": "4.2.2"
64+
"typescript": "4.7.4"
6565
},
6666
"repository": {
6767
"directory": "packages/auth-compat",

packages/auth-interop-types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
"url": "https://github.com/firebase/firebase-js-sdk/issues"
2525
},
2626
"devDependencies": {
27-
"typescript": "4.2.2"
27+
"typescript": "4.7.4"
2828
}
2929
}

packages/auth-types/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,6 @@
2424
"url": "https://github.com/firebase/firebase-js-sdk/issues"
2525
},
2626
"devDependencies": {
27-
"typescript": "4.2.2"
27+
"typescript": "4.7.4"
2828
}
2929
}

packages/auth/package.json

+1-1
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@
118118
"rollup": "2.79.1",
119119
"rollup-plugin-sourcemaps": "0.6.3",
120120
"rollup-plugin-typescript2": "0.31.2",
121-
"typescript": "4.2.2",
121+
"typescript": "4.7.4",
122122
"@types/express": "4.17.14"
123123
},
124124
"repository": {

packages/auth/src/api/index.test.ts

+3-3
Original file line numberDiff line numberDiff line change
@@ -383,7 +383,7 @@ describe('api/_performApiRequest', () => {
383383
);
384384
assert.fail('Call should have failed');
385385
} catch (e) {
386-
expect(e.code).to.eq(`auth/${AuthErrorCode.NEED_CONFIRMATION}`);
386+
expect((e as FirebaseError).code).to.eq(`auth/${AuthErrorCode.NEED_CONFIRMATION}`);
387387
expect((e as FirebaseError).customData!._tokenResponse).to.eql({
388388
needConfirmation: true,
389389
idToken: 'id-token'
@@ -413,7 +413,7 @@ describe('api/_performApiRequest', () => {
413413
);
414414
assert.fail('Call should have failed');
415415
} catch (e) {
416-
expect(e.code).to.eq(`auth/${AuthErrorCode.CREDENTIAL_ALREADY_IN_USE}`);
416+
expect((e as FirebaseError).code).to.eq(`auth/${AuthErrorCode.CREDENTIAL_ALREADY_IN_USE}`);
417417
expect((e as FirebaseError).customData!._tokenResponse).to.eql(
418418
response
419419
);
@@ -444,7 +444,7 @@ describe('api/_performApiRequest', () => {
444444
);
445445
assert.fail('Call should have failed');
446446
} catch (e) {
447-
expect(e.code).to.eq(`auth/${AuthErrorCode.EMAIL_EXISTS}`);
447+
expect((e as FirebaseError).code).to.eq(`auth/${AuthErrorCode.EMAIL_EXISTS}`);
448448
expect((e as FirebaseError).customData!.email).to.eq('[email protected]');
449449
expect((e as FirebaseError).customData!.phoneNumber).to.eq(
450450
'+1555-this-is-a-number'

packages/auth/src/core/strategies/abstract_popup_redirect_operation.ts

+2-2
Original file line numberDiff line numberDiff line change
@@ -76,7 +76,7 @@ export abstract class AbstractPopupRedirectOperation
7676
await this.onExecution();
7777
this.eventManager.registerConsumer(this);
7878
} catch (e) {
79-
this.reject(e);
79+
this.reject(e as Error);
8080
}
8181
}
8282
);
@@ -102,7 +102,7 @@ export abstract class AbstractPopupRedirectOperation
102102
try {
103103
this.resolve(await this.getIdpTask(type)(params));
104104
} catch (e) {
105-
this.reject(e);
105+
this.reject(e as Error);
106106
}
107107
}
108108

packages/auth/src/platform_browser/popup_redirect.test.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -93,7 +93,7 @@ describe('platform_browser/popup_redirect', () => {
9393
});
9494

9595
context('#_openPopup', () => {
96-
let popupUrl: string | undefined;
96+
let popupUrl: string | URL | undefined;
9797
let provider: OAuthProvider;
9898
const event = AuthEventType.LINK_VIA_POPUP;
9999

packages/auth/test/helpers/mock_fetch.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,7 @@ let fetchImpl: typeof fetch | null;
3434
const routes = new Map<string, Route>();
3535

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

repo-scripts/size-analysis/analysis-helper.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -263,7 +263,7 @@ export function extractExports(filePath: string): MemberList {
263263
for (const expt of exports) {
264264
// get the source declaration where we can determine the type of the export. e.g. class vs function
265265
let sourceSymbol = expt;
266-
if (sourceSymbol.declarations[0].kind === ts.SyntaxKind.ExportSpecifier) {
266+
if (sourceSymbol.declarations?.[0].kind === ts.SyntaxKind.ExportSpecifier) {
267267
sourceSymbol = checker.getAliasedSymbol(expt);
268268
}
269269

0 commit comments

Comments
 (0)