Created
December 15, 2025 13:04
-
-
Save gukandrew/b91ec978900d8634bf276e8c44142a3c to your computer and use it in GitHub Desktop.
Colorized pnpm dependency version checker for zsh and bash
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| alias pnpm-deps='pnpm list --depth=0 --json \ | |
| | jq -r ".[0].dependencies | to_entries[] | \"\(.key) \(.value.version)\"" \ | |
| | while read -r name current; do \ | |
| latest=$(pnpm view "$name" version 2>/dev/null); \ | |
| if [ -z "$latest" ] || [ "$current" = "$latest" ]; then \ | |
| echo "$name - $current"; \ | |
| else \ | |
| printf "%s - %s%s%s => %s%s%s\n" \ | |
| "$name" \ | |
| $'\''\033[31m'\'' "$current" $'\''\033[0m'\'' \ | |
| $'\''\033[32m'\'' "$latest" $'\''\033[0m'\''; \ | |
| fi; \ | |
| done' |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment