@azure/msal-react
Advanced tools
Comparing version 1.5.7 to 2.0.0-alpha.0
import React, { PropsWithChildren } from "react"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
export declare type AuthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>; | ||
export type AuthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>; | ||
/** | ||
@@ -8,2 +8,2 @@ * Renders child components if user is authenticated | ||
*/ | ||
export declare function AuthenticatedTemplate({ username, homeAccountId, localAccountId, children }: AuthenticatedTemplateProps): React.ReactElement | null; | ||
export declare function AuthenticatedTemplate({ username, homeAccountId, localAccountId, children, }: AuthenticatedTemplateProps): React.ReactElement | null; |
@@ -6,3 +6,3 @@ import React, { PropsWithChildren } from "react"; | ||
import { IMsalContext } from "../MsalContext"; | ||
export declare type MsalAuthenticationProps = PropsWithChildren<AccountIdentifiers & { | ||
export type MsalAuthenticationProps = PropsWithChildren<AccountIdentifiers & { | ||
interactionType: InteractionType; | ||
@@ -17,2 +17,2 @@ authenticationRequest?: PopupRequest | RedirectRequest | SsoSilentRequest; | ||
*/ | ||
export declare function MsalAuthenticationTemplate({ interactionType, username, homeAccountId, localAccountId, authenticationRequest, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, children }: MsalAuthenticationProps): React.ReactElement | null; | ||
export declare function MsalAuthenticationTemplate({ interactionType, username, homeAccountId, localAccountId, authenticationRequest, loadingComponent: LoadingComponent, errorComponent: ErrorComponent, children, }: MsalAuthenticationProps): React.ReactElement | null; |
import React, { PropsWithChildren } from "react"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
export declare type UnauthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>; | ||
export type UnauthenticatedTemplateProps = PropsWithChildren<AccountIdentifiers>; | ||
/** | ||
@@ -8,2 +8,2 @@ * Renders child components if user is unauthenticated | ||
*/ | ||
export declare function UnauthenticatedTemplate({ username, homeAccountId, localAccountId, children }: UnauthenticatedTemplateProps): React.ReactElement | null; | ||
export declare function UnauthenticatedTemplate({ username, homeAccountId, localAccountId, children, }: UnauthenticatedTemplateProps): React.ReactElement | null; |
import React from "react"; | ||
import { IMsalContext } from "../MsalContext"; | ||
import { Subtract } from "../utils/utilities"; | ||
export declare type WithMsalProps = { | ||
export type WithMsalProps = { | ||
msalContext: IMsalContext; | ||
@@ -11,2 +11,2 @@ }; | ||
*/ | ||
export declare const withMsal: <P extends WithMsalProps>(Component: React.ComponentType<P>) => React.FunctionComponent<Pick<P, keyof P extends "msalContext" ? never : keyof P>>; | ||
export declare const withMsal: <P extends WithMsalProps>(Component: React.ComponentType<P>) => React.FunctionComponent<Subtract<P, WithMsalProps>>; |
import { PopupRequest, RedirectRequest, SsoSilentRequest, InteractionType, AuthenticationResult, AuthError, SilentRequest } from "@azure/msal-browser"; | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
export declare type MsalAuthenticationResult = { | ||
export type MsalAuthenticationResult = { | ||
login: (callbackInteractionType?: InteractionType | undefined, callbackRequest?: PopupRequest | RedirectRequest | SilentRequest) => Promise<AuthenticationResult | null>; | ||
@@ -5,0 +5,0 @@ acquireToken: (callbackInteractionType?: InteractionType | undefined, callbackRequest?: SilentRequest | undefined) => Promise<AuthenticationResult | null>; |
@@ -1,8 +0,14 @@ | ||
'use strict' | ||
if (process.env.NODE_ENV === 'production') { | ||
module.exports = require('./msal-react.cjs.production.min.js') | ||
} else { | ||
module.exports = require('./msal-react.cjs.development.js') | ||
} | ||
/*! @azure/msal-react v2.0.0-alpha.0 2023-05-03 */ | ||
'use strict'; | ||
export { MsalConsumer, MsalContext } from './MsalContext.js'; | ||
export { MsalProvider } from './MsalProvider.js'; | ||
export { AuthenticatedTemplate } from './components/AuthenticatedTemplate.js'; | ||
export { UnauthenticatedTemplate } from './components/UnauthenticatedTemplate.js'; | ||
export { MsalAuthenticationTemplate } from './components/MsalAuthenticationTemplate.js'; | ||
export { withMsal } from './components/withMsal.js'; | ||
export { useMsal } from './hooks/useMsal.js'; | ||
export { useAccount } from './hooks/useAccount.js'; | ||
export { useIsAuthenticated } from './hooks/useIsAuthenticated.js'; | ||
export { useMsalAuthentication } from './hooks/useMsalAuthentication.js'; | ||
export { version } from './packageMetadata.js'; | ||
//# sourceMappingURL=index.js.map |
import React, { PropsWithChildren } from "react"; | ||
import { IPublicClientApplication } from "@azure/msal-browser"; | ||
export declare type MsalProviderProps = PropsWithChildren<{ | ||
export type MsalProviderProps = PropsWithChildren<{ | ||
instance: IPublicClientApplication; | ||
@@ -9,2 +9,2 @@ }>; | ||
*/ | ||
export declare function MsalProvider({ instance, children }: MsalProviderProps): React.ReactElement; | ||
export declare function MsalProvider({ instance, children, }: MsalProviderProps): React.ReactElement; |
export declare const name = "@azure/msal-react"; | ||
export declare const version = "1.5.7"; | ||
export declare const version = "2.0.0-alpha.0"; |
import { AccountInfo } from "@azure/msal-browser"; | ||
export declare type AccountIdentifiers = Partial<Pick<AccountInfo, "homeAccountId" | "localAccountId" | "username">>; | ||
export type AccountIdentifiers = Partial<Pick<AccountInfo, "homeAccountId" | "localAccountId" | "username">>; |
/// <reference types="react" /> | ||
import { AccountIdentifiers } from "../types/AccountIdentifiers"; | ||
import { AccountInfo } from "@azure/msal-browser"; | ||
declare type FaaCFunction = <T>(args: T) => React.ReactNode; | ||
type FaaCFunction = <T>(args: T) => React.ReactNode; | ||
export declare function getChildrenOrFunction<T>(children: React.ReactNode | FaaCFunction, args: T): React.ReactNode; | ||
declare type SetDifference<A, B> = A extends B ? never : A; | ||
declare type SetComplement<A, A1 extends A> = SetDifference<A, A1>; | ||
export declare type Subtract<T extends T1, T1 extends object> = Pick<T, SetComplement<keyof T, keyof T1>>; | ||
type SetDifference<A, B> = A extends B ? never : A; | ||
type SetComplement<A, A1 extends A> = SetDifference<A, A1>; | ||
export type Subtract<T extends T1, T1 extends object> = Pick<T, SetComplement<keyof T, keyof T1>>; | ||
/** | ||
@@ -10,0 +10,0 @@ * Helper function to determine whether 2 arrays are equal |
{ | ||
"name": "@azure/msal-react", | ||
"version": "1.5.7", | ||
"version": "2.0.0-alpha.0", | ||
"author": { | ||
@@ -24,13 +24,9 @@ "name": "Microsoft", | ||
"beachball": { | ||
"disallowedChangeTypes": [ | ||
"major" | ||
] | ||
"disallowedChangeTypes": [] | ||
}, | ||
"scripts": { | ||
"start": "tsdx watch", | ||
"build": "tsdx build --tsconfig ./tsconfig.build.json", | ||
"build:modules:watch": "tsdx watch --verbose --tsconfig ./tsconfig.build.json", | ||
"test": "tsdx test .*MsalAuthenticationTemplate.spec.*", | ||
"test:watch": "tsdx test .*.spec.* --watch", | ||
"test:coverage": "tsdx test .*.spec.* --coverage", | ||
"build": "rollup -c --strictDeprecations --bundleConfigAsCjs", | ||
"build:modules:watch": "rollup -cw --bundleConfigAsCjs", | ||
"test": "jest", | ||
"test:coverage": "jest --coverage", | ||
"lint": "cd ../../ && npm run lint:react", | ||
@@ -42,6 +38,8 @@ "lint:fix": "npm run lint -- -- --fix", | ||
"link:localDeps": "npx lerna bootstrap --scope @azure/msal-common --scope @azure/msal-browser --scope @azure/msal-react", | ||
"prepack": "npm run build:all" | ||
"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" | ||
}, | ||
"peerDependencies": { | ||
"@azure/msal-browser": "^2.36.0", | ||
"@azure/msal-browser": "^3.0.0-alpha.0", | ||
"react": "^16.8.0 || ^17 || ^18" | ||
@@ -51,3 +49,3 @@ }, | ||
"devDependencies": { | ||
"@azure/msal-browser": "^2.37.0", | ||
"@azure/msal-browser": "^3.0.0-alpha.0", | ||
"@testing-library/jest-dom": "^5.11.5", | ||
@@ -59,10 +57,13 @@ "@testing-library/react": "^13.4.0", | ||
"jest": "^27.0.4", | ||
"jest-environment-jsdom-fifteen": "^1.0.2", | ||
"prettier": "2.8.7", | ||
"react": "^18.2.0", | ||
"react-dom": "^18.2.0", | ||
"ts-jest": "^27.0.2", | ||
"tsdx": "^0.14.1", | ||
"tslib": "^2.0.0", | ||
"typescript": "^3.9.7" | ||
"typescript": "^4.9.5" | ||
}, | ||
"dependencies": { | ||
"@rollup/plugin-typescript": "^11.1.0", | ||
"rollup": "^3.20.2" | ||
} | ||
} | ||
} |
No v1
QualityPackage is not semver >=1. This means it is not stable and does not support ^ ranges.
Found 1 instance in 1 package
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
Environment variable access
Supply chain riskPackage accesses environment variables, which may be a sign of credential stuffing or data theft.
Found 1 instance in 1 package
258655
13
52
2065
0
0
4
3
+ Addedrollup@^3.20.2
+ Added@azure/msal-browser@3.28.1(transitive)
+ Added@azure/msal-common@14.16.0(transitive)
+ Added@rollup/plugin-typescript@11.1.6(transitive)
+ Added@rollup/pluginutils@5.1.4(transitive)
+ Added@types/estree@1.0.6(transitive)
+ Addedestree-walker@2.0.2(transitive)
+ Addedfsevents@2.3.3(transitive)
+ Addedfunction-bind@1.1.2(transitive)
+ Addedhasown@2.0.2(transitive)
+ Addedis-core-module@2.16.1(transitive)
+ Addedpath-parse@1.0.7(transitive)
+ Addedpicomatch@4.0.2(transitive)
+ Addedresolve@1.22.10(transitive)
+ Addedrollup@3.29.5(transitive)
+ Addedsupports-preserve-symlinks-flag@1.0.0(transitive)
+ Addedtypescript@5.7.3(transitive)
- Removed@azure/msal-browser@2.39.0(transitive)
- Removed@azure/msal-common@13.3.3(transitive)