Skip to content

Instantly share code, notes, and snippets.

@PieterScheffers
Created March 24, 2021 16:41
Show Gist options
  • Save PieterScheffers/247e85bc27256d732fe7cb8096a7b21d to your computer and use it in GitHub Desktop.
Save PieterScheffers/247e85bc27256d732fe7cb8096a7b21d to your computer and use it in GitHub Desktop.
Get package-lock.json version for devDependencies
for package in $(jq -r '.devDependencies | keys | .[]' package.json); do version=$(jq -r --arg pkg $package '.dependencies[$pkg].version' package-lock.json); echo "$package: $version"; done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment