From ead55357d23a3e6cdf4b5b855ba4e1c0f1148ae5 Mon Sep 17 00:00:00 2001 From: Thomas Norling Date: Fri, 9 May 2025 10:07:42 -0700 Subject: [PATCH 1/5] track upgrades --- .../src/cache/BrowserCacheManager.ts | 24 ++++++ .../src/utils/BrowserConstants.ts | 1 + .../test/app/PublicClientApplication.spec.ts | 30 ++++--- .../test/cache/BrowserCacheManager.spec.ts | 86 ++++++++++++++++++- .../interaction_client/PopupClient.spec.ts | 7 +- .../interaction_client/RedirectClient.spec.ts | 17 +++- .../telemetry/performance/PerformanceEvent.ts | 5 ++ 7 files changed, 152 insertions(+), 18 deletions(-) diff --git a/lib/msal-browser/src/cache/BrowserCacheManager.ts b/lib/msal-browser/src/cache/BrowserCacheManager.ts index 4611ffdb2b..93cf04f6d3 100644 --- a/lib/msal-browser/src/cache/BrowserCacheManager.ts +++ b/lib/msal-browser/src/cache/BrowserCacheManager.ts @@ -66,6 +66,7 @@ import { getAccountKeys, getTokenKeys } from "./CacheHelpers.js"; import { EventType } from "../event/EventType.js"; import { EventHandler } from "../event/EventHandler.js"; import { clearHash } from "../utils/BrowserUtils.js"; +import { version } from "../packageMetadata.js"; /** * This class implements the cache storage interface for MSAL through browser local or session storage. @@ -123,6 +124,29 @@ export class BrowserCacheManager extends CacheManager { async initialize(correlationId: string): Promise { await this.browserStorage.initialize(correlationId); + this.trackVersionChanges(correlationId); + } + + /** + * Tracks upgrades and downgrades for telemetry and debugging purposes + */ + private trackVersionChanges(correlationId: string): void { + const previousVersion = this.browserStorage.getItem( + StaticCacheKeys.VERSION + ); + if (previousVersion) { + this.logger.info( + `MSAL.js was last initialized by version: ${previousVersion}` + ); + this.performanceClient.addFields( + { previousLibraryVersion: previousVersion }, + correlationId + ); + } + + if (previousVersion !== version) { + this.browserStorage.setItem(StaticCacheKeys.VERSION, version); + } } /** diff --git a/lib/msal-browser/src/utils/BrowserConstants.ts b/lib/msal-browser/src/utils/BrowserConstants.ts index 686e8271b9..e292a77875 100644 --- a/lib/msal-browser/src/utils/BrowserConstants.ts +++ b/lib/msal-browser/src/utils/BrowserConstants.ts @@ -98,6 +98,7 @@ export type TemporaryCacheKeys = export const StaticCacheKeys = { ACCOUNT_KEYS: "msal.account.keys", TOKEN_KEYS: "msal.token.keys", + VERSION: "msal.version", } as const; export type StaticCacheKeys = (typeof StaticCacheKeys)[keyof typeof StaticCacheKeys]; diff --git a/lib/msal-browser/test/app/PublicClientApplication.spec.ts b/lib/msal-browser/test/app/PublicClientApplication.spec.ts index 1f39d37f4e..23fb73d935 100644 --- a/lib/msal-browser/test/app/PublicClientApplication.spec.ts +++ b/lib/msal-browser/test/app/PublicClientApplication.spec.ts @@ -30,7 +30,6 @@ import { CacheHelpers, CacheManager, ClientAuthErrorCodes, - CommonAuthorizationCodeRequest, CommonAuthorizationUrlRequest, CommonSilentFlowRequest, Constants, @@ -61,6 +60,7 @@ import { CacheLookupPolicy, InteractionType, NativeConstants, + StaticCacheKeys, TemporaryCacheKeys, WrapperSKU, } from "../../src/utils/BrowserConstants.js"; @@ -76,7 +76,6 @@ import { NavigationOptions } from "../../src/navigation/NavigationOptions.js"; import { EventMessage } from "../../src/event/EventMessage.js"; import { EventHandler } from "../../src/event/EventHandler.js"; import { SilentIframeClient } from "../../src/interaction_client/SilentIframeClient.js"; -import { base64Encode } from "../../src/encode/Base64Encode.js"; import { FetchClient } from "../../src/network/FetchClient.js"; import { BrowserAuthError, @@ -89,10 +88,6 @@ import { RedirectClient } from "../../src/interaction_client/RedirectClient.js"; import { PopupClient } from "../../src/interaction_client/PopupClient.js"; import { SilentCacheClient } from "../../src/interaction_client/SilentCacheClient.js"; import { SilentRefreshClient } from "../../src/interaction_client/SilentRefreshClient.js"; -import { - AuthorizationCodeRequest, - EndSessionRequest, -} from "../../src/index.js"; import { SilentAuthCodeClient } from "../../src/interaction_client/SilentAuthCodeClient.js"; import { BrowserCacheManager } from "../../src/cache/BrowserCacheManager.js"; import { NativeMessageHandler } from "../../src/broker/nativeBroker/NativeMessageHandler.js"; @@ -116,6 +111,9 @@ import { TestTimeUtils, } from "msal-test-utils"; import { INTERACTION_TYPE } from "../../src/utils/BrowserConstants.js"; +import { version } from "../../src/packageMetadata.js"; +import { AuthorizationCodeRequest } from "../../src/request/AuthorizationCodeRequest.js"; +import { EndSessionRequest } from "../../src/request/EndSessionRequest.js"; const cacheConfig = { temporaryCacheLocation: BrowserCacheLocation.SessionStorage, @@ -750,7 +748,10 @@ describe("PublicClientApplication.ts Class Unit Tests", () => { pca.handleRedirectPromise().catch((e) => { expect(e).toMatchObject(testError); expect(window.localStorage.length).toEqual(0); - expect(window.sessionStorage.length).toEqual(0); + expect(window.sessionStorage.length).toEqual(1); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); // Validate that the one item in sessionStorage is what we expect done(); }); }); @@ -2022,7 +2023,10 @@ describe("PublicClientApplication.ts Class Unit Tests", () => { expect(redirectClientSpy).toHaveBeenCalledTimes(1); expect(browserStorage.isInteractionInProgress()).toBe(false); expect(window.localStorage.length).toBe(0); - expect(window.sessionStorage.length).toBe(0); + expect(window.sessionStorage.length).toBe(1); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); // Validate that the one item in sessionStorage is what we expect done(); }); }); @@ -5398,7 +5402,10 @@ describe("PublicClientApplication.ts Class Unit Tests", () => { }); } catch (e) { // Test that error was cached for telemetry purposes and then thrown - expect(window.sessionStorage).toHaveLength(1); + expect(window.sessionStorage).toHaveLength(2); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); const failures = window.sessionStorage.getItem( `server-telemetry-${TEST_CONFIG.MSAL_CLIENT_ID}` ); @@ -5454,7 +5461,10 @@ describe("PublicClientApplication.ts Class Unit Tests", () => { await silentRequest3.catch(() => {}); // Test that error was cached for telemetry purposes and then thrown expect(atsSpy).toHaveBeenCalledTimes(1); - expect(window.sessionStorage).toHaveLength(1); + expect(window.sessionStorage).toHaveLength(2); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); const failures = window.sessionStorage.getItem( `server-telemetry-${TEST_CONFIG.MSAL_CLIENT_ID}` ); diff --git a/lib/msal-browser/test/cache/BrowserCacheManager.spec.ts b/lib/msal-browser/test/cache/BrowserCacheManager.spec.ts index 9c9355ef23..6ba0daed97 100644 --- a/lib/msal-browser/test/cache/BrowserCacheManager.spec.ts +++ b/lib/msal-browser/test/cache/BrowserCacheManager.spec.ts @@ -16,9 +16,7 @@ import { import { CacheOptions } from "../../src/config/Configuration.js"; import { Constants, - PersistentCacheKeys, CommonAuthorizationCodeRequest as AuthorizationCodeRequest, - ProtocolUtils, Logger, LogLevel, AuthenticationScheme, @@ -41,18 +39,18 @@ import { import { BrowserCacheLocation, INTERACTION_TYPE, - InteractionType, + StaticCacheKeys, TemporaryCacheKeys, } from "../../src/utils/BrowserConstants.js"; import { CryptoOps } from "../../src/crypto/CryptoOps.js"; import { DatabaseStorage } from "../../src/cache/DatabaseStorage.js"; import { BrowserCacheManager } from "../../src/cache/BrowserCacheManager.js"; -import { BrowserStateObject } from "../../src/utils/BrowserProtocolUtils.js"; import { base64Decode } from "../../src/encode/Base64Decode.js"; import { getDefaultPerformanceClient } from "../utils/TelemetryUtils.js"; import { BrowserPerformanceClient } from "../../src/telemetry/BrowserPerformanceClient.js"; import { CookieStorage } from "../../src/cache/CookieStorage.js"; import { EventHandler } from "../../src/event/EventHandler.js"; +import { version } from "../../src/packageMetadata.js"; describe("BrowserCacheManager tests", () => { let cacheConfig: Required; @@ -140,6 +138,85 @@ describe("BrowserCacheManager tests", () => { }); }); + describe("initialize", () => { + it("sets MSAL version in localStorage if not already set", async () => { + const browserCacheManager = new BrowserCacheManager( + TEST_CONFIG.MSAL_CLIENT_ID, + { + ...cacheConfig, + cacheLocation: BrowserCacheLocation.LocalStorage, + }, + browserCrypto, + logger, + new StubPerformanceClient(), + new EventHandler() + ); + await browserCacheManager.initialize(TEST_CONFIG.CORRELATION_ID); + expect(window.localStorage.getItem(StaticCacheKeys.VERSION)).toBe( + version + ); + }); + + it("sets MSAL version in localStorage if previous version doesn't match", async () => { + window.localStorage.setItem(StaticCacheKeys.VERSION, "1.0.0"); + const browserCacheManager = new BrowserCacheManager( + TEST_CONFIG.MSAL_CLIENT_ID, + { + ...cacheConfig, + cacheLocation: BrowserCacheLocation.LocalStorage, + }, + browserCrypto, + logger, + new StubPerformanceClient(), + new EventHandler() + ); + await browserCacheManager.initialize(TEST_CONFIG.CORRELATION_ID); + expect(window.localStorage.getItem(StaticCacheKeys.VERSION)).toBe( + version + ); + }); + + it("does not set MSAL version in localStorage if existing version already matches", async () => { + // First make sure the version gets set + const browserCacheManager1 = new BrowserCacheManager( + TEST_CONFIG.MSAL_CLIENT_ID, + { + ...cacheConfig, + cacheLocation: BrowserCacheLocation.LocalStorage, + }, + browserCrypto, + logger, + new StubPerformanceClient(), + new EventHandler() + ); + await browserCacheManager1.initialize(TEST_CONFIG.CORRELATION_ID); + expect(window.localStorage.getItem(StaticCacheKeys.VERSION)).toBe( + version + ); + + const setSpy = jest.spyOn(Storage.prototype, "setItem"); + const browserCacheManager2 = new BrowserCacheManager( + TEST_CONFIG.MSAL_CLIENT_ID, + { + ...cacheConfig, + cacheLocation: BrowserCacheLocation.LocalStorage, + }, + browserCrypto, + logger, + new StubPerformanceClient(), + new EventHandler() + ); + await browserCacheManager2.initialize(TEST_CONFIG.CORRELATION_ID); + expect(window.localStorage.getItem(StaticCacheKeys.VERSION)).toBe( + version + ); + expect(setSpy).not.toHaveBeenCalledWith( + StaticCacheKeys.VERSION, + expect.anything() + ); + }); + }); + describe("Interface functions", () => { let browserSessionStorage: BrowserCacheManager; let authority: Authority; @@ -251,6 +328,7 @@ describe("BrowserCacheManager tests", () => { expect(browserLocalStorage.getKeys()).toEqual([ "msal.account.keys", `msal.token.keys.${TEST_CONFIG.MSAL_CLIENT_ID}`, + StaticCacheKeys.VERSION, msalCacheKey, msalCacheKey2, ]); diff --git a/lib/msal-browser/test/interaction_client/PopupClient.spec.ts b/lib/msal-browser/test/interaction_client/PopupClient.spec.ts index e4b7aaf948..b7046a1a8c 100644 --- a/lib/msal-browser/test/interaction_client/PopupClient.spec.ts +++ b/lib/msal-browser/test/interaction_client/PopupClient.spec.ts @@ -43,6 +43,7 @@ import { TemporaryCacheKeys, ApiId, BrowserConstants, + StaticCacheKeys, } from "../../src/utils/BrowserConstants.js"; import * as BrowserCrypto from "../../src/crypto/BrowserCrypto.js"; import * as PkceGenerator from "../../src/crypto/PkceGenerator.js"; @@ -66,6 +67,7 @@ import * as BrowserUtils from "../../src/utils/BrowserUtils.js"; import { FetchClient } from "../../src/network/FetchClient.js"; import { TestTimeUtils } from "msal-test-utils"; import { PopupRequest } from "../../src/request/PopupRequest.js"; +import { version } from "../../src/packageMetadata.js"; const testPopupWondowDefaults = { height: BrowserConstants.POPUP_HEIGHT, @@ -814,7 +816,10 @@ describe("PopupClient", () => { }); } catch (e) { // Test that error was cached for telemetry purposes and then thrown - expect(window.sessionStorage).toHaveLength(1); + expect(window.sessionStorage).toHaveLength(2); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); const failures = window.sessionStorage.getItem( `server-telemetry-${TEST_CONFIG.MSAL_CLIENT_ID}` ); diff --git a/lib/msal-browser/test/interaction_client/RedirectClient.spec.ts b/lib/msal-browser/test/interaction_client/RedirectClient.spec.ts index 56e6a9075b..5d98d2ab66 100644 --- a/lib/msal-browser/test/interaction_client/RedirectClient.spec.ts +++ b/lib/msal-browser/test/interaction_client/RedirectClient.spec.ts @@ -57,6 +57,7 @@ import { ApiId, BrowserCacheLocation, InteractionType, + StaticCacheKeys, } from "../../src/utils/BrowserConstants.js"; import { base64Encode } from "../../src/encode/Base64Encode.js"; import { FetchClient } from "../../src/network/FetchClient.js"; @@ -87,6 +88,7 @@ import { TestTimeUtils, } from "msal-test-utils"; import { BrowserPerformanceClient } from "../../src/telemetry/BrowserPerformanceClient.js"; +import { version } from "../../src/packageMetadata.js"; const cacheConfig = { cacheLocation: BrowserCacheLocation.SessionStorage, @@ -205,7 +207,10 @@ describe("RedirectClient", () => { .then((response) => { expect(response).toBe(null); expect(window.localStorage.length).toEqual(0); - expect(window.sessionStorage.length).toEqual(0); + expect(window.sessionStorage.length).toEqual(1); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); // Validate that the one item in sessionStorage is what we expect done(); }); }); @@ -223,7 +228,10 @@ describe("RedirectClient", () => { .then((response) => { expect(response).toBe(null); expect(window.localStorage.length).toEqual(0); - expect(window.sessionStorage.length).toEqual(0); + expect(window.sessionStorage.length).toEqual(1); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); // Validate that the one item in sessionStorage is what we expect done(); }); }); @@ -241,7 +249,10 @@ describe("RedirectClient", () => { .then((response) => { expect(response).toBe(null); expect(window.localStorage.length).toEqual(0); - expect(window.sessionStorage.length).toEqual(0); + expect(window.sessionStorage.length).toEqual(1); + expect( + window.sessionStorage.getItem(StaticCacheKeys.VERSION) + ).toEqual(version); // Validate that the one item in sessionStorage is what we expect expect(window.location.hash).toEqual( TEST_HASHES.TEST_SUCCESS_CODE_HASH_POPUP ); diff --git a/lib/msal-common/src/telemetry/performance/PerformanceEvent.ts b/lib/msal-common/src/telemetry/performance/PerformanceEvent.ts index b2fa072096..da632d012b 100644 --- a/lib/msal-common/src/telemetry/performance/PerformanceEvent.ts +++ b/lib/msal-common/src/telemetry/performance/PerformanceEvent.ts @@ -703,6 +703,11 @@ export type PerformanceEvent = { */ libraryVersion: string; + /** + * Version of the library used last. Used to track upgrades and downgrades + */ + previousLibraryVersion?: string; + /** * Whether the response is from a native component (e.g., WAM) * From cfadad839eed5ede866cbcd39ca287762b1d5761 Mon Sep 17 00:00:00 2001 From: Thomas Norling Date: Fri, 9 May 2025 10:49:15 -0700 Subject: [PATCH 2/5] update e2e --- .../app/customizable-e2e-test/test/localStorage.spec.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/samples/msal-browser-samples/VanillaJSTestApp2.0/app/customizable-e2e-test/test/localStorage.spec.ts b/samples/msal-browser-samples/VanillaJSTestApp2.0/app/customizable-e2e-test/test/localStorage.spec.ts index b0509e00f0..5eef1e76d2 100644 --- a/samples/msal-browser-samples/VanillaJSTestApp2.0/app/customizable-e2e-test/test/localStorage.spec.ts +++ b/samples/msal-browser-samples/VanillaJSTestApp2.0/app/customizable-e2e-test/test/localStorage.spec.ts @@ -125,9 +125,9 @@ describe("LocalStorage Tests", function () { const sessionStorage = await sessionBrowserStorage.getWindowStorage(); const localStorage = await BrowserCache.getWindowStorage(); - expect(Object.keys(localStorage).length).toBeLessThanOrEqual(2); + expect(Object.keys(localStorage).length).toBeLessThanOrEqual(3); Object.keys(localStorage).forEach((key) => { - expect(key.startsWith("msal.token.keys") || key === "msal.account.keys").toBe(true); + expect(key.startsWith("msal.token.keys") || key === "msal.account.keys" || key == "msal.version").toBe(true); }); expect(Object.keys(sessionStorage).length).toEqual(0); }, ONE_SECOND_IN_MS); @@ -180,7 +180,7 @@ describe("LocalStorage Tests", function () { const sessionStorage = await sessionBrowserStorage.getWindowStorage(); const localStorage = await BrowserCache.getWindowStorage(); - expect(Object.keys(localStorage).length).toEqual(1); // Telemetry + expect(Object.keys(localStorage).length).toEqual(2); // Telemetry expect(Object.keys(sessionStorage).length).toEqual(0); }, ONE_SECOND_IN_MS); }); From bb50e4b2e652add69e17ce8e3db366844dc5379e Mon Sep 17 00:00:00 2001 From: Thomas Norling Date: Fri, 9 May 2025 10:50:59 -0700 Subject: [PATCH 3/5] apiExtractor --- lib/msal-common/apiReview/msal-common.api.md | 79 ++++++++++---------- 1 file changed, 40 insertions(+), 39 deletions(-) diff --git a/lib/msal-common/apiReview/msal-common.api.md b/lib/msal-common/apiReview/msal-common.api.md index 1266452976..550ba3a03f 100644 --- a/lib/msal-common/apiReview/msal-common.api.md +++ b/lib/msal-common/apiReview/msal-common.api.md @@ -3369,6 +3369,7 @@ export type PerformanceEvent = { serverErrorNo?: string; libraryName: string; libraryVersion: string; + previousLibraryVersion?: string; isNativeBroker?: boolean; requestId?: string; cacheLookupPolicy?: number | undefined; @@ -4675,44 +4676,44 @@ const X_MS_LIB_CAPABILITY = "x-ms-lib-capability"; // src/telemetry/performance/PerformanceEvent.ts:702:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag // src/telemetry/performance/PerformanceEvent.ts:702:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" // src/telemetry/performance/PerformanceEvent.ts:702:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:709:23 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:709:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:709:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:716:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:716:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:716:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:723:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:723:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:723:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:729:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:729:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:729:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:736:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:736:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:736:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:755:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:755:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:755:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:761:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:761:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:761:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:768:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:768:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:768:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:776:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:776:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:776:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:785:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:785:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:785:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:793:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:793:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:793:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:800:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:800:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:800:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration -// src/telemetry/performance/PerformanceEvent.ts:870:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag -// src/telemetry/performance/PerformanceEvent.ts:870:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" -// src/telemetry/performance/PerformanceEvent.ts:870:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:714:23 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:714:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:714:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:721:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:721:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:721:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:728:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:728:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:728:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:734:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:734:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:734:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:741:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:741:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:741:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:760:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:760:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:760:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:766:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:766:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:766:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:773:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:773:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:773:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:781:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:781:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:781:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:790:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:790:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:790:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:798:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:798:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:798:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:805:22 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:805:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:805:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration +// src/telemetry/performance/PerformanceEvent.ts:875:21 - (tsdoc-escape-right-brace) The "}" character should be escaped using a backslash to avoid confusion with a TSDoc inline tag +// src/telemetry/performance/PerformanceEvent.ts:875:14 - (tsdoc-malformed-inline-tag) Expecting a TSDoc tag starting with "{@" +// src/telemetry/performance/PerformanceEvent.ts:875:8 - (tsdoc-undefined-tag) The TSDoc tag "@type" is not defined in this configuration ``` From a72d9c4cecd40dbcf22d62ce84268a2a179b13f6 Mon Sep 17 00:00:00 2001 From: Thomas Norling Date: Fri, 9 May 2025 13:26:54 -0700 Subject: [PATCH 4/5] Change files --- ...-msal-browser-f198cf62-fc18-4c1b-99d3-2317f048ed7c.json | 7 +++++++ ...e-msal-common-5480aa2a-a988-4371-a778-2c3c77a7a30a.json | 7 +++++++ 2 files changed, 14 insertions(+) create mode 100644 change/@azure-msal-browser-f198cf62-fc18-4c1b-99d3-2317f048ed7c.json create mode 100644 change/@azure-msal-common-5480aa2a-a988-4371-a778-2c3c77a7a30a.json diff --git a/change/@azure-msal-browser-f198cf62-fc18-4c1b-99d3-2317f048ed7c.json b/change/@azure-msal-browser-f198cf62-fc18-4c1b-99d3-2317f048ed7c.json new file mode 100644 index 0000000000..0613840531 --- /dev/null +++ b/change/@azure-msal-browser-f198cf62-fc18-4c1b-99d3-2317f048ed7c.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Upgrade/rollback telemetry #7738", + "packageName": "@azure/msal-browser", + "email": "thomas.norling@microsoft.com", + "dependentChangeType": "patch" +} diff --git a/change/@azure-msal-common-5480aa2a-a988-4371-a778-2c3c77a7a30a.json b/change/@azure-msal-common-5480aa2a-a988-4371-a778-2c3c77a7a30a.json new file mode 100644 index 0000000000..133d620c40 --- /dev/null +++ b/change/@azure-msal-common-5480aa2a-a988-4371-a778-2c3c77a7a30a.json @@ -0,0 +1,7 @@ +{ + "type": "patch", + "comment": "Upgrade/rollback telemetry #7738", + "packageName": "@azure/msal-common", + "email": "thomas.norling@microsoft.com", + "dependentChangeType": "patch" +} From 7709d14ee54e0af022b6504c6391a52b7a3221d2 Mon Sep 17 00:00:00 2001 From: Thomas Norling Date: Thu, 15 May 2025 14:48:44 -0700 Subject: [PATCH 5/5] Fix test import --- lib/msal-browser/test/app/PublicClientApplication.spec.ts | 1 - 1 file changed, 1 deletion(-) diff --git a/lib/msal-browser/test/app/PublicClientApplication.spec.ts b/lib/msal-browser/test/app/PublicClientApplication.spec.ts index 74e632ab17..c7d30b8c65 100644 --- a/lib/msal-browser/test/app/PublicClientApplication.spec.ts +++ b/lib/msal-browser/test/app/PublicClientApplication.spec.ts @@ -59,7 +59,6 @@ import { BrowserConstants, CacheLookupPolicy, InteractionType, - NativeConstants, StaticCacheKeys, PlatformAuthConstants, TemporaryCacheKeys,