Skip to content

Instantly share code, notes, and snippets.

@donatj
Created April 14, 2020 21:43
Show Gist options
  • Save donatj/9f7acb99551b7f78e73b55bfb0836ef0 to your computer and use it in GitHub Desktop.
Save donatj/9f7acb99551b7f78e73b55bfb0836ef0 to your computer and use it in GitHub Desktop.
Recursively get every dependency and version from package-lock.json
cat package-lock.json | jq -r '.. | select(.>={}) | .dependencies | select(. != null) | to_entries[] | .key + ": " + .value.version' | sort | uniq
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment