From 36616875c72ec2334619760b6aa9b42be22dc8c9 Mon Sep 17 00:00:00 2001 From: maxprilutskiy Date: Fri, 15 Nov 2024 15:30:12 -0800 Subject: [PATCH] fix: ts stuff --- action/src/flows/pull-request.ts | 8 ++++---- action/tsconfig.json | 1 + 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/action/src/flows/pull-request.ts b/action/src/flows/pull-request.ts index f855211..0210c93 100644 --- a/action/src/flows/pull-request.ts +++ b/action/src/flows/pull-request.ts @@ -152,8 +152,8 @@ export class PullRequestFlow extends InBranchFlow { execSync(`git fetch origin ${this.config.baseBranchName}`, { stdio: 'inherit' }); // Get list of files - const sourceFiles = ['i18n.json']; - const generatedFiles = new Set(['i18n.lock']); // Files generated by Replexica + const sourceFiles: string[] = ['i18n.json']; + const generatedFiles: string[] = ['i18n.lock']; try { // Source files (sync from main) @@ -166,7 +166,7 @@ export class PullRequestFlow extends InBranchFlow { const replexicaTargetFiles = execSync('npx replexica@latest show files --target', { encoding: 'utf8' }) .split('\n') .filter(Boolean); - replexicaTargetFiles.forEach(f => generatedFiles.add(f)); + generatedFiles.push(...replexicaTargetFiles); } catch (error) { this.ora.warn('Could not get Replexica files list, syncing only i18n.json'); } @@ -203,7 +203,7 @@ export class PullRequestFlow extends InBranchFlow { // Create commit if there are changes const hasChanges = execSync('git diff --staged --quiet || echo "has_changes"', { encoding: 'utf8' }).includes('has_changes'); if (hasChanges) { - execSync('git commit -m "chore: sync translations from base branch"`, { stdio: 'inherit' }); + execSync(`git commit -m "chore: sync @replexica from ${this.config.baseBranchName}"`, { stdio: 'inherit' }); } } diff --git a/action/tsconfig.json b/action/tsconfig.json index 5d8b948..df40e66 100644 --- a/action/tsconfig.json +++ b/action/tsconfig.json @@ -6,6 +6,7 @@ "resolveJsonModule": true, "allowSyntheticDefaultImports": true, "skipLibCheck": true, + "noImplicitAny": false, "skipDefaultLibCheck": true, "moduleResolution": "NodeNext", "module": "NodeNext",