From 53b9cea7f07897740d91aff1580dba8900129108 Mon Sep 17 00:00:00 2001 From: Knotty Wyvern Date: Thu, 29 Oct 2026 17:43:18 -0700 Subject: [PATCH] Fix the folder path of the Background measurement realpath from node:fs/promises has no native form. Use realpathSync.native from node:fs. --- scripts/measureFeatures.mjs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/scripts/measureFeatures.mjs b/scripts/measureFeatures.mjs index 692991c..90a73d0 100644 --- a/scripts/measureFeatures.mjs +++ b/scripts/measureFeatures.mjs @@ -3,7 +3,8 @@ // The tool starts a test build with an isolated identifier, drives it through CDP, and stops only the process tree that it started. // Run `node scripts/measureFeatures.mjs --help` for the arguments. The results go to output/phase-7//. import { existsSync } from "node:fs"; -import { mkdir, readFile, realpath, rm, writeFile } from "node:fs/promises"; +import { realpathSync } from "node:fs"; +import { mkdir, readFile, rm, writeFile } from "node:fs/promises"; import os from "node:os"; import path from "node:path"; import { setTimeout as sleep } from "node:timers/promises"; @@ -57,7 +58,7 @@ async function seedBackgroundNative(folders, backgrounds) { const background = { source: "folder", seconds: TABLE.features.background.seconds, order: "name", paused: false, targets: ["app"], overlay: 0, position: "center", size: "cover" }; await writeFile(path.join(folders.roaming, "settings.json"), JSON.stringify({ schema: 1, revision: 1, background }, null, 2) + "\n"); // The host accepts the folder only at its resolved path. - await writeFile(path.join(folders.roaming, "background-folder.json"), JSON.stringify({ schema: 1, path: await realpath.native(backgrounds) }, null, 2)); + await writeFile(path.join(folders.roaming, "background-folder.json"), JSON.stringify({ schema: 1, path: realpathSync.native(backgrounds) }, null, 2)); } /** The features that are on in the running app. */