From 179dc2400cad315f44a286954e9c40c3b47937ab Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 9 Oct 2025 07:17:28 +0000 Subject: [PATCH 1/4] add logging to child-process.ts --- src/child-process.ts | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/src/child-process.ts b/src/child-process.ts index c250056..712a180 100644 --- a/src/child-process.ts +++ b/src/child-process.ts @@ -17,5 +17,13 @@ export type ExecResult = { readonly stderr: string } -export const exec = (command: string, options: childProcess.ExecOptionsWithStringEncoding): Promise => - nodeJsExec(command, { maxBuffer: Infinity, ...options }) +export const exec = async ( + command: string, + options: childProcess.ExecOptionsWithStringEncoding, +): Promise => { + console.log(`exec("${command}")`) + const result = await nodeJsExec(command, { maxBuffer: Infinity, ...options }) + console.log(`stdout:\n${result.stdout}`) + console.log(`stderr:\n${result.stderr}`) + return result +} From b742efb5819af02004863122324bbb65fbc1535a Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 9 Oct 2025 07:32:47 +0000 Subject: [PATCH 2/4] trim --- src/child-process.ts | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/child-process.ts b/src/child-process.ts index 712a180..5145223 100644 --- a/src/child-process.ts +++ b/src/child-process.ts @@ -23,7 +23,7 @@ export const exec = async ( ): Promise => { console.log(`exec("${command}")`) const result = await nodeJsExec(command, { maxBuffer: Infinity, ...options }) - console.log(`stdout:\n${result.stdout}`) - console.log(`stderr:\n${result.stderr}`) + console.log(`stdout:\n${result.stdout.trim()}`) + console.log(`stderr:\n${result.stderr.trim()}`) return result } From f0fea238fbefa053c06f2277f7791f8eafe2ea37 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 9 Oct 2025 07:42:38 +0000 Subject: [PATCH 3/4] log all readme files --- src/index.ts | 2 ++ 1 file changed, 2 insertions(+) diff --git a/src/index.ts b/src/index.ts index b65f324..d9763f5 100644 --- a/src/index.ts +++ b/src/index.ts @@ -770,6 +770,8 @@ const validateFolder = (dir: string) => .recursiveReaddir(dir) .filter((f) => path.basename(f).toLowerCase() === 'readme.md') + console.log(`allReadMeFiles: ${await allReadMeFiles.toArray()}`) + yield* validateRPFolderMustContainReadme(dir) yield* allReadMeFiles.flatMap(validateReadMeFile) From 00fd4a138f24bd37abc3706bd29a683dd10a24f9 Mon Sep 17 00:00:00 2001 From: Mike Harder Date: Thu, 9 Oct 2025 07:45:19 +0000 Subject: [PATCH 4/4] one readme per line --- src/index.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/index.ts b/src/index.ts index d9763f5..87889f7 100644 --- a/src/index.ts +++ b/src/index.ts @@ -770,7 +770,7 @@ const validateFolder = (dir: string) => .recursiveReaddir(dir) .filter((f) => path.basename(f).toLowerCase() === 'readme.md') - console.log(`allReadMeFiles: ${await allReadMeFiles.toArray()}`) + console.log(`allReadMeFiles:\n${(await allReadMeFiles.toArray()).map((s) => ' ' + s).join('\n')}`) yield* validateRPFolderMustContainReadme(dir)