Skip to content

Commit

Permalink
fix: await prettier api
Browse files Browse the repository at this point in the history
  • Loading branch information
wolfy1339 committed Jul 9, 2023
1 parent 030af4b commit 7ad5f41
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions scripts/update-endpoints/code.js
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ async function generateRoutes() {

writeFileSync(
ALL_ENDPOINTS_PATH,
prettier.format(
await prettier.format(
`import type { EndpointsDefaultsAndDecorations } from "../types";
const Endpoints: EndpointsDefaultsAndDecorations = ${JSON.stringify(
sortKeys(newRoutes, { deep: true })
Expand All @@ -93,7 +93,7 @@ async function generateRoutes() {
);
writeFileSync(
ADMIN_ENDPOINTS_PATH,
prettier.format(
await prettier.format(
`import type { EndpointsDefaultsAndDecorations } from "../types";
const Endpoints: EndpointsDefaultsAndDecorations = ${JSON.stringify(
sortKeys({ enterpriseAdmin: newRoutes.enterpriseAdmin }, { deep: true })
Expand Down Expand Up @@ -127,7 +127,7 @@ async function generateRoutes() {
).join("\n");
writeFileSync(
INDEX_PATH,
prettier.format(
await prettier.format(
`// THIS FILE IS GENERATED. PLEASE OPEN AN ISSUE IF YOU FIND A PROBLEM
import { Octokit } from "@octokit/core";
Expand Down Expand Up @@ -179,7 +179,7 @@ ${Object.keys(newRoutesSorted)
`;
writeFileSync(
README_PATH,
prettier.format(content, { parser: "markdown" })
await prettier.format(content, { parser: "markdown" })
);
console.log(`${README_PATH} written.`);
}
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-endpoints/fetch-json.js
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,7 @@ async function main() {

writeFileSync(
path.resolve(__dirname, "generated", `ghe${ghe}-endpoints.json`),
prettier.format(JSON.stringify(endpoints), {
await prettier.format(JSON.stringify(endpoints), {
parser: "json",
})
);
Expand Down

0 comments on commit 7ad5f41

Please sign in to comment.