Merge pull request #10588 from backstage/dependabot/npm_and_yarn/prettier-2.6.2

build(deps-dev): bump prettier from 2.5.1 to 2.6.2
This commit is contained in:
Ben Lambert
2022-04-06 14:21:10 +02:00
committed by GitHub
7 changed files with 25 additions and 18 deletions
@@ -32,8 +32,9 @@ export type EntityLoadingStatus<TEntity extends Entity = Entity> = {
// 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<TEntity extends Entity = Entity>(): {
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<TEntity extends Entity = Entity>(): {
export function useAsyncEntity<
TEntity extends Entity = Entity,
>(): EntityLoadingStatus<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');