Skip to content

Commit

Permalink
fix: read with UTF-8 encoding
Browse files Browse the repository at this point in the history
  • Loading branch information
zyoshoka committed Feb 7, 2025
1 parent 8dc8d93 commit 67e3363
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/misskey-js/generator/src/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ async function generateBaseTypes(
lines.push('');

// NOTE: Align `operationId` of GET and POST to avoid duplication of type definitions
const openApi = JSON.parse(readFile(openApiJsonPath).toString()) as OpenAPI3;
const openApi = JSON.parse(await readFile(openApiJsonPath, 'utf8')) as OpenAPI3;
// eslint-disable-next-line @typescript-eslint/no-non-null-assertion
for (const [key, item] of Object.entries(openApi.paths!)) {
assert('post' in item);
Expand Down

0 comments on commit 67e3363

Please sign in to comment.