fix(workspaces): restore clean runtime test paths

This commit is contained in:
Mohamed Boudra
2026-08-14 14:11:12 +02:00
parent accd2d7587
commit ff83ca4bdc
13 changed files with 171 additions and 25 deletions
@@ -21,6 +21,7 @@
"clean": "node ../../scripts/clean-package-dist.mjs",
"build": "tsc -p tsconfig.json --incremental false",
"build:clean": "npm run clean && npm run build",
"prepack": "npm run build:clean",
"test": "npm run build && tsc -p tsconfig.test.json && node --test test/*.test.mjs",
"typecheck": "tsgo -p tsconfig.json --noEmit"
},
@@ -33,6 +33,7 @@ import {
} from "../dist/index.js";
const run = promisify(execFile);
const npmCommand = process.platform === "win32" ? "npm.cmd" : "npm";
const packageRoot = path.resolve(path.dirname(fileURLToPath(import.meta.url)), "..");
const examples = JSON.parse(await readFile(path.join(packageRoot, "examples/v1.json"), "utf8"));
@@ -521,7 +522,7 @@ test("every export condition resolves from a packed standalone install", async (
t.after(() => rm(root, { recursive: true, force: true }));
const pack = JSON.parse(
(
await run("npm", ["pack", "--json", "--ignore-scripts", "--pack-destination", root], {
await run(npmCommand, ["pack", "--json", "--ignore-scripts", "--pack-destination", root], {
cwd: packageRoot,
})
).stdout,
@@ -529,7 +530,7 @@ test("every export condition resolves from a packed standalone install", async (
const archive = path.join(root, pack[0].filename);
const installRoot = path.join(root, "standalone");
await mkdir(installRoot);
await run("npm", ["install", "--ignore-scripts", "--no-package-lock", archive], {
await run(npmCommand, ["install", "--ignore-scripts", "--no-package-lock", archive], {
cwd: installRoot,
});
const installed = path.join(installRoot, "node_modules/@getpaseo/workspace-runtime-contract");