From 5083cb998dc8e1195e91e516ab714fad815e9777 Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 16 Apr 2026 20:55:58 -0700 Subject: [PATCH 1/2] Improve error formatting --- scripts/react-compiler-compliance-check.ts | 10 +++++----- scripts/utils/Logger.ts | 7 ++++++- 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/scripts/react-compiler-compliance-check.ts b/scripts/react-compiler-compliance-check.ts index 0acaf02b186b..67d70c3e79cc 100644 --- a/scripts/react-compiler-compliance-check.ts +++ b/scripts/react-compiler-compliance-check.ts @@ -15,7 +15,7 @@ import path from 'path'; import CLI from './utils/CLI'; import FileUtils from './utils/FileUtils'; import Git from './utils/Git'; -import {log, error as logError, info as logInfo, success as logSuccess, warn as logWarn} from './utils/Logger'; +import {log, error as logError, errorDetail as logErrorDetail, info as logInfo, success as logSuccess, warn as logWarn} from './utils/Logger'; // eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-unsafe-assignment const ReactCompilerConfig = require('../config/babel/reactCompilerConfig'); @@ -131,7 +131,7 @@ function printErrors(filename: string, errors: CompilerError[]): void { } for (const error of errors) { const location = formatErrorLocation(filename, error); - logError(` ${location}: ${error.reason}`); + logErrorDetail(`${location}: ${error.reason}`); } if (IS_CI) { console.log('::endgroup::'); @@ -157,10 +157,10 @@ function checkFiles(inputs: string[], verbose: boolean): boolean { switch (result.status) { case 'compiled': - logSuccess(`COMPILED ${file}`); + logSuccess(`COMPILED ${file}`); break; case 'failed': - logError(`FAILED ${file}`); + logError(`FAILED ${file}`); printErrors(file, result.errors); hasFailure = true; break; @@ -230,7 +230,7 @@ async function checkChangedFiles(remote: string, verbose: boolean): Promise { log(...lines); }; +const errorDetail = (...args: unknown[]) => { + const lines = [` ${COLOR_RED}↳`, ...args, COLOR_RESET]; + log(...lines); +}; + const formatLink = (name: string | number, url: string) => `\x1b]8;;${url}\x1b\\${name}\x1b]8;;\x1b\\`; -export {log, info, warn, note, error, success, formatLink, bold}; +export {log, info, warn, note, error, errorDetail, success, formatLink, bold}; From ceed278e38fe2119662948d1b86980c1ae62af1b Mon Sep 17 00:00:00 2001 From: rory Date: Thu, 16 Apr 2026 21:02:34 -0700 Subject: [PATCH 2/2] Rebuild gh actions --- .../javascript/getPullRequestIncrementalChanges/index.js | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js index da69280aaaf6..b50bd3334a34 100644 --- a/.github/actions/javascript/getPullRequestIncrementalChanges/index.js +++ b/.github/actions/javascript/getPullRequestIncrementalChanges/index.js @@ -12869,7 +12869,7 @@ exports["default"] = Git; "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.bold = exports.formatLink = exports.success = exports.error = exports.note = exports.warn = exports.info = exports.log = void 0; +exports.bold = exports.formatLink = exports.success = exports.errorDetail = exports.error = exports.note = exports.warn = exports.info = exports.log = void 0; const COLOR_DIM = '\x1b[2m'; const COLOR_RESET = '\x1b[0m'; const COLOR_YELLOW = '\x1b[33m'; @@ -12918,6 +12918,11 @@ const error = (...args) => { log(...lines); }; exports.error = error; +const errorDetail = (...args) => { + const lines = [` ${COLOR_RED}↳`, ...args, COLOR_RESET]; + log(...lines); +}; +exports.errorDetail = errorDetail; const formatLink = (name, url) => `\x1b]8;;${url}\x1b\\${name}\x1b]8;;\x1b\\`; exports.formatLink = formatLink;