Switch to ESM for source and test, use CommonJS for dist (#806)

This commit is contained in:
Kevin Stillhammer
2026-03-14 17:43:49 +01:00
committed by GitHub
parent f9070de1ea
commit fd8f376b22
23 changed files with 212259 additions and 231165 deletions

View File

@@ -38,6 +38,8 @@ import {
} from "./utils/platforms";
import { getUvVersionFromFile } from "./version/resolve";
const sourceDir = __dirname;
async function getPythonVersion(): Promise<string> {
if (pythonVersion !== "") {
return pythonVersion;
@@ -308,7 +310,7 @@ function setCacheDir(): void {
function addMatchers(): void {
if (addProblemMatchers) {
const matchersPath = path.join(__dirname, `..${path.sep}..`, ".github");
const matchersPath = path.join(sourceDir, "..", "..", ".github");
core.info(`##[add-matcher]${path.join(matchersPath, "python.json")}`);
}
}

View File

@@ -18,7 +18,7 @@ async function run(): Promise<void> {
const checksumFilePath = process.argv.slice(2)[0];
if (!checksumFilePath) {
throw new Error(
"Missing checksum file path. Usage: node dist/update-known-checksums/index.js <checksum-file-path>",
"Missing checksum file path. Usage: node dist/update-known-checksums/index.cjs <checksum-file-path>",
);
}