Implemented feedback to changesets, theme provider, and core-imports test

- Removed validation logic for `appTheme.Provider` as type checking should be enough
- Replaced `createApp` with `createSpecializedApp` in `core-imports.test.ts`
- Upped changeset level from patch to minor and made minor verbiage tweaks

Signed-off-by: Colton Padden <colton.padden@fastmail.com>
This commit is contained in:
Colton Padden
2021-12-15 21:31:13 -05:00
parent 35b03e9dba
commit df8ee36288
7 changed files with 14 additions and 15 deletions
+1 -1
View File
@@ -1,5 +1,5 @@
---
'@backstage/config-loader': patch
'@backstage/config-loader': minor
---
Removed deprecated option `env` from `LoadConfigOptions` and associated tests
+4 -4
View File
@@ -1,7 +1,7 @@
---
'@backstage/core-app-api': patch
'@backstage/core-app-api': minor
---
- Remove deprecated `@backstage/core-app-api@createApp` which has been replaced by `@backstage/app-defaults#createApp`
- Remove deprecated type `BackstagePluginWithAnyOutput`
- Remove deprecated constructors for `GithubAuth`, `OAuth2`, and `SamlAuth` as the `create` method should be used instead
- Removed deprecated definition `createApp` from `@backstage/core-app-api` which has been replaced by `@backstage/app-defaults#createApp`
- Removed deprecated type `BackstagePluginWithAnyOutput`
- Removed deprecated constructors for `GithubAuth`, `OAuth2`, and `SamlAuth` as the `create` method should be used instead
+1 -1
View File
@@ -1,5 +1,5 @@
---
'@backstage/core-plugin-api': patch
'@backstage/core-plugin-api': minor
---
- Removed deprecated option `description` from `ApiRefConfig`
+1 -1
View File
@@ -1,5 +1,5 @@
---
'@backstage/test-utils': patch
'@backstage/test-utils': minor
---
Removed deprecated `msw` definition which was replaced by calling `setupRequestMockHandlers` directly
+3 -3
View File
@@ -1,9 +1,9 @@
---
'@backstage/app-defaults': patch
'@backstage/core-app-api': patch
'@backstage/core-plugin-api': patch
'@backstage/core-app-api': minor
'@backstage/core-plugin-api': minor
---
- Remove deprecation configuration option `theme` from `AppTheme` of the `AppThemeApi`
- Removed deprecation configuration option `theme` from `AppTheme` of the `AppThemeApi`
- Removed reference to `theme` in the `app-defaults` default `AppTheme`
- Removed logic in `AppThemeProvider` that creates `ThemeProvider` from `appTheme.theme`
@@ -45,8 +45,9 @@ return something()
it('should refactor imports', () => {
const input = `
/* COPYRIGHT: ME */
import { Button as MyButton, createApiRef } from '@backstage/core';
import { Button as MyButton, createApiRef, createSpecializedApp } from '@backstage/core';
const app = createSpecializedApp();
const apiRef = createApiRef();
const button = <MyButton />
`;
@@ -56,7 +57,9 @@ const button = <MyButton />
import { Button as MyButton } from '@backstage/core-components';
import { createApiRef } from '@backstage/core-plugin-api';
import { createSpecializedApp } from '@backstage/core-app-api';
const app = createSpecializedApp();
const apiRef = createApiRef();
const button = <MyButton />
`;
@@ -88,9 +88,5 @@ export function AppThemeProvider({ children }: PropsWithChildren<{}>) {
throw new Error('App has no themes');
}
if (!appTheme.Provider) {
throw new Error('App has no theme provider');
}
return <appTheme.Provider children={children} />;
}