Skip to content

Instantly share code, notes, and snippets.

@sagax
Created August 4, 2018 08:09
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 sagax/d580c11028aacd2605c1531bcb2a7fe3 to your computer and use it in GitHub Desktop.
Save sagax/d580c11028aacd2605c1531bcb2a7fe3 to your computer and use it in GitHub Desktop.
Get last version to all dependencies and devDependencies in package.json
# jq - jq-1.5
# awk - GNU Awk 4.2.1, API: 2.0
jq .dependencies,.devDependencies package.json | awk '/^\s/{gsub(/("|:)/, "", $0); command="npm info " $1 " version"; command | getline version; close(command); print " \"" $1 "\": \"" version "\","}'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment