mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
Relocate the prebuilt lib diagnostics path when installing the native command (#2300)
This commit is contained in:
@@ -49,6 +49,7 @@ export function relocateToolchain(manifest, sourceDirectory, destinationDirector
|
||||
"declarations",
|
||||
"comptime",
|
||||
"wasi_node_runner",
|
||||
"lib_diagnostics",
|
||||
]) {
|
||||
if (typeof relocated[name] === "string") relocated[name] = pathFrom(relocated[name]);
|
||||
}
|
||||
|
||||
@@ -53,6 +53,7 @@ function fixture() {
|
||||
dsymutil: "dsymutil",
|
||||
comptime: "../lib/comptime",
|
||||
wasi_node_runner: "../lib/wasi/cli/wasi-runner.js",
|
||||
lib_diagnostics: "../lib/lib-diagnostics.json",
|
||||
};
|
||||
writeFileSync(binary + ".json", JSON.stringify(toolchain));
|
||||
const helpers = [
|
||||
@@ -93,6 +94,9 @@ test("installs a direct executable and relocatable references to platform assets
|
||||
expect(resolve(dirname(installed), manifest.wasi_node_runner)).toBe(
|
||||
join(platform, "wasi/cli/wasi-runner.js"),
|
||||
);
|
||||
expect(resolve(dirname(installed), manifest.lib_diagnostics)).toBe(
|
||||
join(platform, "lib-diagnostics.json"),
|
||||
);
|
||||
expect(resolve(dirname(installed), manifest.runtime_packs[0].path)).toBe(
|
||||
join(platform, "runtime"),
|
||||
);
|
||||
|
||||
Reference in New Issue
Block a user