bumpgen

bumpgen

AI-powered TypeScript dependency upgrade assistant
bumpgen cover
Preview

Resume

Bumpgen is an AI-powered tool that automates TypeScript/TSX dependency upgrades, handling code changes and fixing breaking issues. It uses advanced techniques like AST analysis and plan graphs to ensure smooth transitions to new package versions.

Details

Bumpgen: AI-Powered TypeScript Dependency Upgrade Assistant

Streamline Your Dependency Updates with Intelligent Automation

Bumpgen is a cutting-edge tool that aims to transform the way developers manage TypeScript and TSX dependency upgrades. By utilizing artificial intelligence and advanced code analysis techniques, Bumpgen automates the often tedious and error-prone process of updating dependencies, ensuring seamless transitions to new package versions.

Key Features

  • Automated Dependency Bumping: Easily upgrade your TypeScript/TSX dependencies to the latest versions.
  • Intelligent Code Fixes: Automatically identifies and resolves breaking changes caused by upgrades.
  • Abstract Syntax Tree (AST) Analysis: Utilizes ts-morph to understand code structure and relationships.
  • Plan Graph Execution: Implements a DAG-based approach for systematically propagating changes.
  • GitHub Action Integration: Seamlessly integrates into your CI/CD pipeline for automated PR updates.

How It Works

Project Analysis: Bumpgen analyzes your project to pinpoint potential breaking changes.

Code Understanding: Utilizes AST analysis to interpret code structure and dependencies.

Upgrade Planning: Creates a plan graph to execute changes in the correct order.

Intelligent Fixes: Utilizes GPT-4 to generate and implement code fixes for breaking changes.

Propagation: Ensures that fixes are correctly applied throughout the codebase.

Getting Started

To start using Bumpgen, you'll require an OpenAI API key with access to the gpt-4-turbo-preview model. Installation is straightforward:

        npm install -g bumpgen
        export LLM_API_KEY="your_api_key_here"
        bumpgen @package-name desired-version
        
    

GitHub Action

Bumpgen provides a GitHub action for seamless integration with your CI/CD workflow, particularly useful for automating updates on Dependabot or Renovate PRs.

        
            name: "Bumpgen"
            on:
              pull_request:
                types:
                  - opened
            jobs:
              main:
                name: Run Bumpgen
                runs-on: ubuntu-latest
                steps:
                  - uses: actions/checkout@v4
                  - name: Bumpgen
                    uses: xeol-io/bumpgen@v0.0.1
                    with:
                      path: "./path/to/package.json"
                      llm_key: ${{ secrets.LLM_API_KEY }}
                      github_token: ${{ secrets.GITHUB_TOKEN }}
        
    

Limitations and Future Development

While Bumpgen is a potent tool, it's essential to acknowledge its current limitations:

  • Relies on build errors to detect issues
  • Cannot handle multiple package updates simultaneously
  • May struggle with very large frameworks

The team is actively working on broadening language support beyond TypeScript and TSX, with upcoming plans to include Java, Go, C#, and Python.

Conclusion

Bumpgen signifies a significant advancement in dependency management for TypeScript projects. By automating the upgrade process and intelligently addressing breaking changes, it saves developers time and minimizes the risk of errors. Whether you're managing a small project or a large-scale application, Bumpgen can enhance your workflow and keep your dependencies up-to-date effortlessly.

Tags

ci-cd
dependency-update
dependency-management
tsx
github-action
tsx-dependency-upgrade
typescript