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,11 +15,11 @@
*/
import { generatePath } from 'react-router';
import { DiscoveryApi, IdentityApi } from '@backstage/core';
import { ResponseError } from '@backstage/errors';
import { Entity, ENTITY_DEFAULT_NAMESPACE } from '@backstage/catalog-model';
import { entityRoute } from '@backstage/plugin-catalog-react';
import { BadgesApi, BadgeSpec } from './types';
import { DiscoveryApi, IdentityApi } from '@backstage/core-plugin-api';
export class BadgesClient implements BadgesApi {
private readonly discoveryApi: DiscoveryApi;
+1 -1
View File
@@ -15,7 +15,7 @@
*/
import { Entity } from '@backstage/catalog-model';
import { createApiRef } from '@backstage/core';
import { createApiRef } from '@backstage/core-plugin-api';
export const badgesApiRef = createApiRef<BadgesApi>({
id: 'plugin.badges.client',
@@ -16,17 +16,14 @@
import React from 'react';
import { Entity } from '@backstage/catalog-model';
import {
ApiProvider,
ApiRegistry,
ErrorApi,
errorApiRef,
} from '@backstage/core';
import { renderWithEffects } from '@backstage/test-utils';
import { BadgesApi, badgesApiRef } from '../api';
import { EntityBadgesDialog } from './EntityBadgesDialog';
import { EntityProvider } from '@backstage/plugin-catalog-react';
import { ApiProvider, ApiRegistry } from '@backstage/core-app-api';
import { ErrorApi, errorApiRef } from '@backstage/core-plugin-api';
describe('EntityBadgesDialog', () => {
it('should render', async () => {
const mockApi: jest.Mocked<BadgesApi> = {
@@ -14,12 +14,6 @@
* limitations under the License.
*/
import {
CodeSnippet,
Progress,
ResponseErrorPanel,
useApi,
} from '@backstage/core';
import { useEntity } from '@backstage/plugin-catalog-react';
import {
Box,
@@ -36,6 +30,13 @@ import React from 'react';
import { useAsync } from 'react-use';
import { badgesApiRef } from '../api';
import {
CodeSnippet,
Progress,
ResponseErrorPanel,
} from '@backstage/core-components';
import { useApi } from '@backstage/core-plugin-api';
type Props = {
open: boolean;
onClose?: () => any;
+2 -2
View File
@@ -13,14 +13,14 @@
* See the License for the specific language governing permissions and
* limitations under the License.
*/
import { badgesApiRef, BadgesClient } from './api';
import {
createApiFactory,
createComponentExtension,
createPlugin,
discoveryApiRef,
identityApiRef,
} from '@backstage/core';
import { badgesApiRef, BadgesClient } from './api';
} from '@backstage/core-plugin-api';
export const badgesPlugin = createPlugin({
id: 'badges',