From d9927909cc41c8720b013064ce45e87ec71273f0 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 21 Aug 2025 16:31:17 +0000 Subject: [PATCH 1/4] refactor: update package name and refine TypeScript include paths --- package-lock.json | 2 +- tsconfig.json | 7 +++---- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/package-lock.json b/package-lock.json index 65c1a3c0b49..8ec282e9ffd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,5 +1,5 @@ { - "name": "gh-aw-copilots", + "name": "gh-aw", "lockfileVersion": 3, "requires": true, "packages": { diff --git a/tsconfig.json b/tsconfig.json index 9f2be05c623..a531aff6a8d 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -31,10 +31,9 @@ "typeRoots": ["./node_modules/@types", "./pkg/workflow/js/types"] }, "include": [ - "pkg/workflow/js/**/*.js", - "pkg/workflow/js/**/*.cjs", - "pkg/workflow/js/**/*.ts", - "pkg/workflow/js/**/*.d.ts" + "pkg/workflow/js/create_comment.cjs", + "pkg/workflow/js/create_issue.cjs", + "pkg/workflow/js/create_pull_request.cjs" ], "exclude": [ "node_modules", From 347da0a958401ef1660d9dfe04e25dd9a114e0e3 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 21 Aug 2025 16:34:20 +0000 Subject: [PATCH 2/4] fix: improve error logging for parent issue comments and enable strict mode in TypeScript --- pkg/workflow/js/create_issue.cjs | 2 +- tsconfig.json | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/pkg/workflow/js/create_issue.cjs b/pkg/workflow/js/create_issue.cjs index ce0dece1954..0998f7fa13c 100644 --- a/pkg/workflow/js/create_issue.cjs +++ b/pkg/workflow/js/create_issue.cjs @@ -98,7 +98,7 @@ async function main() { }); console.log('Added comment to parent issue #' + parentIssueNumber); } catch (error) { - console.log('Warning: Could not add comment to parent issue:', error.message); + console.log('Warning: Could not add comment to parent issue:', error instanceof Error ? error.message : String(error)); } } diff --git a/tsconfig.json b/tsconfig.json index a531aff6a8d..7e545cd45bc 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -8,7 +8,7 @@ "declaration": false, "outDir": "./dist/js", "rootDir": "./pkg/workflow/js", - "strict": false, + "strict": true, "noImplicitAny": true, "strictNullChecks": true, "strictFunctionTypes": false, @@ -33,7 +33,8 @@ "include": [ "pkg/workflow/js/create_comment.cjs", "pkg/workflow/js/create_issue.cjs", - "pkg/workflow/js/create_pull_request.cjs" + "pkg/workflow/js/create_pull_request.cjs", + "pkg/workflow/js/types/*.d.ts" ], "exclude": [ "node_modules", From 2239bc26db9501065d82cc2a836f2afd70ca1c59 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 21 Aug 2025 16:40:07 +0000 Subject: [PATCH 3/4] fix: enhance error logging for parent issue comments --- .github/workflows/test-claude.lock.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test-claude.lock.yml b/.github/workflows/test-claude.lock.yml index 9a32a38a343..703abbee5ca 100644 --- a/.github/workflows/test-claude.lock.yml +++ b/.github/workflows/test-claude.lock.yml @@ -657,7 +657,7 @@ jobs: }); console.log('Added comment to parent issue #' + parentIssueNumber); } catch (error) { - console.log('Warning: Could not add comment to parent issue:', error.message); + console.log('Warning: Could not add comment to parent issue:', error instanceof Error ? error.message : String(error)); } } From 73224c4a623b25bca3013cae34a055802c09bfa9 Mon Sep 17 00:00:00 2001 From: Peli de Halleux Date: Thu, 21 Aug 2025 16:42:16 +0000 Subject: [PATCH 4/4] fix: add missing types configuration in tsconfig.json --- tsconfig.json | 1 + 1 file changed, 1 insertion(+) diff --git a/tsconfig.json b/tsconfig.json index 7e545cd45bc..7c2d22db8e9 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -3,6 +3,7 @@ "target": "es2022", "module": "es2022", "lib": ["es2022"], + "types": ["node"], "allowJs": true, "checkJs": true, "declaration": false,