diff --git a/.changeset/four-ghosts-sniff.md b/.changeset/four-ghosts-sniff.md new file mode 100644 index 0000000000..9da0ab15ed --- /dev/null +++ b/.changeset/four-ghosts-sniff.md @@ -0,0 +1,5 @@ +--- +'@backstage/core-plugin-api': minor +--- + +Removed the deprecated `OldIconComponent` type. diff --git a/.changeset/twelve-bears-fail.md b/.changeset/twelve-bears-fail.md new file mode 100644 index 0000000000..6112f5a980 --- /dev/null +++ b/.changeset/twelve-bears-fail.md @@ -0,0 +1,6 @@ +--- +'@backstage/core-app-api': patch +'@backstage/core-plugin-api': patch +--- + +Removed direct and transitive MUI dependencies. diff --git a/packages/core-app-api/package.json b/packages/core-app-api/package.json index fe9c419d5d..de7477771f 100644 --- a/packages/core-app-api/package.json +++ b/packages/core-app-api/package.json @@ -29,15 +29,10 @@ "clean": "backstage-cli clean" }, "dependencies": { - "@backstage/app-defaults": "^0.1.3", - "@backstage/core-components": "^0.8.3", "@backstage/config": "^0.1.11", "@backstage/core-plugin-api": "^0.4.1", - "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", "@backstage/version-bridge": "^0.1.1", - "@material-ui/core": "^4.12.2", - "@material-ui/icons": "^4.9.1", "@types/prop-types": "^15.7.3", "prop-types": "^15.7.2", "react-router-dom": "6.0.0-beta.0", diff --git a/packages/core-app-api/src/app/AppManager.tsx b/packages/core-app-api/src/app/AppManager.tsx index ef5fe43b8b..d52e656559 100644 --- a/packages/core-app-api/src/app/AppManager.tsx +++ b/packages/core-app-api/src/app/AppManager.tsx @@ -49,7 +49,6 @@ import { SubRouteRef, ExternalRouteRef, } from '@backstage/core-plugin-api'; -import { UserIdentity } from '@backstage/core-components'; import { ApiFactoryRegistry, ApiResolver } from '../apis/system'; import { childDiscoverer, @@ -360,7 +359,25 @@ export class AppManager implements BackstageApp { // If the app hasn't configured a sign-in page, we just continue as guest. if (!SignInPageComponent) { - this.appIdentityProxy.setTarget(UserIdentity.createGuest()); + this.appIdentityProxy.setTarget({ + getUserId: () => 'guest', + getIdToken: async () => undefined, + getProfile: () => ({ + email: 'guest@example.com', + displayName: 'Guest', + }), + getProfileInfo: async () => ({ + email: 'guest@example.com', + displayName: 'Guest', + }), + getBackstageIdentity: async () => ({ + type: 'user', + userEntityRef: 'user:default/guest', + ownershipEntityRefs: ['user:default/guest'], + }), + getCredentials: async () => ({}), + signOut: async () => {}, + }); return ( diff --git a/packages/core-plugin-api/api-report.md b/packages/core-plugin-api/api-report.md index 7a2fb95be8..de25d24660 100644 --- a/packages/core-plugin-api/api-report.md +++ b/packages/core-plugin-api/api-report.md @@ -16,7 +16,6 @@ import { ProfileInfo as ProfileInfo_2 } from '@backstage/core-plugin-api'; import { default as React_2 } from 'react'; import { ReactElement } from 'react'; import { ReactNode } from 'react'; -import { SvgIconProps } from '@material-ui/core'; // @public export type AlertApi = { @@ -616,9 +615,6 @@ export const oktaAuthApiRef: ApiRef< SessionApi >; -// @public @deprecated -export type OldIconComponent = ComponentType; - // @alpha export const oneloginAuthApiRef: ApiRef< OAuthApi & diff --git a/packages/core-plugin-api/package.json b/packages/core-plugin-api/package.json index b7c9189394..d284d60c6b 100644 --- a/packages/core-plugin-api/package.json +++ b/packages/core-plugin-api/package.json @@ -30,10 +30,8 @@ }, "dependencies": { "@backstage/config": "^0.1.11", - "@backstage/theme": "^0.2.14", "@backstage/types": "^0.1.1", "@backstage/version-bridge": "^0.1.1", - "@material-ui/core": "^4.12.2", "history": "^5.0.0", "prop-types": "^15.7.2", "react-router-dom": "6.0.0-beta.0", diff --git a/packages/core-plugin-api/src/icons/index.ts b/packages/core-plugin-api/src/icons/index.ts index de79dd08d3..9c9e45e54c 100644 --- a/packages/core-plugin-api/src/icons/index.ts +++ b/packages/core-plugin-api/src/icons/index.ts @@ -14,4 +14,4 @@ * limitations under the License. */ -export type { IconComponent, OldIconComponent } from './types'; +export type { IconComponent } from './types'; diff --git a/packages/core-plugin-api/src/icons/types.ts b/packages/core-plugin-api/src/icons/types.ts index 849561f9c0..d7dca27bf9 100644 --- a/packages/core-plugin-api/src/icons/types.ts +++ b/packages/core-plugin-api/src/icons/types.ts @@ -15,7 +15,6 @@ */ import { ComponentType } from 'react'; -import { SvgIconProps } from '@material-ui/core'; /** * IconComponent is the common icon type used throughout Backstage when @@ -36,13 +35,3 @@ import { SvgIconProps } from '@material-ui/core'; export type IconComponent = ComponentType<{ fontSize?: 'default' | 'small' | 'large'; }>; - -/** - * This exists for backwards compatibility with the old core package. - * It's used in some parts of this package in order to smooth out the - * migration, but it is not exported. - * - * @public - * @deprecated This type will be removed, use {@link IconComponent} instead. - */ -export type OldIconComponent = ComponentType; diff --git a/plugins/catalog-react/api-report.md b/plugins/catalog-react/api-report.md index 673d9256f1..66a496daff 100644 --- a/plugins/catalog-react/api-report.md +++ b/plugins/catalog-react/api-report.md @@ -310,7 +310,16 @@ export const EntityRefLink: React_2.ForwardRefExoticComponent< | 'children' | 'key' | 'id' - | 'classes' + | 'variant' + | 'state' + | 'href' + | 'download' + | 'hrefLang' + | 'ping' + | 'rel' + | 'target' + | 'type' + | 'referrerPolicy' | 'defaultChecked' | 'defaultValue' | 'suppressContentEditableWarning' @@ -556,22 +565,13 @@ export const EntityRefLink: React_2.ForwardRefExoticComponent< | 'onTransitionEnd' | 'onTransitionEndCapture' | 'component' - | 'variant' + | 'classes' | 'innerRef' - | 'download' - | 'href' - | 'hrefLang' - | 'ping' - | 'rel' - | 'target' - | 'type' - | 'referrerPolicy' | 'noWrap' | 'gutterBottom' | 'paragraph' | 'align' | 'variantMapping' - | 'state' | 'TypographyClasses' | 'entityRef' | 'defaultKind'