Show HN: I built an AI agent that upgrades NPM packages(github.com)
github.com
Show HN: I built an AI agent that upgrades NPM packages
https://github.com/xeol-io/bumpgen
2 コメント
how accurate is this? like percentage wise
We built our own benchmarks [1] to test against. It's a set of repos with breaking changes commit that we run bumpgen on the previous commit to then compare the results.
We are clocking in around 50% success rate in this benchmark.
[1] https://github.com/xeol-io/swe-bump-bench
We are clocking in around 50% success rate in this benchmark.
[1] https://github.com/xeol-io/swe-bump-bench
I built a tool [1] that resolves breaking changes when you upgrade npm packages.
I know keeping my dependencies updated is good hygiene but I really have no motivations to do them. The time to fix breaking changes then validate them makes the ROI lopsided. Automating these helps me reduce the barrier to a good habit.
It works on typescript and tsx projects. BYOK (bring your own GPT-4 key) for the codegen. MIT license.
How does it work?
- Bumps the package version, builds your project, and then runs tsc over your project to understand what breaks
- Uses ts-morph [2] to create an AST of your code to understand the relationships between code blocks
- Uses the AST to get type definitions for external methods to understand how to use the new package
- Creates a DAG to execute coding tasks in the correct order to handle propagating changes [3]
Try it out and would love to hear your feedback!
[1] https://github.com/xeol-io/bumpgen/
[2] https://github.com/dsherret/ts-morph
[3] https://huggingface.co/papers/2309.12499