Skip to content

Commit b089269

Browse files
committed
fix json imports
1 parent d037023 commit b089269

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
@@ -4,7 +4,9 @@
44

55
import { execSync } from "node:child_process";
66
import fs from "node:fs";
7-
import { name, version } from "rescript/package.json" with { type: "json" };
7+
import packageSpec from "rescript/package.json" with { type: "json" };
8+
9+
const { name, version } = packageSpec;
810

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

0 commit comments

Comments
 (0)