Skip to content

Instantly share code, notes, and snippets.

@jziggas
Created April 14, 2023 17:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save jziggas/59d3d2b8de3c13f00d671818bd3f5942 to your computer and use it in GitHub Desktop.
Save jziggas/59d3d2b8de3c13f00d671818bd3f5942 to your computer and use it in GitHub Desktop.
Get a flattened list of all nested dependencies inside an NPM based repository
npm ls -all -parseable true | grep -oP '^.*\/\K.*$' | sort -u
@jziggas
Copy link
Author

jziggas commented Apr 14, 2023

This doesn't include version numbers. Getting version numbers requires using npm ls -json true and using scripting to flatten

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