Check for outdated dependencies.
Synopsis
hx outdated [OPTIONS]Description
The outdated command checks your dependencies against the latest versions available on Hackage and reports which packages have updates available.
Options
--all Show all dependencies (including up-to-date)
--major Show only major version updates
--exit-code Exit with code 1 if outdated packages exist
--json Output as JSON
-v, --verbose Show detailed outputExamples
Check All Dependencies
hx outdatedOutput:
Package Current Latest Constraint
aeson 2.1.0.0 2.2.1.0 ^>=2.1
text 2.0.1 2.1 >=2.0
containers 0.6.7 0.6.8 (any)
3 packages have updates availableShow All (Including Up-to-date)
hx outdated --allMajor Updates Only
hx outdated --majorOutput:
Package Current Latest Breaking
aeson 2.1.0.0 3.0.0.0 Yes
lens 5.1 6.0 Yes
2 major updates availableJSON Output
hx outdated --json{
"outdated": [
{
"name": "aeson",
"current": "2.1.0.0",
"latest": "2.2.1.0",
"constraint": "^>=2.1"
}
]
}CI Check
# Fail if any packages are outdated
hx outdated --exit-codeVersion Categories
Patch Update
Bug fixes, no API changes:
2.1.0.0 -> 2.1.0.1Minor Update
New features, backwards compatible:
2.1.0 -> 2.2.0Major Update
Breaking changes:
2.1.0 -> 3.0.0Update Workflow
Check what’s outdated:
hx outdatedUpdate specific packages:
hx update aeson textOr update all:
hx updateRun tests:
hx testCommit:
git add hx.lock *.cabal git commit -m "Update dependencies"
Constraint Compatibility
The output shows if updates are compatible with your constraints:
Package Current Latest Constraint Compatible
aeson 2.1.0.0 2.1.2.0 ^>=2.1 ✓
text 2.0.1 3.0 ^>=2.0 ✗ (major)CI Integration
Report outdated dependencies without failing:
- name: Check for updates
run: hx outdated
continue-on-error: trueFail on outdated:
- name: Ensure up-to-date
run: hx outdated --exit-code