Skip to content

Commit 2968e57

Browse files
committed
2 parents 9e8a4f8 + a64c4bf commit 2968e57

19 files changed

Lines changed: 73 additions & 23 deletions
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix circular dependency",
4+
"packageName": "@azure/msal-angular",
5+
"email": "thomas.norling@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix circular type imports",
4+
"packageName": "@azure/msal-browser",
5+
"email": "thomas.norling@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix circular type imports",
4+
"packageName": "@azure/msal-common",
5+
"email": "thomas.norling@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
{
2+
"type": "patch",
3+
"comment": "Fix circular type imports",
4+
"packageName": "@azure/msal-node",
5+
"email": "thomas.norling@microsoft.com",
6+
"dependentChangeType": "patch"
7+
}

lib/msal-angular/src/msal.broadcast.service.ts

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -11,9 +11,9 @@ import {
1111
InteractionStatus,
1212
} from "@azure/msal-browser";
1313
import { BehaviorSubject, Observable, ReplaySubject, Subject } from "rxjs";
14-
import { MsalService } from "./msal.service";
1514
import { MsalBroadcastConfiguration } from "./msal.broadcast.config";
1615
import { MSAL_BROADCAST_CONFIG, MSAL_INSTANCE } from "./constants";
16+
import { name, version } from "./packageMetadata";
1717

1818
@Injectable()
1919
export class MsalBroadcastService {
@@ -24,7 +24,6 @@ export class MsalBroadcastService {
2424

2525
constructor(
2626
@Inject(MSAL_INSTANCE) private msalInstance: IPublicClientApplication,
27-
private authService: MsalService,
2827
@Optional()
2928
@Inject(MSAL_BROADCAST_CONFIG)
3029
private msalBroadcastConfig?: MsalBroadcastConfiguration
@@ -34,8 +33,9 @@ export class MsalBroadcastService {
3433
this.msalBroadcastConfig &&
3534
this.msalBroadcastConfig.eventsToReplay > 0
3635
) {
37-
this.authService
36+
this.msalInstance
3837
.getLogger()
38+
.clone(name, version)
3939
.verbose(
4040
`BroadcastService - eventsToReplay set on BroadcastConfig, replaying the last ${this.msalBroadcastConfig.eventsToReplay} events`
4141
);
@@ -62,8 +62,9 @@ export class MsalBroadcastService {
6262
this._inProgress.value
6363
);
6464
if (status !== null) {
65-
this.authService
65+
this.msalInstance
6666
.getLogger()
67+
.clone(name, version)
6768
.verbose(
6869
`BroadcastService - ${message.eventType} results in setting inProgress from ${this._inProgress.value} to ${status}`
6970
);

lib/msal-angular/src/msal.navigation.client.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ const msalInstance = new PublicClientApplication({
2626
});
2727

2828
describe("MsalCustomNaviationClient", () => {
29-
beforeAll(() => {
29+
beforeEach(() => {
3030
TestBed.resetTestingModule();
3131

3232
TestBed.configureTestingModule({

lib/msal-angular/src/msal.redirect.component.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ function initializeMsal() {
3535
}
3636

3737
describe("MsalRedirectComponent", () => {
38-
beforeAll(initializeMsal);
38+
beforeEach(initializeMsal);
3939

4040
it("calls handleRedirectObservable on ngInit", (done) => {
4141
const sampleAccessToken = {

lib/msal-angular/src/msal.service.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function initializeMsal() {
4040
}
4141

4242
describe("MsalService", () => {
43-
beforeAll(initializeMsal);
43+
beforeEach(initializeMsal);
4444

4545
describe("loginPopup", () => {
4646
it("success", (done) => {

lib/msal-browser/src/cache/ITokenCache.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -3,10 +3,10 @@
33
* Licensed under the MIT License.
44
*/
55

6-
import { ExternalTokenResponse } from "@azure/msal-common/browser";
7-
import { SilentRequest } from "../request/SilentRequest.js";
8-
import { LoadTokenOptions } from "./TokenCache.js";
9-
import { AuthenticationResult } from "../response/AuthenticationResult.js";
6+
import type { ExternalTokenResponse } from "@azure/msal-common/browser";
7+
import type { SilentRequest } from "../request/SilentRequest.js";
8+
import type { LoadTokenOptions } from "./TokenCache.js";
9+
import type { AuthenticationResult } from "../response/AuthenticationResult.js";
1010

1111
export interface ITokenCache {
1212
/**

lib/msal-browser/src/cache/TokenCache.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -23,14 +23,14 @@ import {
2323
AccountEntityUtils,
2424
} from "@azure/msal-common/browser";
2525
import { BrowserConfiguration } from "../config/Configuration.js";
26-
import { SilentRequest } from "../request/SilentRequest.js";
26+
import type { SilentRequest } from "../request/SilentRequest.js";
2727
import { BrowserCacheManager } from "./BrowserCacheManager.js";
28-
import { ITokenCache } from "./ITokenCache.js";
28+
import type { ITokenCache } from "./ITokenCache.js";
2929
import {
3030
createBrowserAuthError,
3131
BrowserAuthErrorCodes,
3232
} from "../error/BrowserAuthError.js";
33-
import { AuthenticationResult } from "../response/AuthenticationResult.js";
33+
import type { AuthenticationResult } from "../response/AuthenticationResult.js";
3434
import { base64Decode } from "../encode/Base64Decode.js";
3535
import * as BrowserCrypto from "../crypto/BrowserCrypto.js";
3636

0 commit comments

Comments
 (0)