Skip to content

feat(tools): add get_upgrade_guidance tool for UI5 Web Components migrations - #21

Open
PetyaMarkovaBogdanova wants to merge 1 commit into
mainfrom
ch-upgrade-guidance
Open

feat(tools): add get_upgrade_guidance tool for UI5 Web Components migrations#21
PetyaMarkovaBogdanova wants to merge 1 commit into
mainfrom
ch-upgrade-guidance

Conversation

@PetyaMarkovaBogdanova

Copy link
Copy Markdown

Add a new MCP tool that helps developers understand breaking changes and
migration requirements when upgrading UI5 Web Components between versions.

What's included:

  • get_upgrade_guidance tool: Analyzes breaking changes between versions
    by fetching and parsing the official GitHub CHANGELOG. Returns structured
    migration guidance with affected components and recommendations.

  • changelog_processor module: Core parsing logic including:

    • fetchChangelog(): Retrieves raw CHANGELOG from GitHub
    • resolveLatestVersion(): Queries npm registry for latest version
    • compareSemver(): Correctly compares semantic versions including pre-releases
    • parseChangelogRange(): Extracts version range (fromVersion, toVersion]
      with proper categorization of breaking changes, features, and bug fixes
    • formatUpgradeGuidance(): Generates markdown migration guide with summary,
      breaking changes, new features, and actionable migration checklist
  • Type definitions: New interfaces for ChangelogEntry, VersionSection,
    and UpgradeGuidance to provide type-safe changelog data structures

  • MCP Prompt registration: New 'upgrade-from-version' prompt that helps
    LLMs generate step-by-step migration checklists with code examples

  • Comprehensive test suite: 27 unit tests covering:

    • Semantic version comparison (including pre-releases)
    • CHANGELOG range extraction with boundary conditions
    • Markdown formatting and output generation
    • Edge cases and error conditions

Features:

  • Input validation to prevent invalid version strings
  • Proper semantic versioning with pre-release support (rc, beta, etc.)
  • Extracts per-component migration requirements
  • Generates user-friendly migration checklists
  • Robust error handling with clear user feedback
  • Network error resilience with appropriate fallbacks

Technical notes:

  • Range uses (fromVersion, toVersion] semantics: exclusive lower, inclusive upper
  • Strips PR/commit links from descriptions for cleaner output
  • Regex-based CHANGELOG parsing handles markdown formatting
  • Fixture-based tests avoid network dependencies

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant