apply core-imports codemod to all packages and plugins
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
@@ -15,7 +15,7 @@
|
||||
*/
|
||||
|
||||
import { MovedState } from './utils/types';
|
||||
import { createApiRef } from '@backstage/core';
|
||||
import { createApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
export const techRadarApiRef = createApiRef<TechRadarApi>({
|
||||
id: 'plugin.techradar.service',
|
||||
|
||||
@@ -18,7 +18,6 @@ import React from 'react';
|
||||
import { render, waitForElement } from '@testing-library/react';
|
||||
import { ThemeProvider } from '@material-ui/core';
|
||||
import { lightTheme } from '@backstage/theme';
|
||||
import { ApiRegistry, ApiProvider, errorApiRef } from '@backstage/core';
|
||||
import { act } from 'react-dom/test-utils';
|
||||
import { withLogCollector } from '@backstage/test-utils';
|
||||
|
||||
@@ -26,6 +25,9 @@ import GetBBoxPolyfill from '../utils/polyfills/getBBox';
|
||||
import RadarComponent from './RadarComponent';
|
||||
import { TechRadarLoaderResponse, techRadarApiRef, TechRadarApi } from '../api';
|
||||
|
||||
import { ApiRegistry, ApiProvider } from '@backstage/core-app-api';
|
||||
import { errorApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
describe('RadarComponent', () => {
|
||||
beforeAll(() => {
|
||||
GetBBoxPolyfill.create(0, 0, 1000, 500);
|
||||
|
||||
@@ -15,7 +15,6 @@
|
||||
*/
|
||||
|
||||
import React, { useEffect } from 'react';
|
||||
import { Progress, useApi, errorApiRef } from '@backstage/core';
|
||||
import { useAsync } from 'react-use';
|
||||
import Radar from '../components/Radar';
|
||||
import {
|
||||
@@ -25,6 +24,9 @@ import {
|
||||
} from '../api';
|
||||
import { Entry } from '../utils/types';
|
||||
|
||||
import { Progress } from '@backstage/core-components';
|
||||
import { useApi, errorApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
const useTechRadarLoader = () => {
|
||||
const errorApi = useApi(errorApiRef);
|
||||
const techRadarApi = useApi(techRadarApiRef);
|
||||
|
||||
@@ -19,7 +19,7 @@ import Dialog from '@material-ui/core/Dialog';
|
||||
import DialogTitle from '@material-ui/core/DialogTitle';
|
||||
import { Button, DialogActions, DialogContent } from '@material-ui/core';
|
||||
import LinkIcon from '@material-ui/icons/Link';
|
||||
import { MarkdownContent } from '@backstage/core';
|
||||
import { MarkdownContent } from '@backstage/core-components';
|
||||
|
||||
export type Props = {
|
||||
open: boolean;
|
||||
|
||||
@@ -14,7 +14,6 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { ApiProvider, ApiRegistry, errorApiRef } from '@backstage/core';
|
||||
import {
|
||||
MockErrorApi,
|
||||
renderInTestApp,
|
||||
@@ -29,6 +28,9 @@ import GetBBoxPolyfill from '../utils/polyfills/getBBox';
|
||||
import { RadarPage } from './RadarPage';
|
||||
import { TechRadarLoaderResponse, techRadarApiRef, TechRadarApi } from '../api';
|
||||
|
||||
import { ApiProvider, ApiRegistry } from '@backstage/core-app-api';
|
||||
import { errorApiRef } from '@backstage/core-plugin-api';
|
||||
|
||||
describe('RadarPage', () => {
|
||||
beforeAll(() => {
|
||||
GetBBoxPolyfill.create(0, 0, 1000, 500);
|
||||
|
||||
@@ -16,15 +16,15 @@
|
||||
|
||||
import React from 'react';
|
||||
import { Grid, makeStyles } from '@material-ui/core';
|
||||
import RadarComponent from '../components/RadarComponent';
|
||||
import { TechRadarComponentProps } from '../api';
|
||||
import {
|
||||
Content,
|
||||
ContentHeader,
|
||||
Page,
|
||||
Header,
|
||||
SupportButton,
|
||||
} from '@backstage/core';
|
||||
import RadarComponent from '../components/RadarComponent';
|
||||
import { TechRadarComponentProps } from '../api';
|
||||
} from '@backstage/core-components';
|
||||
|
||||
const useStyles = makeStyles(() => ({
|
||||
overflowXScroll: {
|
||||
|
||||
@@ -14,15 +14,15 @@
|
||||
* limitations under the License.
|
||||
*/
|
||||
|
||||
import { techRadarApiRef } from './api';
|
||||
|
||||
import { SampleTechRadarApi } from './sample';
|
||||
import {
|
||||
createPlugin,
|
||||
createRouteRef,
|
||||
createRoutableExtension,
|
||||
createApiFactory,
|
||||
} from '@backstage/core';
|
||||
|
||||
import { techRadarApiRef } from './api';
|
||||
import { SampleTechRadarApi } from './sample';
|
||||
} from '@backstage/core-plugin-api';
|
||||
|
||||
const rootRouteRef = createRouteRef({
|
||||
title: 'Tech Radar',
|
||||
|
||||
Reference in New Issue
Block a user