✨ 주요 개선사항: - any 타입 83개에서 62개로 21개 수정 (25% 감소) - 모든 ESLint 에러 11개 → 0개 완전 해결 - 타입 안전성 대폭 향상으로 런타임 오류 가능성 감소 🔧 수정된 파일들: • PWADebug.tsx - 사용하지 않는 import들에 _ prefix 추가 • categoryUtils.ts - 불필요한 any 캐스트 제거 • TransactionsHeader.tsx - BudgetData 인터페이스 정의 • storageUtils.ts - generic 타입과 unknown 타입 적용 • 각종 error handler들 - Error | {message?: string} 타입 적용 • test 파일들 - 적절한 mock 인터페이스 정의 • 유틸리티 파일들 - any → unknown 또는 적절한 타입으로 교체 🏆 성과: - 코드 품질 크게 향상 (280 → 80 문제로 71% 감소) - TypeScript 컴파일러의 타입 체크 효과성 증대 - 개발자 경험 개선 (IDE 자동완성, 타입 추론 등) 🧹 추가 정리: - ESLint no-console/no-alert 경고 해결 - Prettier 포맷팅 적용으로 코드 스타일 통일 🎯 다음 단계: 남은 62개 any 타입 계속 개선 예정 🤖 Generated with [Claude Code](https://claude.ai/code) Co-Authored-By: Claude <noreply@anthropic.com>
44 lines
1.4 KiB
JavaScript
44 lines
1.4 KiB
JavaScript
#!/usr/bin/env node
|
|
|
|
const fs = require("fs");
|
|
const path = require("path");
|
|
const { execSync } = require("child_process");
|
|
|
|
/**
|
|
* 릴리즈 버전 업데이트 스크립트
|
|
* Semantic Release에 의해 package.json이 업데이트된 후 실행됩니다.
|
|
*/
|
|
|
|
const projectRoot = path.join(__dirname, "..");
|
|
|
|
// Semantic Release가 업데이트한 package.json에서 새 버전 읽기
|
|
const packageJsonPath = path.join(projectRoot, "package.json");
|
|
const packageJson = JSON.parse(fs.readFileSync(packageJsonPath, "utf8"));
|
|
const newVersion = packageJson.version;
|
|
|
|
console.log(`🚀 Post-release version sync for ${newVersion}...`);
|
|
|
|
// 버전을 숫자로 변환 (예: "1.2.3" -> 10203)
|
|
function versionToCode(version) {
|
|
const parts = version.split(".").map(Number);
|
|
return parts[0] * 10000 + parts[1] * 100 + parts[2];
|
|
}
|
|
|
|
const versionCode = versionToCode(newVersion);
|
|
|
|
// 모바일 플랫폼 버전 동기화
|
|
try {
|
|
console.log("🔄 Running version sync...");
|
|
execSync("npm run version:sync", { stdio: "inherit", cwd: projectRoot });
|
|
|
|
console.log("📱 Running mobile sync...");
|
|
execSync("npm run mobile:sync", { stdio: "inherit", cwd: projectRoot });
|
|
|
|
console.log("✅ Release version sync completed successfully!");
|
|
console.log(`📦 Released Version: ${newVersion}`);
|
|
console.log(`🔢 Build Code: ${versionCode}`);
|
|
} catch (error) {
|
|
console.error("❌ Release version sync failed:", error.message);
|
|
process.exit(1);
|
|
}
|