Last active
October 12, 2023 18:19
-
-
Save kgust/2e64ed67151159a035c2 to your computer and use it in GitHub Desktop.
Using jq to parse composer.lock
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<composer.lock jq '.packages[] | [.name, .version]' | less |
Get all information for one package:
jq '."packages-dev"[] | select(.name=="10up/wp_mock")' composer.lock
Get current installed version for one package:
jq '."packages-dev"[] | select(.name=="johnpbloch/wordpress") | .version' composer.lock
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Thanks :)
Using it with a low-effort
sd
pipeline to produce CSV that can be copy-pasted into a spreadsheet:Outputs a CSV list in the shape of: