git pull
all repos locally to parent dir
From the parent dir run the following bash command
$ grep -r 'PackageReference Include' . >> nuget.txt
Using VS Code open nuget.txt and run the following regex to find and replace
find: \./([\w\.-]+)(?:/[\w\.-]+)*/([\w\.-]+)\.csproj:\s+<PackageReference Include="([^"]+)"(?: Version="([^"]+)")? ?/?>
replace: "$1","$2","$3","$4"
The result will be a csv file with REPO, CSPROJ, DEP_NAME, VERSION (add the headers)
From the parent dir run the following bash command
$ find . -name 'package-lock.json' | xargs cat >> all-package-lock.txt
Using VS Code open all-package-lock.txt and use the following regex to find and replace
Step 1
find: \s+"([^"]+)": \{\n\s+"version": "([^"]+)",
replace: \nDEPNODE "$1","$2"
Step 2
find: ^(?!DEPNODE).*\n
** note - replace with empty to remove lines that do not start with DEPNODE
Step 3
find: DEPNODE
** note - space at the end of the pattern, and replace with empty to remove DEPNODE prefix
The result will be a csv file with npm_dep, version
Step 4 (optional, add the headers after this step)
$ sort input.csv | uniq -u > sorted-and-unique.csv