Skip to content
Closed
Show file tree
Hide file tree
Changes from all 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
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "patch",
"comment": "Bundle msal-common into msal-browser #5932",
"packageName": "@azure/msal-browser",
"email": "hemoral@microsoft.com",
"dependentChangeType": "patch"
}
2 changes: 1 addition & 1 deletion lib/msal-browser/jest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@ module.exports = {
url: "https://localhost:8081/index.html"
},
collectCoverageFrom: ["src/**/*.ts"],
coverageReporters: [["lcov", {"projectRoot": "../../"}]]
coverageReporters: [["lcov", { "projectRoot": "../../" }]]
};
45 changes: 38 additions & 7 deletions lib/msal-browser/package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

8 changes: 5 additions & 3 deletions lib/msal-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@
"build:modules": "rollup -c --strictDeprecations --bundleConfigAsCjs",
"build:modules:watch": "rollup -cw --bundleConfigAsCjs",
"build": "npm run clean && npm run build:modules",
"link:localDeps": "npx lerna bootstrap --scope @azure/msal-common --scope @azure/msal-browser",
"prepack": "npm run build:all",
"format:check": "npx prettier --ignore-path .gitignore --check src test",
"format:fix": "npx prettier --ignore-path .gitignore --write src test"
Expand Down Expand Up @@ -91,6 +90,9 @@
"typescript": "^4.9.5"
},
"dependencies": {
"@azure/msal-common": "^12.0.0"
}
"@azure/msal-common": "file:../msal-common"
},
"bundledDependencies": [
"@azure/msal-common"
]
}
13 changes: 9 additions & 4 deletions lib/msal-browser/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default [
// for es build
input: "src/index.ts",
output: {
dir: "dist",
dir: "lib",
preserveModules: true,
preserveModulesRoot: "src",
format: "es",
Expand All @@ -35,7 +35,10 @@ export default [
plugins: [
typescript({
typescript: require("typescript"),
tsconfig: "tsconfig.build.json"
tsconfig: "tsconfig.build.json",
compilerOptions: {
outDir: "./lib"
}
})
]
},
Expand All @@ -55,6 +58,7 @@ export default [
name: "msal",
banner: fileHeader,
sourcemap: true,
inlineDynamicImports: true
}
],
plugins: [
Expand All @@ -66,7 +70,7 @@ export default [
typescript: require("typescript"),
tsconfig: "tsconfig.build.json",
sourceMap: true,
compilerOptions: {outDir: "./lib"}
compilerOptions: { outDir: "./lib" }
})
]
},
Expand All @@ -80,6 +84,7 @@ export default [
name: "msal",
banner: useStrictHeader,
sourcemap: false,
inlineDynamicImports: true
}
],
plugins: [
Expand All @@ -91,7 +96,7 @@ export default [
typescript: require("typescript"),
tsconfig: "tsconfig.build.json",
sourceMap: false,
compilerOptions: {outDir: "./lib"}
compilerOptions: { outDir: "./lib" }
}),
terser({
output: {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@

import { stubbedPublicClientApplication } from "../../src/app/IPublicClientApplication";
import { BrowserConfigurationAuthErrorMessage } from "../../src/error/BrowserConfigurationAuthError";
import { BrowserAuthError } from "../../lib";
import { BrowserAuthError } from "../../src/error/BrowserAuthError";

describe("IPublicClientApplication.ts Class Unit Tests", () => {
describe("stubbedPublicClientApplication tests", () => {
Expand Down
2 changes: 1 addition & 1 deletion lib/msal-browser/test/utils/BrowserUtils.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ import { TEST_URIS } from "./StringConstants";
import { XhrClient } from "../../src/network/XhrClient";
import { FetchClient } from "../../src/network/FetchClient";
import { BrowserAuthErrorMessage, InteractionType } from "../../src";
import { BrowserAuthError } from "../../lib";
import { BrowserAuthError } from "../../src/error/BrowserAuthError";

describe("BrowserUtils.ts Function Unit Tests", () => {
const oldWindow: Window & typeof globalThis = window;
Expand Down
3 changes: 2 additions & 1 deletion lib/msal-browser/tsconfig.base.json
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{
"extends": "../../tsconfig.json",
"compilerOptions": {
"suppressImplicitAnyIndexErrors": true,
"sourceMap": true,
Expand All @@ -13,4 +14,4 @@
},
"compileOnSave": false,
"buildOnSave": false
}
}
6 changes: 4 additions & 2 deletions lib/msal-browser/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
{
"extends": "./tsconfig.json",
"compilerOptions": {
"rootDir": "./src"
"rootDir": "./src",
},
"include": ["src"]
"include": [
"src"
]
}
2 changes: 1 addition & 1 deletion lib/msal-browser/tsconfig.build.tsbuildinfo

Large diffs are not rendered by default.

18 changes: 15 additions & 3 deletions lib/msal-browser/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -13,19 +13,31 @@
"allowUnusedLabels": false,
"noImplicitReturns": true,
"esModuleInterop": true,
"resolveJsonModule": true
"resolveJsonModule": true,
"strictPropertyInitialization": false,
"rootDir": "./",
"baseUrl": "./",
"paths": {
"*": [
"src/*",
"node_modules/"
]
}
},
"references": [
{
"path": "../msal-common"
}
],
"include": ["src", "test"],
"include": [
"src",
"test"
],
"exclude": [
"node_modules"
],
"types": [
"node",
"jest"
]
}
}
2 changes: 1 addition & 1 deletion samples/e2eTestUtils/BrowserCacheTestUtils.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import * as puppeteer from "puppeteer";

import { LabConfig } from "./LabConfig";
import { Configuration } from "../../lib/msal-browser";
import { Configuration } from "../../lib/msal-browser/src/config/Configuration";
import { ServerTelemetryEntity } from "../../lib/msal-common";

export type tokenMap = {
Expand Down
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"msalConfig":{"auth":{"clientId":"b5c2e510-4a17-4feb-b219-e55aa5b74144","authority":"https://login.microsoftonline.com/common"},"cache":{"cacheLocation":"memoryStorage","storeAuthStateInCookie":true},"system":{"allowNativeBroker":false}},"request":{"scopes":["User.Read"]}}
{"msalConfig":{"auth":{"clientId":"4c837770-7a2b-471e-aafa-3328d04a23b1","authority":"https://msidlabb2c.b2clogin.com/msidlabb2c.onmicrosoft.com/B2C_1_SISOPolicy/","knownAuthorities":["msidlabb2c.b2clogin.com"]},"cache":{"cacheLocation":"sessionStorage","storeAuthStateInCookie":false},"system":{"allowNativeBroker":false}},"request":{"scopes":["https://msidlabb2c.onmicrosoft.com/4c837770-7a2b-471e-aafa-3328d04a23b1/read"]}}