codemods: inline core-imports table + fix createApp

Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
This commit is contained in:
Patrik Oldsberg
2022-03-11 11:16:58 +01:00
parent 66ffb38685
commit 224441d0f9
5 changed files with 259 additions and 32 deletions
@@ -45,9 +45,9 @@ return something()
it('should refactor imports', () => {
const input = `
/* COPYRIGHT: ME */
import { Button as MyButton, createApiRef, createSpecializedApp } from '@backstage/core';
import { Button as MyButton, createApiRef, createApp } from '@backstage/core';
const app = createSpecializedApp();
const app = createApp();
const apiRef = createApiRef();
const button = <MyButton />
`;
@@ -57,9 +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';
import { createApp } from '@backstage/app-defaults';
const app = createSpecializedApp();
const app = createApp();
const apiRef = createApiRef();
const button = <MyButton />
`;