| name | upgrade-deps |
| description | Upgrade dependencies safely by auditing usage, researching breaking changes, and verifying after upgrade. Scales effort to version jump size โ light check for patches, full audit for majors. Use when asked to upgrade, bump, or update a dependency or package. |
| compatibility | Requires tokenlean CLI tools (npm i -g tokenlean) and git |
Upgrade Deps
Upgrade dependencies safely by understanding usage before changing versions.
Workflow
Audit โ Research โ Upgrade โ Verify โ Clean up
1. Audit
Understand current usage before changing anything:
tl parallel \
"npm=tl npm <package>" \
"search=tl search '<package-name>'" \
"deps=tl deps <file>"
2. Research
Check what changed between versions:
tl parallel "browse=tl browse <changelog-url>" "docs=tl context7 <package> 'migration guide'"
Look for: removed APIs, renamed functions, changed defaults, new peer deps.
3. Upgrade
Apply the version bump:
tl diff --breaking
tl snippet <symbol> <file>
4. Verify
tl parallel \
"test=tl run '<test command>'" \
"testmap=tl test-map <file>" \
"guard=tl guard"
5. Clean up
Remove old compatibility code:
tl parallel "unused=tl unused" "search=tl search '<old-version>'"
Decision tree
Upgrade request โ How big is the version jump?
โโ Patch (1.2.3 โ 1.2.4) โ Light check
โ โ tl npm to confirm, upgrade, tl run tests
โโ Minor (1.2 โ 1.3) โ Standard check
โ โ tl search for usage, tl browse changelog
โ โ Upgrade, tl run tests
โโ Major (1.x โ 2.x) โ Full audit
โ tl search for all usage sites
โ tl browse changelog + migration guide
โ tl snippet on every consumer
โ Upgrade, tl diff --breaking, tl run tests
โ tl unused to clean up compat code
Tips
- tl npm output includes the changelog URL โ use it with tl browse
- Use tl context7 for popular frameworks (React, Next.js, etc.) โ it has migration guides
- Always check for changed peer dependencies after major upgrades
- Run tl unused after removing compatibility code โ catch leftover dead exports
- Never upgrade a major version without reading the migration guide first