From a307a14be052aadc7c5bd7c26b659c0f6bd1781e Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 20 Apr 2022 12:03:42 +0200 Subject: [PATCH 1/2] search-react,techdocs: remove core-app-api dependency Signed-off-by: Patrik Oldsberg --- .changeset/spotty-plums-rule.md | 6 ++++++ plugins/search-react/package.json | 2 +- plugins/techdocs/package.json | 1 - 3 files changed, 7 insertions(+), 2 deletions(-) create mode 100644 .changeset/spotty-plums-rule.md diff --git a/.changeset/spotty-plums-rule.md b/.changeset/spotty-plums-rule.md new file mode 100644 index 0000000000..45d1c8280f --- /dev/null +++ b/.changeset/spotty-plums-rule.md @@ -0,0 +1,6 @@ +--- +'@backstage/plugin-search-react': patch +'@backstage/plugin-techdocs': patch +--- + +Removed dependency on `@backstage/core-app-api`. diff --git a/plugins/search-react/package.json b/plugins/search-react/package.json index 0f50912282..dd8d774f89 100644 --- a/plugins/search-react/package.json +++ b/plugins/search-react/package.json @@ -33,7 +33,6 @@ "dependencies": { "@backstage/plugin-search-common": "^0.3.3", "@backstage/core-plugin-api": "^1.0.1", - "@backstage/core-app-api": "^1.0.1", "@backstage/version-bridge": "^1.0.1", "react-use": "^17.3.2", "@backstage/types": "^1.0.0" @@ -43,6 +42,7 @@ "react": "^16.13.1 || ^17.0.0" }, "devDependencies": { + "@backstage/core-app-api": "^1.0.1", "@backstage/test-utils": "^1.0.1", "@testing-library/react": "^12.1.3", "@testing-library/react-hooks": "^8.0.0", diff --git a/plugins/techdocs/package.json b/plugins/techdocs/package.json index 6f6c1bafd8..14e1798b92 100644 --- a/plugins/techdocs/package.json +++ b/plugins/techdocs/package.json @@ -38,7 +38,6 @@ "@backstage/catalog-model": "^1.0.1", "@backstage/config": "^1.0.0", "@backstage/core-components": "^0.9.3", - "@backstage/core-app-api": "^1.0.1", "@backstage/core-plugin-api": "^1.0.1", "@backstage/errors": "^1.0.0", "@backstage/integration": "^1.1.0", From 754409bef50a8d32905c8e3bc3862268469d88cd Mon Sep 17 00:00:00 2001 From: Patrik Oldsberg Date: Wed, 20 Apr 2022 15:22:01 +0200 Subject: [PATCH 2/2] techdocs: replace usage of FlatRoutes Signed-off-by: Patrik Oldsberg --- plugins/techdocs/src/Router.tsx | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/plugins/techdocs/src/Router.tsx b/plugins/techdocs/src/Router.tsx index 1908e6cad0..0174e3457f 100644 --- a/plugins/techdocs/src/Router.tsx +++ b/plugins/techdocs/src/Router.tsx @@ -18,7 +18,6 @@ import React, { PropsWithChildren } from 'react'; import { Route, Routes } from 'react-router-dom'; import { Entity } from '@backstage/catalog-model'; -import { FlatRoutes } from '@backstage/core-app-api'; import { useEntity } from '@backstage/plugin-catalog-react'; import { MissingAnnotationEmptyState } from '@backstage/core-components'; @@ -69,10 +68,8 @@ export const EmbeddedDocsRouter = (props: PropsWithChildren<{}>) => { } return ( - - }> - {children} - - + + }>{children} + ); };