This branch snapshots the in-progress desktop workspace so GitHub-hosted Windows and Linux runners can package the same source tree that already passes local verification on macOS. Constraint: Local Apple Silicon Docker/Wine packaging crashes before Windows artifacts are produced Rejected: Publish from the incomplete base repo state | remote typecheck failed because current source additions were missing Confidence: medium Scope-risk: broad Directive: Treat this branch as a build snapshot only; do not merge it without reviewing the unrelated workspace changes it contains Tested: local typecheck, lint, workspace typecheck, unit tests, integration tests, e2e smoke, macOS signed release upload Not-tested: Native Windows/Linux artifacts before this CI run
33 lines
893 B
JavaScript
33 lines
893 B
JavaScript
import { spawn } from "node:child_process";
|
|
import { resolve } from "node:path";
|
|
|
|
const vitestEntrypoint = resolve(process.cwd(), "node_modules/vitest/vitest.mjs");
|
|
const args = process.argv.slice(2);
|
|
const warningFlag = "--disable-warning=ExperimentalWarning";
|
|
const env = { ...process.env };
|
|
const existingNodeOptions = env.NODE_OPTIONS?.trim();
|
|
|
|
if (!existingNodeOptions) {
|
|
env.NODE_OPTIONS = warningFlag;
|
|
} else if (!existingNodeOptions.includes(warningFlag)) {
|
|
env.NODE_OPTIONS = `${existingNodeOptions} ${warningFlag}`;
|
|
}
|
|
|
|
const child = spawn(process.execPath, ["--disable-warning=ExperimentalWarning", vitestEntrypoint, ...args], {
|
|
stdio: "inherit",
|
|
env,
|
|
});
|
|
|
|
child.on("exit", (code, signal) => {
|
|
if (signal) {
|
|
process.kill(process.pid, signal);
|
|
return;
|
|
}
|
|
process.exit(code ?? 1);
|
|
});
|
|
|
|
child.on("error", (error) => {
|
|
console.error(error);
|
|
process.exit(1);
|
|
});
|