Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

dependency-cruiser

Package Overview
Dependencies
Maintainers
1
Versions
536
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

dependency-cruiser - npm Package Compare versions

Comparing version 1.9.3 to 1.10.0

2

package.json
{
"name": "dependency-cruiser",
"version": "1.9.3",
"version": "1.10.0",
"description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",

@@ -5,0 +5,0 @@ "bin": {

"use strict";
const path = require("path");
function propertyEquals(pTo, pRule, pProperty) {

@@ -9,2 +11,7 @@ return pRule.to.hasOwnProperty(pProperty)

function matchesOwnFolder(pFrom, pTo, pOwnFolder) {
return pOwnFolder ? path.dirname(pFrom) === path.dirname(pTo.resolved)
: path.dirname(pFrom) !== path.dirname(pTo.resolved);
}
function matchRule(pFrom, pTo) {

@@ -16,2 +23,3 @@ return pRule =>

(!Boolean(pRule.to.pathNot) || !(pTo.resolved.match(pRule.to.pathNot))) &&
(!pRule.to.hasOwnProperty("ownFolder") || matchesOwnFolder(pFrom, pTo, pRule.to.ownFolder)) &&
propertyEquals(pTo, pRule, "coreModule") &&

@@ -18,0 +26,0 @@ propertyEquals(pTo, pRule, "couldNotResolve");

@@ -97,2 +97,6 @@ {

"description": "Whether or not to match modules dependency-cruiser could not resolve (and probably aren't on disk). For this one too: leave out if you don't care either way."
},
"ownFolder": {
"type": "boolean",
"description": "Whether or not to match modules in the same folder as the 'from'."
}

@@ -99,0 +103,0 @@ }

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