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
+1 -1
View File
@@ -15,13 +15,13 @@
*/
import { Entity } from '@backstage/catalog-model';
import { Content, Header, Page } from '@backstage/core';
import { createDevApp, EntityGridItem } from '@backstage/dev-utils';
import { Grid } from '@material-ui/core';
import React from 'react';
import { EntitySonarQubeCard, sonarQubePlugin } from '../src';
import { FindingSummary, SonarQubeApi, sonarQubeApiRef } from '../src/api';
import { SONARQUBE_PROJECT_KEY_ANNOTATION } from '../src/components/useProjectKey';
import { Content, Header, Page } from '@backstage/core-components';
const entity = (name?: string) =>
({
+1 -1
View File
@@ -14,8 +14,8 @@
* limitations under the License.
*/
import { createApiRef } from '@backstage/core';
import { MetricKey, SonarUrlProcessorFunc } from './types';
import { createApiRef } from '@backstage/core-plugin-api';
/**
* Define a type to make sure that all metrics are used
@@ -14,12 +14,12 @@
* limitations under the License.
*/
import { UrlPatternDiscovery } from '@backstage/core';
import { msw } from '@backstage/test-utils';
import { rest } from 'msw';
import { setupServer } from 'msw/node';
import { FindingSummary, SonarQubeClient } from './index';
import { ComponentWrapper, MeasuresWrapper } from './types';
import { UrlPatternDiscovery } from '@backstage/core-app-api';
const server = setupServer();
+1 -1
View File
@@ -14,10 +14,10 @@
* limitations under the License.
*/
import { DiscoveryApi } from '@backstage/core';
import fetch from 'cross-fetch';
import { FindingSummary, Metrics, SonarQubeApi } from './SonarQubeApi';
import { ComponentWrapper, MeasuresWrapper } from './types';
import { DiscoveryApi } from '@backstage/core-plugin-api';
export class SonarQubeClient implements SonarQubeApi {
discoveryApi: DiscoveryApi;
@@ -15,14 +15,6 @@
*/
import { Entity } from '@backstage/catalog-model';
import {
EmptyState,
InfoCard,
InfoCardVariants,
MissingAnnotationEmptyState,
Progress,
useApi,
} from '@backstage/core';
import { useEntity } from '@backstage/plugin-catalog-react';
import { Chip, Grid } from '@material-ui/core';
import { makeStyles } from '@material-ui/core/styles';
@@ -42,6 +34,16 @@ import { Rating } from './Rating';
import { RatingCard } from './RatingCard';
import { Value } from './Value';
import {
EmptyState,
InfoCard,
InfoCardVariants,
MissingAnnotationEmptyState,
Progress,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
const useStyles = makeStyles(theme => ({
badgeLabel: {
color: theme.palette.common.white,
+2 -2
View File
@@ -14,14 +14,14 @@
* limitations under the License.
*/
import { sonarQubeApiRef, SonarQubeClient } from './api';
import {
configApiRef,
createApiFactory,
createComponentExtension,
createPlugin,
discoveryApiRef,
} from '@backstage/core';
import { sonarQubeApiRef, SonarQubeClient } from './api';
} from '@backstage/core-plugin-api';
export const sonarQubePlugin = createPlugin({
id: 'sonarqube',