5
0
mirror of https://github.com/astral-sh/setup-uv.git synced 2026-03-22 02:39:09 +00:00

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

@@ -2,7 +2,7 @@ import { beforeEach, describe, expect, it, jest } from "@jest/globals";
const mockWarning = jest.fn();
jest.mock("@actions/core", () => ({
jest.unstable_mockModule("@actions/core", () => ({
debug: jest.fn(),
info: jest.fn(),
warning: mockWarning,
@@ -10,16 +10,16 @@ jest.mock("@actions/core", () => ({
// biome-ignore lint/suspicious/noExplicitAny: Mock requires flexible typing in tests.
const mockFetch = jest.fn<any>();
jest.mock("../../src/utils/fetch", () => ({
jest.unstable_mockModule("../../src/utils/fetch", () => ({
fetch: mockFetch,
}));
import {
const {
clearManifestCache,
getAllVersions,
getLatestKnownVersion,
getManifestArtifact,
} from "../../src/download/version-manifest";
} = await import("../../src/download/version-manifest");
const legacyManifestResponse = JSON.stringify([
{