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

+3 -3
View File
@@ -1,7 +1,7 @@
import { promises as fs } from "node:fs";
import os from "node:os";
import path from "node:path";
import { afterEach, beforeEach, describe, expect, it, vi } from "vitest";
import { getRuntimePath } from "@/lib/utils/runtime-path";
import type { FigureLibrary } from "./figuremap";
import {
__setFigureMapPathForTests,
@@ -23,8 +23,8 @@ const LIB: FigureLibrary = {
};
beforeEach(async () => {
dir = await fs.mkdtemp(path.join(os.tmpdir(), "figuremap-"));
file = path.join(dir, "FigureMap.json");
dir = await fs.mkdtemp(getRuntimePath(os.tmpdir(), "figuremap-"));
file = getRuntimePath(dir, "FigureMap.json");
await fs.writeFile(file, JSON.stringify({ libraries: [LIB] }));
__setFigureMapPathForTests(file);
});