Skip to content

Commit

Permalink
Update npm package prettier to v3.2.1 (#3882)
Browse files Browse the repository at this point in the history
Co-authored-by: renovate[bot] <29139614+renovate[bot]@users.noreply.github.com>
Co-authored-by: Ben Werner <[email protected]>
  • Loading branch information
renovate[bot] and benwerner01 authored Jan 16, 2024
1 parent b2ee41e commit 2e7f114
Show file tree
Hide file tree
Showing 20 changed files with 52 additions and 49 deletions.
10 changes: 6 additions & 4 deletions apps/hash-api/src/auth/create-auth-handlers.ts
Original file line number Diff line number Diff line change
Expand Up @@ -119,8 +119,9 @@ export const getUserAndSession = async ({
/** @todo: figure out if this should be handled here, or in the next.js app (when implementing 2FA) */
}
logger.debug(
`Kratos response error: Could not fetch session, got: [${err.response
?.status}] ${JSON.stringify(err.response?.data)}`,
`Kratos response error: Could not fetch session, got: [${
err.response?.status
}] ${JSON.stringify(err.response?.data)}`,
);
return undefined;
});
Expand Down Expand Up @@ -181,8 +182,9 @@ export const createAuthMiddleware = (params: {
/** @todo: figure out if this should be handled here, or in the next.js app (when implementing 2FA) */
}
logger.debug(
`Kratos response error: Could not fetch session, got: [${err.response
?.status}] ${JSON.stringify(err.response?.data)}`,
`Kratos response error: Could not fetch session, got: [${
err.response?.status
}] ${JSON.stringify(err.response?.data)}`,
);
return undefined;
});
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -73,8 +73,10 @@ export const generatePropertyRowRecursively = ({
? propertyRefSchema.$ref
: propertyRefSchema.items.$ref;

const propertyType = getPropertyTypeById(entitySubgraph, propertyTypeId)
?.schema;
const propertyType = getPropertyTypeById(
entitySubgraph,
propertyTypeId,
)?.schema;
if (!propertyType) {
throw new Error(`Property type ${propertyTypeId} not found in subgraph`);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -317,11 +317,10 @@ export const SelectLinearTeamsTable: FunctionComponent<{
<SelectWorkspaces
selectedWorkspaceEntityIds={possibleWorkspaces
.map(({ entity }) => entity.metadata.recordId.entityId)
.filter(
(entityId) =>
linearOrganization.teams
.find(({ id }) => id === linearTeamId)
?.workspaceEntityIds.includes(entityId),
.filter((entityId) =>
linearOrganization.teams
.find(({ id }) => id === linearTeamId)
?.workspaceEntityIds.includes(entityId),
)}
possibleWorkspaces={possibleWorkspaces}
setSelectedWorkspaceEntityIds={handleSelectWorkspaceChange(
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,8 @@ import { MenuItem } from "../../../../shared/ui";
const extractConfigPropertySchemas = (
blockSchema: JsonSchema,
): [string, JsonSchema][] =>
Object.entries(blockSchema.properties ?? {}).filter(
([name]) => blockSchema.configProperties?.includes(name),
Object.entries(blockSchema.properties ?? {}).filter(([name]) =>
blockSchema.configProperties?.includes(name),
);

const resolvePropertySchema = (
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,10 @@ export const useEntityTypeEntitiesContextValue = (params: {
for (const prop of Object.values(properties)) {
const propertyUrl = "items" in prop ? prop.items.$ref : prop.$ref;
if (!relevantPropertiesMap.has(propertyUrl)) {
const propertyType = getPropertyTypeById(subgraph, propertyUrl)
?.schema;
const propertyType = getPropertyTypeById(
subgraph,
propertyUrl,
)?.schema;
if (propertyType) {
relevantPropertiesMap.set(propertyUrl, propertyType);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,8 @@ export const getProjection = (
const newParent = newItems
.slice(0, overItemIndex)
.reverse()
.find((item) => item.depth === depth)?.page.parentPage?.metadata.recordId
.entityId;
.find((item) => item.depth === depth)?.page.parentPage?.metadata
.recordId.entityId;

return newParent ?? null;
};
Expand Down
4 changes: 2 additions & 2 deletions apps/hash-frontend/src/shared/use-actors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,8 +34,8 @@ export const useActors = (params: {

const { users, loading: usersLoading } = useUsers();

const userActors = users?.filter(
(user) => accountIds?.includes(user.accountId),
const userActors = users?.filter((user) =>
accountIds?.includes(user.accountId),
);

const { data: machineActorsData, loading: machinesLoading } = useQuery<
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,11 +43,10 @@ export const EntityTypeSelector = ({

const selectedEntityTypes = useMemo(
() =>
allEntityTypes.filter(
(type) =>
targetEntityTypeIds?.some(
(targetTypeId) => targetTypeId === type.schema.$id,
),
allEntityTypes.filter((type) =>
targetEntityTypeIds?.some(
(targetTypeId) => targetTypeId === type.schema.$id,
),
),
[allEntityTypes, targetEntityTypeIds],
);
Expand Down
2 changes: 1 addition & 1 deletion blocks/address/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,7 @@
"@types/uuid": "8.3.0",
"block-scripts": "0.3.1",
"mock-block-dock": "0.1.6",
"prettier": "3.1.1",
"prettier": "3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion blocks/ai-image/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"@types/uuid": "8.3.0",
"block-scripts": "0.3.1",
"mock-block-dock": "0.1.6",
"prettier": "3.1.1",
"prettier": "3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion blocks/chart/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@
"block-scripts": "0.3.1",
"eslint": "8.33.0",
"mock-block-dock": "0.1.6",
"prettier": "3.1.1",
"prettier": "3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0",
"typescript": "5.1.6"
Expand Down
6 changes: 4 additions & 2 deletions blocks/chart/src/edit-chart-definition/util.ts
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@ export const getEntityTypePropertyTypes = (
...propertyTypes,
...(entityType.allOf
?.map(({ $ref }) => {
const inheritsFromEntityType = getEntityTypeById(subgraph, $ref)
?.schema;
const inheritsFromEntityType = getEntityTypeById(
subgraph,
$ref,
)?.schema;

if (!inheritsFromEntityType) {
throw new Error(
Expand Down
2 changes: 1 addition & 1 deletion blocks/faq/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@
"@types/uuid": "8.3.0",
"block-scripts": "0.3.1",
"mock-block-dock": "0.1.6",
"prettier": "3.1.1",
"prettier": "3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
2 changes: 1 addition & 1 deletion blocks/how-to/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
"@types/uuid": "8.3.0",
"block-scripts": "0.3.1",
"mock-block-dock": "0.1.6",
"prettier": "3.1.1",
"prettier": "3.2.1",
"react": "18.2.0",
"react-dom": "18.2.0"
},
Expand Down
10 changes: 4 additions & 6 deletions libs/@local/advanced-types/src/brand.ts
Original file line number Diff line number Diff line change
Expand Up @@ -9,9 +9,7 @@ type BrandedBase<Base, Kind extends {}> = Base & {
/**
* The type-branding type to support nominal (name based) types
*/
export type Brand<Base, Kind extends string> = Base extends BrandedBase<
infer NestedBase,
infer NestedKind
>
? BrandedBase<NestedBase, NestedKind & { [_ in Kind]: true }>
: BrandedBase<Base, { [_ in Kind]: true }>;
export type Brand<Base, Kind extends string> =
Base extends BrandedBase<infer NestedBase, infer NestedKind>
? BrandedBase<NestedBase, NestedKind & { [_ in Kind]: true }>
: BrandedBase<Base, { [_ in Kind]: true }>;
Original file line number Diff line number Diff line change
Expand Up @@ -92,11 +92,10 @@ export const generateEntityLabel = (
}

entityTypesToCheck.push(
...(entityTypeAndAncestors ?? []).filter(
(type) =>
typeToCheck.schema.allOf?.find(
({ $ref }) => $ref === type.schema.$id,
),
...(entityTypeAndAncestors ?? []).filter((type) =>
typeToCheck.schema.allOf?.find(
({ $ref }) => $ref === type.schema.$id,
),
),
);
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ export const entityTypedef = gql`
}
union EntityAuthorizationSubject =
AccountGroupAuthorizationSubject
| AccountGroupAuthorizationSubject
| AccountAuthorizationSubject
| PublicAuthorizationSubject
Expand Down
2 changes: 1 addition & 1 deletion libs/@local/repo-chores/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@
"execa": "5.1.1",
"fs-extra": "11.1.0",
"globby": "11.0.1",
"prettier": "3.1.1",
"prettier": "3.2.1",
"regex-parser": "2.2.11",
"ts-node": "10.9.1",
"typescript": "5.1.6"
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -97,7 +97,7 @@
"npm-run-all": "4.1.5",
"patch-package": "6.5.0",
"postinstall-postinstall": "2.1.0",
"prettier": "3.1.1",
"prettier": "3.2.1",
"prettier-plugin-packagejson": "2.4.9",
"prettier-plugin-sh": "0.13.1",
"prettier-plugin-sql": "0.12.1",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -19744,10 +19744,10 @@ [email protected]:
sql-formatter "^10.0.0"
tslib "^2.4.0"

prettier@3.1.1:
version "3.1.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.1.1.tgz#6ba9f23165d690b6cbdaa88cb0807278f7019848"
integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==
prettier@3.2.1:
version "3.2.1"
resolved "https://registry.yarnpkg.com/prettier/-/prettier-3.2.1.tgz#babf33580e16c796a9740b9fae551624f7bfeaab"
integrity sha512-qSUWshj1IobVbKc226Gw2pync27t0Kf0EdufZa9j7uBSJay1CC+B3K5lAAZoqgX3ASiKuWsk6OmzKRetXNObWg==

prettier@^2.3.2, prettier@^2.6.2, prettier@^2.7.1, prettier@^2.8.0:
version "2.8.2"
Expand Down

0 comments on commit 2e7f114

Please sign in to comment.