Skip to content
Merged
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
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -278,6 +278,7 @@ ref/

# Typescript & Rollup
tsconfig.build.tsbuildinfo
types/

# MSAL Node Cache Files
temp-cache.json
Expand Down
10 changes: 5 additions & 5 deletions api-extractor-base.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"$schema": "https://developer.microsoft.com/json-schemas/api-extractor/v7/api-extractor.schema.json",
"mainEntryPointFilePath": "<projectFolder>/dist/index.d.ts",
"mainEntryPointFilePath": "<projectFolder>/types/index.d.ts",
"newlineKind": "lf",
"apiReport": {
"enabled": true,
Expand All @@ -16,8 +16,8 @@
"messages": {
"compilerMessageReporting": {
"default": {
"logLevel": "warning",
"addToApiReportFile": true
"logLevel": "warning",
"addToApiReportFile": true
}
},
"extractorMessageReporting": {
Expand All @@ -40,8 +40,8 @@
"tsdocMessageReporting": {
"default": {
"logLevel": "warning",
"addToApiReportFile":true
"addToApiReportFile": true
}
}
}
}
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Remove duplicate typings in the build output [#8557](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8557)",
"packageName": "@azure/msal-browser",
"email": "thomas.norling@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Remove duplicate typings in the build output [#8557](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8557)",
"packageName": "@azure/msal-common",
"email": "thomas.norling@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Remove duplicate typings in the build output [#8557](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8557)",
"packageName": "@azure/msal-node",
"email": "thomas.norling@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Remove duplicate typings in the build output [#8557](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8557)",
"packageName": "@azure/msal-node-extensions",
"email": "thomas.norling@microsoft.com",
"dependentChangeType": "patch"
}
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
{
"type": "minor",
"comment": "Remove duplicate typings in the build output [#8557](https://github.com/AzureAD/microsoft-authentication-library-for-js/pull/8557)",
"packageName": "@azure/msal-react",
"email": "thomas.norling@microsoft.com",
"dependentChangeType": "patch"
}
14 changes: 8 additions & 6 deletions extensions/msal-node-extensions/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,16 +8,16 @@
"license": "MIT",
"type": "module",
"module": "dist/index.mjs",
"types": "dist/index.d.ts",
"types": "types/index.d.ts",
"main": "lib/msal-node-extensions.cjs",
"exports": {
".": {
"import": {
"types": "./dist/index.d.ts",
"types": "./types/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./lib/types/index.d.ts",
"types": "./types/index.d.cts",
"default": "./lib/msal-node-extensions.cjs"
}
},
Expand All @@ -33,6 +33,7 @@
],
"files": [
"dist",
"types",
"bin",
"lib"
],
Expand All @@ -42,9 +43,10 @@
"scripts": {
"compile": "node-gyp rebuild",
"install": "exit 0",
"clean": "shx rm -rf dist bin lib",
"build": "npm run clean && npm run build:js && npm run build:binaries",
"clean": "shx rm -rf dist types bin lib",
"build": "npm run clean && npm run build:js && npm run build:types && npm run build:binaries",
"build:js": "rollup -c --strictDeprecations --bundleConfigAsCjs",
"build:types": "tsc -p tsconfig.build.types.json",
"build:binaries": "node ./scripts/buildBinaries.cjs",
"build:all": "cd ../.. && npm run build --workspace=@azure/msal-common --workspace=@azure/msal-node-extensions",
"test": "jest",
Expand Down Expand Up @@ -88,4 +90,4 @@
"tslib": "^2.0.0",
"typescript": "^4.9.5"
}
}
}
16 changes: 14 additions & 2 deletions extensions/msal-node-extensions/rollup.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@
import { nodeResolve } from "@rollup/plugin-node-resolve";
import typescript from "@rollup/plugin-typescript";
import pkg from "./package.json";
import { createPackageJson } from "rollup-msal";
import { createCjsTypeShims, createPackageJson } from "rollup-msal";
import path from "path";

const libraryHeader = `/*! ${pkg.name} v${pkg.version} ${new Date().toISOString().split("T")[0]} */`;
const useStrictHeader = "'use strict';";
Expand Down Expand Up @@ -36,7 +37,9 @@ export default [
typescript({
typescript: require("typescript"),
tsconfig: "tsconfig.build.json",
compilerOptions: { outDir: "lib/types" }
compilerOptions: {
outDir: "./lib"
}
}),
nodeResolve({
preferBuiltins: true
Expand Down Expand Up @@ -69,6 +72,15 @@ export default [
typescript: require("typescript"),
tsconfig: "tsconfig.build.json"
}),
createCjsTypeShims({
packageRoot: __dirname,
shims: [
{
filePath: path.join("types", "index.d.cts"),
target: "./index.js"
Comment thread
tnorling marked this conversation as resolved.
}
]
}),
nodeResolve({
preferBuiltins: true
})
Expand Down
4 changes: 3 additions & 1 deletion extensions/msal-node-extensions/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",
"declaration": false,
"declarationMap": false
},
"include": [
"src"
Expand Down
13 changes: 13 additions & 0 deletions extensions/msal-node-extensions/tsconfig.build.types.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
{
"extends": "./tsconfig.build.json",
"compilerOptions": {
"outDir": "./types",
"declaration": true,
"declarationMap": true,
"emitDeclarationOnly": true,
"noEmit": false
},
"include": [
"src"
]
}
26 changes: 14 additions & 12 deletions lib/msal-browser/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,35 +25,35 @@
"sideEffects": false,
"main": "./lib/msal-browser.cjs",
"module": "./dist/index.mjs",
"types": "./dist/index.d.ts",
"types": "./types/index.d.ts",
"exports": {
"./custom-auth": {
"import": {
"types": "./dist/custom-auth-path/custom_auth/index.d.ts",
"default": "./dist/custom-auth-path/custom_auth/index.mjs"
"types": "./types/custom_auth/index.d.ts",
"default": "./dist/custom_auth/index.mjs"
},
"require": {
"types": "./lib/custom-auth-path/types/custom_auth/index.d.ts",
"types": "./types/custom_auth/index.d.cts",
"default": "./lib/custom-auth-path/msal-custom-auth.cjs"
}
},
"./redirect-bridge": {
"import": {
"types": "./dist/redirect-bridge/redirect_bridge/index.d.ts",
"default": "./dist/redirect-bridge/redirect_bridge/index.mjs"
"types": "./types/redirect_bridge/index.d.ts",
"default": "./dist/redirect_bridge/index.mjs"
},
"require": {
"types": "./lib/redirect-bridge/types/redirect_bridge/index.d.ts",
"types": "./types/redirect_bridge/index.d.cts",
"default": "./lib/redirect-bridge/msal-redirect-bridge.cjs"
}
},
".": {
"import": {
"types": "./dist/index.d.ts",
"types": "./types/index.d.ts",
"default": "./dist/index.mjs"
},
"require": {
"types": "./lib/types/index.d.ts",
"types": "./types/index.d.cts",
"default": "./lib/msal-browser.cjs"
}
},
Expand All @@ -72,11 +72,12 @@
},
"files": [
"dist",
"types",
"lib",
"src"
],
"scripts": {
"clean": "shx rm -rf dist lib",
"clean": "shx rm -rf dist types lib",
"clean:coverage": "rimraf ../../.nyc_output/*",
"lint": "eslint src --ext .ts",
"lint:fix": "npm run lint -- --fix",
Expand All @@ -85,7 +86,8 @@
"test:coverage:only": "npm run clean:coverage && npm run test:coverage",
"build:all": "cd ../.. && npm run build --workspace=@azure/msal-common --workspace=@azure/msal-browser",
"build:all:debug": "cd ../.. && cross-env MSAL_MINIFY_LOGS=false npm run build --workspace=@azure/msal-common --workspace=@azure/msal-browser",
"build:modules": "rollup -c --strictDeprecations --bundleConfigAsCjs",
"build:modules": "rollup -c --strictDeprecations --bundleConfigAsCjs && npm run build:types",
"build:types": "tsc -p tsconfig.build.types.json",
"build:modules:watch": "rollup -cw --bundleConfigAsCjs",
"build": "npm run clean && npm run build:modules",
"build:debug": "npm run clean && cross-env MSAL_MINIFY_LOGS=false npm run build:modules",
Expand Down Expand Up @@ -130,4 +132,4 @@
"dependencies": {
"@azure/msal-common": "16.5.2"
}
}
}
Loading
Loading