From bd39b86273f84db3f104032caccaf48e9a46811b Mon Sep 17 00:00:00 2001 From: "dependabot[bot]" <49699333+dependabot[bot]@users.noreply.github.com> Date: Mon, 4 Apr 2022 08:50:19 +0000 Subject: [PATCH 1/2] build(deps-dev): bump prettier from 2.5.1 to 2.6.2 Bumps [prettier](https://github.com/prettier/prettier) from 2.5.1 to 2.6.2. - [Release notes](https://github.com/prettier/prettier/releases) - [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md) - [Commits](https://github.com/prettier/prettier/compare/2.5.1...2.6.2) --- updated-dependencies: - dependency-name: prettier dependency-type: direct:development update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] --- yarn.lock | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/yarn.lock b/yarn.lock index 64a02725dd..0522a539e1 100644 --- a/yarn.lock +++ b/yarn.lock @@ -20356,9 +20356,9 @@ prettier@^1.16.4, prettier@^1.19.1: integrity sha512-s7PoyDv/II1ObgQunCbB9PdLmUcBZcnWOcxDh7O0N/UwDEsHyqkW+Qh28jW+mVuCdx7gLB0BotYI1Y6uI9iyew== prettier@^2.2.1: - version "2.5.1" - resolved "https://registry.npmjs.org/prettier/-/prettier-2.5.1.tgz#fff75fa9d519c54cf0fce328c1017d94546bc56a" - integrity sha512-vBZcPRUR5MZJwoyi3ZoyQlc1rXeEck8KgeC9AwwOn+exuxLxq5toTRDTSaVrXHxelDMHy9zlicw8u66yxoSUFg== + version "2.6.2" + resolved "https://registry.npmjs.org/prettier/-/prettier-2.6.2.tgz#e26d71a18a74c3d0f0597f55f01fb6c06c206032" + integrity sha512-PkUpF+qoXTqhOeWL9fu7As8LXsIUZ1WYaJiY/a7McAQzxjk82OF0tibkFXVCDImZtWxbvojFjerkiLb0/q8mew== pretty-bytes@^5.3.0, pretty-bytes@^5.6.0: version "5.6.0" From 376602830914d132694d0704b4d88e6a212826ac Mon Sep 17 00:00:00 2001 From: blam Date: Wed, 6 Apr 2022 10:55:10 +0200 Subject: [PATCH 2/2] chore: fixing prettier warnings Signed-off-by: blam --- ADOPTERS.md | 2 +- packages/core-app-api/src/app/AppContext.test.tsx | 5 +++-- .../core-app-api/src/routing/RoutingProvider.tsx | 5 +++-- packages/core-plugin-api/src/app/useApp.tsx | 5 +++-- .../core-plugin-api/src/routing/useRouteRef.tsx | 5 +++-- plugins/catalog-react/src/hooks/useEntity.tsx | 15 +++++++++------ 6 files changed, 22 insertions(+), 15 deletions(-) diff --git a/ADOPTERS.md b/ADOPTERS.md index 38bd18b0b7..ce5b2b70ef 100644 --- a/ADOPTERS.md +++ b/ADOPTERS.md @@ -109,4 +109,4 @@ _If you're using Backstage in your organization, please try to add your company | [Bonial International GmbH](https://www.bonial.com/) | [@pjungermann](https://github.com/pjungermann) | Centralized developer portal with software catalog, tech docs, templates, and more. | | [Beez Innovation Labs Pvt. Ltd](https://www.beezlabs.com/) | [Karthikeyan Venkatesan](https://github.com/karthikeyan23) | Developer portal with software catalog, scaffolding, tech docs, templates, and infra. | | [Agorapulse](https://www.agorapulse.com/) | [@jvdrean](https://github.com/jvdrean) | Developer portal with software catalog, documentation, monitoring, runbooks, tech radar and more. | -| [Wistia](https://wistia.com/) | [@qrush](https://github.com/qrush), [@okize](https://github.com/okize) | Internal Developer Portal, service catalog, tech docs and more | +| [Wistia](https://wistia.com/) | [@qrush](https://github.com/qrush), [@okize](https://github.com/okize) | Internal Developer Portal, service catalog, tech docs and more | diff --git a/packages/core-app-api/src/app/AppContext.test.tsx b/packages/core-app-api/src/app/AppContext.test.tsx index a1131969f2..bc67ee3a9e 100644 --- a/packages/core-app-api/src/app/AppContext.test.tsx +++ b/packages/core-app-api/src/app/AppContext.test.tsx @@ -22,8 +22,9 @@ import { AppContextProvider } from './AppContext'; describe('v1 consumer', () => { function useMockAppV1(): AppContextV1 { - const impl = - useVersionedContext<{ 1: AppContextV1 }>('app-context')?.atVersion(1); + const impl = useVersionedContext<{ 1: AppContextV1 }>( + 'app-context', + )?.atVersion(1); if (!impl) { throw new Error('no impl'); } diff --git a/packages/core-app-api/src/routing/RoutingProvider.tsx b/packages/core-app-api/src/routing/RoutingProvider.tsx index 2ab1686368..3d8a274922 100644 --- a/packages/core-app-api/src/routing/RoutingProvider.tsx +++ b/packages/core-app-api/src/routing/RoutingProvider.tsx @@ -27,8 +27,9 @@ import { import { RouteResolver } from './RouteResolver'; import { BackstageRouteObject } from './types'; -const RoutingContext = - createVersionedContext<{ 1: RouteResolver }>('routing-context'); +const RoutingContext = createVersionedContext<{ 1: RouteResolver }>( + 'routing-context', +); type ProviderProps = { routePaths: Map; diff --git a/packages/core-plugin-api/src/app/useApp.tsx b/packages/core-plugin-api/src/app/useApp.tsx index f2175a0969..05723ee387 100644 --- a/packages/core-plugin-api/src/app/useApp.tsx +++ b/packages/core-plugin-api/src/app/useApp.tsx @@ -23,8 +23,9 @@ import { AppContext as AppContextV1 } from './types'; * @public */ export const useApp = (): AppContextV1 => { - const versionedContext = - useVersionedContext<{ 1: AppContextV1 }>('app-context'); + const versionedContext = useVersionedContext<{ 1: AppContextV1 }>( + 'app-context', + ); if (!versionedContext) { throw new Error('App context is not available'); } diff --git a/packages/core-plugin-api/src/routing/useRouteRef.tsx b/packages/core-plugin-api/src/routing/useRouteRef.tsx index 50cfb3bdfb..563bb2035c 100644 --- a/packages/core-plugin-api/src/routing/useRouteRef.tsx +++ b/packages/core-plugin-api/src/routing/useRouteRef.tsx @@ -86,8 +86,9 @@ export function useRouteRef( | ExternalRouteRef, ): RouteFunc | undefined { const sourceLocation = useLocation(); - const versionedContext = - useVersionedContext<{ 1: RouteResolver }>('routing-context'); + const versionedContext = useVersionedContext<{ 1: RouteResolver }>( + 'routing-context', + ); if (!versionedContext) { throw new Error('Routing context is not available'); } diff --git a/plugins/catalog-react/src/hooks/useEntity.tsx b/plugins/catalog-react/src/hooks/useEntity.tsx index 6108a5717f..f654cff777 100644 --- a/plugins/catalog-react/src/hooks/useEntity.tsx +++ b/plugins/catalog-react/src/hooks/useEntity.tsx @@ -32,8 +32,9 @@ export type EntityLoadingStatus = { // This context has support for multiple concurrent versions of this package. // It is currently used in parallel with the old context in order to provide // a smooth transition, but will eventually be the only context we use. -const NewEntityContext = - createVersionedContext<{ 1: EntityLoadingStatus }>('entity-context'); +const NewEntityContext = createVersionedContext<{ 1: EntityLoadingStatus }>( + 'entity-context', +); /** * Properties for the AsyncEntityProvider component. @@ -104,8 +105,9 @@ export const EntityProvider = (props: EntityProviderProps) => ( export function useEntity(): { entity: TEntity; } { - const versionedHolder = - useVersionedContext<{ 1: EntityLoadingStatus }>('entity-context'); + const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>( + 'entity-context', + ); if (!versionedHolder) { throw new Error('Entity context is not available'); @@ -133,8 +135,9 @@ export function useEntity(): { export function useAsyncEntity< TEntity extends Entity = Entity, >(): EntityLoadingStatus { - const versionedHolder = - useVersionedContext<{ 1: EntityLoadingStatus }>('entity-context'); + const versionedHolder = useVersionedContext<{ 1: EntityLoadingStatus }>( + 'entity-context', + ); if (!versionedHolder) { throw new Error('Entity context is not available');