New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

johnny-dependency

Package Overview
Dependencies
Maintainers
1
Versions
8
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

johnny-dependency

npm -ls for remote packages

  • 0.4.4
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
7
decreased by-53.33%
Maintainers
1
Weekly downloads
 
Created
Source

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

// only required for accessing private packages
const pacoteOptions = {
  auth: {
    <NPM_AUTH_TOKEN>,
  },
};

var jd = require('johnny-dependency');

jd('johhny-dependency@latest', pacoteOptions).then((res) => {
  /*
  {
  "name":"johnny-dependency",
  "version":"0.3.0",
  "latestVersion":"0.3.0",
  "children":[
    {
      "name":"lodash",
      "version":"4.17.4",
      "latestVersion":"4.17.4",
      "children":[],
    },
    {
      "name":"rxjs",
      "version":"5.4.2",
      "latestVersion":"5.4.2",
      "children":[
        ...
      ],
    },
    ...
  */
});

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

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:

Keywords

FAQs

Package last updated on 27 Sep 2017

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc