Skip to content

Commit

Permalink
build: fix prettier usage (#352)
Browse files Browse the repository at this point in the history
Prettier is async since v3
This unblocks automated updates
  • Loading branch information
wolfy1339 authored Sep 22, 2023
1 parent 5f5c913 commit fe2cb84
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
6 changes: 3 additions & 3 deletions scripts/generate-types.js
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ async function run() {
await mkdir(`packages/${packageName}`);
await writeFile(
`packages/${packageName}/package.json`,
prettier.format(
await prettier.format(
JSON.stringify({
name: `@octokit/${packageName}`,
description: `Generated TypeScript definitions based on GitHub's OpenAPI spec for ${name}`,
Expand All @@ -56,7 +56,7 @@ async function run() {
);
await writeFile(
`packages/${packageName}/README.md`,
prettier.format(
await prettier.format(
`
# @octokit/${packageName}
Expand Down Expand Up @@ -86,7 +86,7 @@ type Repository = components["schemas"]["full-repository"]

await writeFile(
`packages/${packageName}/types.d.ts`,
prettier.format(await openapiTS(`cache/${name}.json`), {
await prettier.format(await openapiTS(`cache/${name}.json`), {
parser: "typescript",
}),
);
Expand Down
2 changes: 1 addition & 1 deletion scripts/update-package.js
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,6 @@ async function updatePackage() {

await writeFile(
"package.json",
prettier.format(JSON.stringify(pkg), { parser: "json-stringify" }),
await prettier.format(JSON.stringify(pkg), { parser: "json-stringify" }),
);
}

0 comments on commit fe2cb84

Please sign in to comment.