apply core-imports codemod to all packages and plugins

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2021-06-17 17:56:24 +02:00
parent 9b9a8f3925
commit d453c05dc3
541 changed files with 1549 additions and 1321 deletions
@@ -19,7 +19,6 @@ import {
RELATION_CHILD_OF,
RELATION_PARENT_OF,
} from '@backstage/catalog-model';
import { Avatar, InfoCard, InfoCardVariants } from '@backstage/core';
import {
EntityRefLinks,
getEntityRelations,
@@ -40,6 +39,7 @@ import EmailIcon from '@material-ui/icons/Email';
import GroupIcon from '@material-ui/icons/Group';
import Alert from '@material-ui/lab/Alert';
import React from 'react';
import { Avatar, InfoCard, InfoCardVariants } from '@backstage/core-components';
const CardTitle = ({ title }: { title: string }) => (
<Box display="flex" alignItems="center">
@@ -15,7 +15,6 @@
*/
import { Entity, GroupEntity } from '@backstage/catalog-model';
import { ApiProvider, ApiRegistry } from '@backstage/core';
import {
CatalogApi,
catalogApiRef,
@@ -24,6 +23,7 @@ import {
import { renderWithEffects, wrapInTestApp } from '@backstage/test-utils';
import React from 'react';
import { MembersListCard } from './MembersListCard';
import { ApiProvider, ApiRegistry } from '@backstage/core-app-api';
describe('MemberTab Test', () => {
const groupEntity: GroupEntity = {
@@ -19,13 +19,6 @@ import {
RELATION_MEMBER_OF,
UserEntity,
} from '@backstage/catalog-model';
import {
Avatar,
InfoCard,
Progress,
ResponseErrorPanel,
useApi,
} from '@backstage/core';
import {
catalogApiRef,
entityRouteParams,
@@ -45,6 +38,14 @@ import React from 'react';
import { generatePath, Link as RouterLink } from 'react-router-dom';
import { useAsync } from 'react-use';
import {
Avatar,
InfoCard,
Progress,
ResponseErrorPanel,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
const useStyles = makeStyles((theme: Theme) =>
createStyles({
card: {
@@ -15,7 +15,6 @@
*/
import { GroupEntity } from '@backstage/catalog-model';
import { ApiProvider, ApiRegistry } from '@backstage/core';
import {
CatalogApi,
catalogApiRef,
@@ -25,6 +24,7 @@ import { renderInTestApp } from '@backstage/test-utils';
import { queryByText } from '@testing-library/react';
import React from 'react';
import { OwnershipCard } from './OwnershipCard';
import { ApiProvider, ApiRegistry } from '@backstage/core-app-api';
describe('OwnershipCard', () => {
const userEntity: GroupEntity = {
@@ -15,13 +15,6 @@
*/
import { Entity } from '@backstage/catalog-model';
import {
InfoCard,
InfoCardVariants,
Progress,
ResponseErrorPanel,
useApi,
} from '@backstage/core';
import {
catalogApiRef,
isOwnerOf,
@@ -38,6 +31,14 @@ import {
import React from 'react';
import { useAsync } from 'react-use';
import {
InfoCard,
InfoCardVariants,
Progress,
ResponseErrorPanel,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
type EntitiesKinds = 'Component' | 'API';
type EntitiesTypes =
| 'service'
@@ -14,7 +14,6 @@
* limitations under the License.
*/
import { RELATION_MEMBER_OF, UserEntity } from '@backstage/catalog-model';
import { Avatar, InfoCard, InfoCardVariants } from '@backstage/core';
import {
EntityRefLinks,
getEntityRelations,
@@ -35,6 +34,7 @@ import GroupIcon from '@material-ui/icons/Group';
import PersonIcon from '@material-ui/icons/Person';
import Alert from '@material-ui/lab/Alert';
import React from 'react';
import { Avatar, InfoCard, InfoCardVariants } from '@backstage/core-components';
const CardTitle = ({ title }: { title?: string }) =>
title ? (
+4 -1
View File
@@ -13,7 +13,10 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { createComponentExtension, createPlugin } from '@backstage/core';
import {
createComponentExtension,
createPlugin,
} from '@backstage/core-plugin-api';
export const orgPlugin = createPlugin({
id: 'org',