Code Monkey home page Code Monkey logo

dependencies-hierarchy's Introduction

This package has been moved to the pnpm multi-package repository.

dependencies-hierarchy

Creates a dependencies hierarchy for a symlinked `node_modules`

npm version Build Status

A symlinked node_modules is created when installing using pnpm.

Install

Install it via npm.

npm install dependencies-hierarchy

Usage

'use strict'
const hierarchyForPackages = require('dependencies-hierarchy').forPackages

hierarchyForPackages(['graceful-fs', {name: 'pify', range: '2'}], __dirname, {depth: 2})
  .then(tree => {
    console.log(JSON.stringify(tree, null, 2))
    //> [
    //    {
    //      "dependencies": [
    //        {
    //          "dependencies": [
    //            {
    //              "pkg": {
    //                "name": "graceful-fs",
    //                "path": "registry.npmjs.org/graceful-fs/4.1.11",
    //                "version": "4.1.11"
    //              },
    //              "searched": true
    //            },
    //            {
    //              "pkg": {
    //                "name": "pify",
    //                "path": "registry.npmjs.org/pify/2.3.0",
    //                "version": "2.3.0"
    //              },
    //              "searched": true
    //            }
    //          ],
    //          "pkg": {
    //            "name": "write-json-file",
    //            "path": "registry.npmjs.org/write-json-file/2.2.0",
    //            "version": "2.2.0"
    //          }
    //        }
    //      ],
    //      "pkg": {
    //        "name": "write-pkg",
    //        "path": "registry.npmjs.org/write-pkg/3.1.0",
    //        "version": "3.1.0"
    //      }
    //    }
    //  ]
  })

API

default: dependenciesHierarchy(projectPath, [opts]): Promise<Hierarchy>

Creates a dependency tree for a project's node_modules.

Arguments:

  • projectPath - String - The path to the project.
  • [opts.depth] - Number - 0 by default. How deep should the node_modules be analyzed.
  • [opts.only] - 'dev' | 'prod' - Optional. If set to dev, then only packages from devDependencies are analyzed. If set to prod, then only packages from dependencies are analyzed.

forPackages(packageSelectors, projectPath, [opts]): Promise<Hierarchy>

Creates a dependency tree for a project's node_modules. Limits the results to only the paths to the packages named.

Arguments:

  • packageSelectors - (string | {name: string, version: string})[] - An array that consist of package names or package names and version ranges. E.g. ['foo', {name: 'bar', version: '^2.0.0'}].
  • projectPath - String - The path to the project
  • [opts.depth] - Number - 0 by default. How deep should the node_modules be analyzed.
  • [opts.only] - 'dev' | 'prod' - Optional. If set to dev, then only packages from devDependencies are analyzed. If set to prod, then only packages from dependencies are analyzed.

License

MIT Β© Zoltan Kochan

dependencies-hierarchy's People

Contributors

greenkeeper[bot] avatar renovate-bot avatar zkochan avatar

Stargazers

 avatar

Watchers

 avatar  avatar  avatar

dependencies-hierarchy's Issues

An in-range update of @types/node is breaking the build 🚨

Version 8.0.16 of @types/node just got published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.0.15
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project this is very likely breaking your project right now. If other packages depend on you it’s very likely also breaking them.
I recommend you give this issue a very high priority. I’m sure you can resolve this πŸ’ͺ

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

Not sure how things should work exactly?

There is a collection of frequently asked questions and of course you may always ask my humans.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 8.5.3 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.5.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of pnpm-shrinkwrap is breaking the build 🚨

Version 3.3.3 of pnpm-shrinkwrap was just published.

Branch Build failing 🚨
Dependency pnpm-shrinkwrap
Current Version 3.3.2
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

pnpm-shrinkwrap is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build failed Details

Commits

The new version differs by 2 commits.

  • 67d2da5 chore: release 3.3.3
  • 548b5ea fix: pnpm-logger is a peer dependency

See the full diff

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

An in-range update of @types/node is breaking the build 🚨

Version 8.0.46 of @types/node was just published.

Branch Build failing 🚨
Dependency @types/node
Current Version 8.0.45
Type dependency

This version is covered by your current version range and after updating it in your project the build failed.

@types/node is a direct dependency of this project, and it is very likely causing it to break. If other packages depend on yours, this update is probably also breaking those in turn.

Status Details
  • ❌ continuous-integration/travis-ci/push The Travis CI build could not complete due to an error Details

FAQ and help

There is a collection of frequently asked questions. If those don’t help, you can always ask the humans behind Greenkeeper.


Your Greenkeeper Bot 🌴

Action Required: Fix Renovate Configuration

There is an error with this repository's Renovate configuration that needs to be fixed. As a precaution, Renovate will stop PRs until it is resolved.

Error type: Preset name not found within published preset config (monorepo:angularmaterial). Note: this is a nested preset so please contact the preset author if you are unable to fix it yourself.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.