From 59b58076016c5e5f09f16ab0395fed02e2ebb72e Mon Sep 17 00:00:00 2001 From: wasita Date: Wed, 4 Mar 2026 10:42:49 -0500 Subject: [PATCH] =?UTF-8?q?=F0=9F=90=9B=20fix(cli):=20use=20'gray'=20inste?= =?UTF-8?q?ad=20of=20'grey'=20in=20styleText=20calls=20(#2321)?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Node.js util.styleText does not accept 'grey' as a format name. While util.inspect.colors defines 'grey' as a non-enumerable alias for 'gray', styleText validates against Object.keys(inspect.colors) which only includes enumerable properties — so 'grey' has never been a valid styleText format and throws ERR_INVALID_ARG_VALUE. --- quartz/cli/handlers.js | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/quartz/cli/handlers.js b/quartz/cli/handlers.js index 9b68aede5..eb340d0f6 100644 --- a/quartz/cli/handlers.js +++ b/quartz/cli/handlers.js @@ -318,7 +318,7 @@ export async function handleBuild(argv) { const result = await ctx.rebuild().catch((err) => { console.error(`${styleText("red", "Couldn't parse Quartz configuration:")} ${fp}`) - console.log(`Reason: ${styleText("grey", err)}`) + console.log(`Reason: ${styleText("gray", err)}`) process.exit(1) }) release() @@ -395,7 +395,7 @@ export async function handleBuild(argv) { status >= 200 && status < 300 ? styleText("green", `[${status}]`) : styleText("red", `[${status}]`) - console.log(statusString + styleText("grey", ` ${argv.baseDir}${req.url}`)) + console.log(statusString + styleText("gray", ` ${argv.baseDir}${req.url}`)) release() } @@ -406,7 +406,7 @@ export async function handleBuild(argv) { }) console.log( styleText("yellow", "[302]") + - styleText("grey", ` ${argv.baseDir}${req.url} -> ${newFp}`), + styleText("gray", ` ${argv.baseDir}${req.url} -> ${newFp}`), ) res.end() } @@ -482,7 +482,7 @@ export async function handleBuild(argv) { .on("change", () => build(clientRefresh)) .on("unlink", () => build(clientRefresh)) - console.log(styleText("grey", "hint: exit with ctrl+c")) + console.log(styleText("gray", "hint: exit with ctrl+c")) } }