Skip to content

v0.8.0

Choose a tag to compare

@mmcky mmcky released this 17 Feb 22:41
· 237 commits to main since this release
526b714

Sync Orchestrator, PR Creator, Retry Logic

What's Changed

Added

  • Sync Orchestrator (src/sync-orchestrator.ts): Extracted from index.ts — SyncOrchestrator class with Logger interface for future CLI reuse, classifyChangedFiles(), loadGlossary(), FileToSync and SyncProcessingResult interfaces
  • PR Creator (src/pr-creator.ts): Extracted PR creation logic — createTranslationPR(), buildPrBody(), buildPrTitle(), buildLabelSet(), PrCreatorConfig and SourcePrInfo interfaces
  • Retry Logic: Exponential backoff retry in translator.ts — retries RateLimitError, APIConnectionError, and 5xx errors; max 3 attempts (1s/2s/4s delays); no retry for AuthenticationError or BadRequestError; RETRY_CONFIG export for testing
  • 133 new tests (183 → 316 total, 15 suites):
    • inputs.test.ts (55 tests) — mode, repo format, language, model, PR event validation
    • translator.test.ts (28 tests) — token estimation, glossary formatting, error handling
    • sync-orchestrator.test.ts (26 tests)
    • pr-creator.test.ts (12 tests)
    • translator-retry.test.ts (12 tests)

Changed

  • index.ts rewritten from ~766 to ~447 lines — delegates to SyncOrchestrator and createTranslationPR()

Removed

  • 3 deprecated dead methods from file-processor.ts: findSourceSectionIndex(), findTargetSectionIndex(), findMatchingSectionIndex()

Internal / Docs

  • CHANGELOG repaired (misplaced [Unreleased] section, missing entries backfilled into correct versions)