check_upgrade
Analyze your code for breaking changes before upgrading a dependency. Compares API differences between current and target versions and reports line-level issues with severity and fix hints.
Instructions
Check what breaks in YOUR code when you upgrade a dependency.
Call this BEFORE bumping a dependency version. It extracts the real public
API of the currently-installed (or from_version) package and the target
to_version, diffs them, then scans the provided code to report exactly
which of your usages break — with line numbers, severity, and fix hints.
Args: package: Distribution name to upgrade (e.g. "pandas"). to_version: The version you want to move to (e.g. "2.2.0"). code: The source code that uses the package (a file or snippet). from_version: Optional baseline version; defaults to what is installed. language: Ecosystem provider id. Default "python".
Returns a report with safe_to_upgrade, a severity summary, and per-line
findings. Note: analysis is static, so "no findings" means "nothing
proven to break", not a guarantee.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| package | Yes | ||
| to_version | Yes | ||
| code | Yes | ||
| from_version | No | ||
| language | No | python |