Skip to content

Instantly share code, notes, and snippets.

@niccai
Last active July 12, 2018 20:12
Show Gist options
  • Save niccai/4968523b0de1b08847d95f86d859e4ca to your computer and use it in GitHub Desktop.
Save niccai/4968523b0de1b08847d95f86d859e4ca to your computer and use it in GitHub Desktop.
Look through your "Projects" dir for a particular dependency and version
for packagejson in $(find ~/Projects -name 'package.json' -path '*node_modules/eslint-scope/*'); do jq '.version' $packagejson | grep '3.7.2' 1>/dev/null; if [[ $? == "0" ]]; then echo $packagejson; fi; done
@niccai
Copy link
Author

niccai commented Jul 12, 2018

  • Requires jq
  • Change to your desired dir, and update package name and version

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment