Skip to content

Commit

Permalink
more feedback
Browse files Browse the repository at this point in the history
  • Loading branch information
arnaucasau committed Feb 1, 2024
1 parent 35266da commit 1739034
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"fmt": "prettier --write .",
"test": "jest",
"typecheck": "tsc",
"regenerate-apis": "node -r esbuild-register scripts/commands/regenerateApiDocs.ts",
"regen-apis": "node -r esbuild-register scripts/commands/regenerateApiDocs.ts",
"gen-api": "node -r esbuild-register scripts/commands/updateApiDocs.ts",
"make-historical": "node -r esbuild-register scripts/commands/convertApiDocsToHistorical.ts"
},
Expand Down
6 changes: 3 additions & 3 deletions scripts/commands/regenerateApiDocs.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@
// copyright notice, and modified files need to carry a notice indicating
// that they have been altered from the originals.

import { readdir } from "fs/promises";
import { readFile, readdir } from "fs/promises";

import yargs from "yargs/yargs";
import { hideBin } from "yargs/helpers";
Expand Down Expand Up @@ -130,14 +130,14 @@ async function getPackageVersions(

for (const folder of historicalFolders) {
const historicalVersion = await JSON.parse(
fs.readFileSync(`${pkgDocsPath}/${folder.name}/_package.json`, "utf-8"),
await readFile(`${pkgDocsPath}/${folder.name}/_package.json`, "utf-8"),
);
historicalVersions.push(historicalVersion.version);
}
}

const currentVersion = await JSON.parse(
fs.readFileSync(`${pkgDocsPath}/_package.json`, "utf-8"),
await readFile(`${pkgDocsPath}/_package.json`, "utf-8"),
);

return [historicalVersions, currentVersion.version];
Expand Down

0 comments on commit 1739034

Please sign in to comment.