Skip to content

Commit 8f71a3c

Browse files
committed
fix json imports
1 parent 798ed6e commit 8f71a3c

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.github/workflows/prepare_package_upload.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,9 @@
11
import * as fs from "node:fs";
22
import * as os from "node:os";
33

4-
import { version } from "rescript/package.json" with { type: "json" };
4+
import packageSpec from "rescript/package.json" with { type: "json" };
5+
6+
const { version } = packageSpec;
57

68
const commitHash = process.argv[2] || process.env.GITHUB_SHA;
79
const commitHashShort = commitHash.substring(0, 7);

scripts/setVersion.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,9 @@
33
// @ts-check
44

55
import fs from "node:fs";
6-
import { name, version } from "rescript/package.json" with { type: "json" };
6+
import packageSpec from "rescript/package.json" with { type: "json" };
7+
8+
const { name, version } = packageSpec;
79

810
const stdlibPackageSpec = JSON.parse(
911
fs.readFileSync("./packages/std/package.json", "utf8"),

0 commit comments

Comments
 (0)