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

monodeps

Package Overview
Dependencies
Maintainers
1
Versions
7
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

monodeps

simple tool to return list of cross dependant packages in a monorepo

  • 1.0.7
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
10
Maintainers
1
Weekly downloads
 
Created
Source

deps

Load dependency sorted array of package objects. Built to assist with publishing a monorepo containing multiple publishable modules were those modules may depend on another module defined in the monorepo. This is critical when attempting to lock in cross-dependencies with lock files. Unfortuantly a solution such as lerna does not work well with accurantly genating package lock files.

install

npm install monodeps

usage

const monodeps = require('monodeps')

/*
where folder example contains 3 packages: a,b,c.
c depends on b and a, b depends on a, a has no cross dependency.
*/
try{
  let packages = await deps.loadPackagesAsync("/example")

  console.log( packages[0].package.name ) // -> 'a'
  console.log( packages[1].package.name ) // -> 'b'
  console.log( packages[2].package.name ) // -> 'c'

  console.log( packages[0].path ) // -> /example/a
  console.log( packages[1].path ) // -> /example/b
  console.log( packages[2].path ) // -> /example/c

} catch(err){
  console.error(err) // -> "Error: circular dependency
}

Keywords

FAQs

Package last updated on 09 Jun 2020

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