@@ -127,6 +127,7 @@ async function initExperiment(
127127 fallback: (_text: string, url: string) => url,
128128 })
129129 : "locally";
130+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
130131 console.error(
131132 chalk.cyan("▶") +
132133 ` Experiment ${chalk.bold(info.experimentName)} is running at ${linkText}`,
@@ -219,13 +220,17 @@ function buildWatchPluginForEvaluator(
219220 name: "run-evalutator-on-end",
220221 setup(build: esbuild.PluginBuild) {
221222 build.onEnd(async (result) => {
223+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
222224 console.error(`Done building ${inFile}`);
223225
224226 if (!result.outputFiles) {
225227 if (opts.showDetailedErrors) {
228+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
226229 console.warn(`Failed to compile ${inFile}`);
230+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
227231 console.warn(result.errors);
228232 } else {
233+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
229234 console.warn(`Failed to compile ${inFile}: ${result.errors}`);
230235 }
231236 return;
@@ -306,6 +311,7 @@ function buildWatchPluginForEvaluator(
306311 )) {
307312 const success = await reporter.reportRun(await Promise.all(results));
308313 if (!success) {
314+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
309315 console.error(error(`Reporter ${reporterName} failed.`));
310316 }
311317 }
@@ -421,9 +427,12 @@ export function handleBuildFailure({
421427 if (terminateOnFailure) {
422428 throw result.error;
423429 } else if (showDetailedErrors) {
430+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
424431 console.warn(`Failed to compile ${result.sourceFile}`);
432+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
425433 console.warn(result.error);
426434 } else {
435+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
427436 console.warn(
428437 `Failed to compile ${result.sourceFile}: ${result.error.message}`,
429438 );
@@ -466,6 +475,7 @@ function updateEvaluators(
466475 evaluators.reporters[reporterName] &&
467476 evaluators.reporters[reporterName] !== reporter
468477 ) {
478+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
469479 console.warn(
470480 warning(
471481 `Reporter '${reporterName}' already exists. Will skip '${reporterName}' from ${result.sourceFile}.`,
@@ -486,12 +496,14 @@ async function runAndWatch({
486496 onExit?: () => void;
487497}) {
488498 const count = Object.keys(handles).length;
499+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
489500 console.error(`Watching ${pluralize("file", count, true)}...`);
490501
491502 Object.values(handles).map((handle) => handle.watch());
492503
493504 ["SIGINT", "SIGTERM"].forEach((signal: string) => {
494505 process.on(signal, function () {
506+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
495507 console.error("Stopped watching.");
496508 for (const handle of Object.values(handles)) {
497509 handle.destroy();
@@ -540,6 +552,7 @@ async function runOnce(
540552
541553 if (opts.list) {
542554 for (const evaluator of evaluators.evaluators) {
555+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
543556 console.log(evaluator.evaluator.evalName);
544557 }
545558 return true;
@@ -581,13 +594,15 @@ async function runOnce(
581594 }
582595 });
583596
597+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
584598 console.error(
585599 chalk.dim(
586600 `Processing ${chalk.bold(resultPromises.length)} evaluator${resultPromises.length === 1 ? "" : "s"}...`,
587601 ),
588602 );
589603 const allEvalsResults = await Promise.all(resultPromises);
590604 opts.progressReporter.stop();
605+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
591606 console.error("");
592607
593608 const evalReports: Record<
@@ -685,6 +700,7 @@ async function collectFiles(
685700 try {
686701 pathStat = fs.lstatSync(inputPath);
687702 } catch (e) {
703+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
688704 console.error(error(`Error reading ${inputPath}: ${e}`));
689705 process.exit(1);
690706 }
@@ -699,6 +715,7 @@ async function collectFiles(
699715 )
700716 ) {
701717 const prefix = mode === "eval" ? ".eval" : "";
718+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
702719 console.warn(
703720 warning(
704721 `Reading ${inputPath} because it was specified directly. Rename it to end in ${prefix}.ts or ` +
@@ -848,6 +865,7 @@ export async function initializeHandles({
848865 for (const inputPath of inputPaths) {
849866 const newFiles = await collectFiles(inputPath, mode);
850867 if (newFiles.length == 0) {
868+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
851869 console.warn(
852870 warning(
853871 `Provided path ${inputPath} is not an eval file or a directory containing eval files, skipping...`,
@@ -860,6 +878,7 @@ export async function initializeHandles({
860878 }
861879
862880 if (Object.keys(files).length == 0) {
881+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
863882 console.warn(
864883 warning("No eval files were found in any of the provided paths."),
865884 );
@@ -906,6 +925,7 @@ async function run(args: RunArgs) {
906925 // Load via dotenv library
907926 const loaded = dotenv.config({ path: args.env_file });
908927 if (loaded.error) {
928+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
909929 console.error(error(`Error loading ${args.env_file}: ${loaded.error}`));
910930 process.exit(1);
911931 }
@@ -930,6 +950,7 @@ async function run(args: RunArgs) {
930950 };
931951
932952 if (args.list && args.watch) {
953+ // eslint-disable-next-line no-restricted-properties -- preserving intentional console usage.
933954 console.error(error("Cannot specify both --list and --watch."));
934955 process.exit(1);
935956 }
0 commit comments