Update hivegrid-cloud reference to latest main
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
This commit is contained in:
1 parent
e98d38e716
commit
7b21524c86
3781 files changed
+373484
-225607
No files matched your search
@@ -32,7 +32,7 @@ export function appendNodeOption(nodeOptions, option) {
|
||||
}
|
||||
|
||||
async function createPnpmExecCompatShimDir() {
|
||||
const shimDir = await mkdtemp(join(tmpdir(), "toolctrl-vitest-compat-"));
|
||||
const shimDir = await mkdtemp(join(tmpdir(), "hivegrid-vitest-compat-"));
|
||||
await Promise.all(["eslint", "vitest"].map((name) => copyPnpmExecCompatShim(shimDir, name)));
|
||||
return shimDir;
|
||||
}
|
||||
@@ -53,15 +53,23 @@ if (isCliEntrypoint) {
|
||||
const args = rawArgs.flatMap((arg) => (arg === "--runInBand" ? ["--single-thread"] : [arg]));
|
||||
const normalizedArgs = normalizeVitestArgs(args);
|
||||
let shimDir;
|
||||
const storageDir = await mkdtemp(join(tmpdir(), "toolctrl-vitest-storage-"));
|
||||
let childEnv = { ...process.env, VITEST_PNPM_EXEC_COMPAT_READY: "1", TOOLCTRL_REPO_ROOT: repoRoot };
|
||||
const storageDir = await mkdtemp(join(tmpdir(), "hivegrid-vitest-storage-"));
|
||||
let childEnv = { ...process.env, VITEST_PNPM_EXEC_COMPAT_READY: "1", HIVEGRID_REPO_ROOT: repoRoot };
|
||||
|
||||
if (!process.env.VITEST_PNPM_EXEC_COMPAT_READY) {
|
||||
shimDir = await createPnpmExecCompatShimDir();
|
||||
childEnv = { ...childEnv, PATH: `${shimDir}${delimiter}${process.env.PATH ?? ""}` };
|
||||
}
|
||||
|
||||
childEnv.NODE_OPTIONS = appendNodeOption(childEnv.NODE_OPTIONS, `--localstorage-file=${join(storageDir, "localstorage.json")}`);
|
||||
// `--localstorage-file` enables Node's experimental file-backed localStorage,
|
||||
// which only exists on Node >= 22. Older Node (e.g. the CI runner's system
|
||||
// node 20) rejects unknown flags in NODE_OPTIONS and refuses to start
|
||||
// ("--localstorage-file= is not allowed in NODE_OPTIONS"), so only append it
|
||||
// when the running Node actually supports it. The jsdom test environment
|
||||
// provides its own localStorage regardless.
|
||||
if (Number(process.versions.node.split(".")[0]) >= 22) {
|
||||
childEnv.NODE_OPTIONS = appendNodeOption(childEnv.NODE_OPTIONS, `--localstorage-file=${join(storageDir, "localstorage.json")}`);
|
||||
}
|
||||
|
||||
const child = spawn(process.execPath, [vitestEntry, ...normalizedArgs], {
|
||||
cwd: repoRoot,
|
||||
|
||||
Reference in new issue
Block a user