Fix Turbopack module resolution for lzma and restore path imports

This commit is contained in:
openhands committed 2026-08-25 22:19:59 +02:00
1 parent a5044c80d7
commit e06596391e
35 files changed
+392 -333

No files matched your search

+5 -5
View File
@@ -7,8 +7,8 @@
// production FurnitureData.json, so production files are never touched.
import { promises as fs } from "node:fs";
import os from "node:os";
import path from "node:path";
import { afterAll, beforeAll, describe, expect, it, vi } from "vitest";
import { getRuntimePath } from "@/lib/utils/runtime-path";
const { getGamedataRootMock, getNitroFilesRootMock, settingGetMock } =
vi.hoisted(() => ({
@@ -126,9 +126,9 @@ beforeAll(async () => {
// ignore cleanup failures; the assertions will surface real problems
}
tmpRoot = await fs.mkdtemp(path.join(os.tmpdir(), "furni-live-audit-"));
gamedataDir = path.join(tmpRoot, "Gamedata");
await fs.mkdir(path.join(gamedataDir, "config"), { recursive: true });
tmpRoot = await fs.mkdtemp(getRuntimePath(os.tmpdir(), "furni-live-audit-"));
gamedataDir = getRuntimePath(tmpRoot, "Gamedata");
await fs.mkdir(getRuntimePath(gamedataDir, "config"), { recursive: true });
getGamedataRootMock.mockResolvedValue(gamedataDir);
getNitroFilesRootMock.mockResolvedValue("");
settingGetMock.mockImplementation(
@@ -146,7 +146,7 @@ beforeAll(async () => {
try {
await fs.copyFile(
productionFile,
path.join(gamedataDir, "config", "FurnitureData.json"),
getRuntimePath(gamedataDir, "config", "FurnitureData.json"),
);
} catch {
// file unavailable — reconcile test still runs against an empty file