Skip to content

Commit 6a0e788

Browse files
committed
Fix package.json reading fix
1 parent 0a20c03 commit 6a0e788

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/history/scripts/generateFull.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -47,8 +47,8 @@ const dates = Array.from(
4747

4848
let datesModified = false;
4949
let fullModified = false;
50-
const npmHighImpactVersion = createRequire(import.meta.url)(
51-
path.resolve(path.dirname(import.meta.resolve("npm-high-impact")), "./package.json"),
50+
const npmHighImpactVersion = JSON.parse(
51+
await readFile(path.resolve(path.dirname(import.meta.resolve("npm-high-impact")), "./package.json"), "utf8"),
5252
).version;
5353
const outJsonFileName = new URL("../data/out.json", import.meta.url);
5454
try {

0 commit comments

Comments
 (0)