Skip to content

Instantly share code, notes, and snippets.

@brettz9
Created December 24, 2019 12:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save brettz9/cbd50d2d9066aef87179756e05aea356 to your computer and use it in GitHub Desktop.
Save brettz9/cbd50d2d9066aef87179756e05aea356 to your computer and use it in GitHub Desktop.
Check for deprecated packages per https://github.com/npm/npm/issues/15536#issuecomment-392657820 (License unknown)
jq -r '.dependencies,.devDependencies|keys[]' 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