johhny-dependency
npm -ls for remote packages
Summary
johnny-dependency
fetches the dependency tree metadata for a remote npm package.
Additionally johnny-dependency
fetches information about the latest version of dependency packages
so that you have information about the health of a package's dependency tree
(ie how out of date dependencies are).
Usage
$ npm install johnny-dependency
const pacoteOptions = {
auth: {
<NPM_AUTH_TOKEN>,
},
};
var jd = require('johnny-dependency');
jd('johhny-dependency@latest', pacoteOptions).then((res) => {
});
johnny-dependency
will prune any circular dependencies in its return data
CLI
johnny-dependency
also ships with a cli script that allows you to get info about a remote package from the command-line
johnny-dependency johnny-dependency@latest
![Screenshot](https://github.com/alex-e-leon/johnny-dependency/raw/HEAD/./docs/screenshot.png)
Private Packages
johnny-dependency
works for private packages as well -
you just need to provide an auth token in the optional pacoteOptions
argument.
See usage for an example.
If using the cli johnny-dependency will look for a token in .npmrc
in your home dir.
Thank you
A big thank you to the following for their help: