- Migrate postinstall script to `postinstall-sync-playwright-root-links.mjs` for streamlined path resolution. - Replace `axios` v1.15.0 with v1.13.5 and downgrade `vite` from v8.0.5 to v7.1.11. - Update testing code for consistent formatting and enhanced readability (e.g., `poll` and `catch` calls). - Remove unused or redundant dependency flags and align `package-lock.json` with new configuration.
23 lines
565 B
JavaScript
23 lines
565 B
JavaScript
import fs from "node:fs";
|
|
import path from "node:path";
|
|
import { spawnSync } from "node:child_process";
|
|
|
|
const helperScriptPath = path.resolve(process.cwd(), "..", "scripts", "sync-playwright-root-links.mjs");
|
|
|
|
if (!fs.existsSync(helperScriptPath)) {
|
|
console.log(
|
|
`Skipping root Playwright link sync: helper script not found at ${helperScriptPath}.`
|
|
);
|
|
process.exit(0);
|
|
}
|
|
|
|
const result = spawnSync(process.execPath, [helperScriptPath], {
|
|
stdio: "inherit",
|
|
});
|
|
|
|
if (typeof result.status === "number") {
|
|
process.exit(result.status);
|
|
}
|
|
|
|
process.exit(1);
|