Skip to content

Instantly share code, notes, and snippets.

@ictus4u
Created September 21, 2020 20:47
Show Gist options
  • Save ictus4u/4cc95f46d35a72febb36c9d43ef13dde to your computer and use it in GitHub Desktop.
Save ictus4u/4cc95f46d35a72febb36c9d43ef13dde to your computer and use it in GitHub Desktop.
#!/usr/bin/env bash
jq -r '.dependencies,.devDependencies|keys[] as $k|"\($k)@\(.[$k])"' package.json | while read line; do \
printf "$line: "
[ "$(npm show "$line" | grep -ic 'DEPRECATED')" != "0" ] && \
printf "\e[1;31m""DEPRECATED\n""\e[0m" || \
printf "\e[1;32m""not deprecated.\n""\e[0m"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment