dependency-cruiser
Advanced tools
Comparing version 1.9.0 to 1.9.1
{ | ||
"name": "dependency-cruiser", | ||
"version": "1.9.0", | ||
"version": "1.9.1", | ||
"description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.", | ||
@@ -36,3 +36,3 @@ "bin": { | ||
"chai-json-schema": "1.4.0", | ||
"eslint": "3.12.0", | ||
"eslint": "3.12.2", | ||
"eslint-plugin-security": "1.2.0", | ||
@@ -63,3 +63,3 @@ "intercept-stdout": "0.1.2", | ||
"lodash": "4.17.2", | ||
"resolve": "1.1.7", | ||
"resolve": "1.2.0", | ||
"safe-regex": "1.1.0", | ||
@@ -66,0 +66,0 @@ "semver": "5.3.0", |
@@ -8,3 +8,3 @@ # Dependency cruiser ![Dependency cruiser](https://raw.githubusercontent.com/sverweij/dependency-cruiser/master/doc/assets/ZKH-Dependency-recolored-160.png) | ||
- Run through the dependencies in any JavaScript, TypeScript or CoffeeScript project and ... | ||
- ... **validate** them against (your own) rules | ||
- ... **validate** them against (your own) [rules](./doc/rules.md) | ||
- ... **report** violated rules | ||
@@ -14,3 +14,3 @@ - in text (for in your builds) | ||
As a nice side effect it can generate [**cool dependency graphs**](https://github.com/sverweij/dependency-cruiser/blob/master/doc/real-world-samples.md) | ||
As a side effect it can generate [**cool dependency graphs**](https://github.com/sverweij/dependency-cruiser/blob/master/doc/real-world-samples.md) | ||
you can stick on the wall to impress your grandma. | ||
@@ -17,0 +17,0 @@ |
@@ -17,36 +17,3 @@ { | ||
"description": "A list of violations found in the dependencies. The dependencies themselves also contain this information, this summary is here for convenience.", | ||
"items": { | ||
"type": "object", | ||
"required": ["from", "to", "rule"], | ||
"additionalProperties": false, | ||
"properties" : { | ||
"from": { | ||
"type": "string" | ||
}, | ||
"to": { | ||
"type": "string" | ||
}, | ||
"rule": { | ||
"type": "object", | ||
"description": "If there was a rule violation (valid === false), this object contains the name of the rule and severity of violating it.", | ||
"required": [ "name", "severity" ], | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The (short, eslint style) name of the violated rule. Typically something like 'no-core-punycode' or 'no-outside-deps'." | ||
}, | ||
"severity": { | ||
"type": "string", | ||
"enum": [ | ||
"error", | ||
"warn", | ||
"info" | ||
], | ||
"description": "The severity of the violation. Only errors make reporters return non-zero exit codes." | ||
} | ||
} | ||
} | ||
} | ||
} | ||
"items": { "$ref": "#/definitions/ViolationType"} | ||
}, | ||
@@ -65,45 +32,3 @@ "error": { | ||
}, | ||
"optionsUsed": { | ||
"type": "object", | ||
"description": "the (command line) options used to generate the dependency-tree", | ||
"additionalProperties": false, | ||
"properties": { | ||
"rulesFile": { | ||
"type": "string", | ||
"description": "The rules file used to validate the dependencies (if any)" | ||
}, | ||
"outputTo": { | ||
"type": "string", | ||
"description": "File the output was written to ('-' for stdout)" | ||
}, | ||
"exclude": { | ||
"type": "string", | ||
"description": "The regular expression used for excluding modules from being cruised" | ||
}, | ||
"system": { | ||
"type": "array", | ||
"items": { | ||
"type": "string", | ||
"enum": [ | ||
"cjs", | ||
"amd", | ||
"es6" | ||
] | ||
} | ||
}, | ||
"outputType": { | ||
"type": "string", | ||
"enum": [ | ||
"html", | ||
"dot", | ||
"err", | ||
"json", | ||
"vis" | ||
] | ||
}, | ||
"prefix": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
"optionsUsed": { "$ref": "#/definitions/OptionsType" } | ||
} | ||
@@ -133,3 +58,3 @@ }, | ||
"type": "boolean", | ||
"description": "'true' if dependency-cruiser could not resulve the module name in the source code to a file name or core module. 'false' in all other cases." | ||
"description": "'true' if dependency-cruiser could not resolve the module name in the source code to a file name or core module. 'false' in all other cases." | ||
}, | ||
@@ -171,11 +96,3 @@ "dependencies": { | ||
}, | ||
"moduleSystem": { | ||
"type": "string", | ||
"enum": [ | ||
"cjs", | ||
"amd", | ||
"es6" | ||
], | ||
"description": "The module system according to which this 'module' is a dependency of the one specified in 'source'" | ||
}, | ||
"moduleSystem": { "$ref": "#/definitions/ModuleSystemType" }, | ||
"valid": { | ||
@@ -185,23 +102,3 @@ "type": "boolean", | ||
}, | ||
"rule": { | ||
"type": "object", | ||
"description": "If there was a rule violation (valid === false), this object contains the name of the rule and severity of violating it.", | ||
"required": [ "name", "severity" ], | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The (short, eslint style) name of the violated rule. Typically something like 'no-core-punycode' or 'no-outside-deps'." | ||
}, | ||
"severity": { | ||
"type": "string", | ||
"enum": [ | ||
"error", | ||
"warn", | ||
"info" | ||
], | ||
"description": "The severity of the violation. Only errors make reporters return non-zero exit codes." | ||
} | ||
} | ||
} | ||
"rule": { "$ref": "#/definitions/RuleSummaryType" } | ||
} | ||
@@ -213,3 +110,86 @@ } | ||
} | ||
}, | ||
"definitions": { | ||
"SeverityType": { | ||
"type": "string", | ||
"description": "How severe a violation of a rule is. The 'error' severity will make some reporters return a non-zero exit code, so if you want e.g. a build to stop when there's a rule violated: use that.", | ||
"enum": [ | ||
"error", | ||
"warn", | ||
"info" | ||
] | ||
}, | ||
"RuleSummaryType": { | ||
"type": "object", | ||
"description": "If there was a rule violation (valid === false), this object contains the name of the rule and severity of violating it.", | ||
"required": [ "name", "severity" ], | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "The (short, eslint style) name of the violated rule. Typically something like 'no-core-punycode' or 'no-outside-deps'." | ||
}, | ||
"severity": { "$ref": "#/definitions/SeverityType"} | ||
} | ||
}, | ||
"ViolationType": { | ||
"type": "object", | ||
"required": ["from", "to", "rule"], | ||
"additionalProperties": false, | ||
"properties" : { | ||
"from": { | ||
"type": "string" | ||
}, | ||
"to": { | ||
"type": "string" | ||
}, | ||
"rule": { "$ref": "#/definitions/RuleSummaryType"} | ||
} | ||
}, | ||
"ModuleSystemType": { | ||
"type": "string", | ||
"enum": [ | ||
"cjs", | ||
"amd", | ||
"es6" | ||
] | ||
}, | ||
"OutputType": { | ||
"type": "string", | ||
"enum": [ | ||
"html", | ||
"dot", | ||
"err", | ||
"json", | ||
"vis" | ||
] | ||
}, | ||
"OptionsType": { | ||
"type": "object", | ||
"description": "the (command line) options used to generate the dependency-tree", | ||
"additionalProperties": false, | ||
"properties": { | ||
"rulesFile": { | ||
"type": "string", | ||
"description": "The rules file used to validate the dependencies (if any)" | ||
}, | ||
"outputTo": { | ||
"type": "string", | ||
"description": "File the output was written to ('-' for stdout)" | ||
}, | ||
"exclude": { | ||
"type": "string", | ||
"description": "The regular expression used for excluding modules from being cruised" | ||
}, | ||
"system": { | ||
"type": "array", | ||
"items": {"$ref": "#/definitions/ModuleSystemType" } | ||
}, | ||
"outputType": { "$ref": "#/definitions/OutputType" }, | ||
"prefix": { | ||
"type": "string" | ||
} | ||
} | ||
} | ||
} | ||
} |
@@ -26,3 +26,3 @@ "use strict"; | ||
function formatSummary(pMeta) { | ||
let lMessage = `\n${figures.cross} ${sumMeta(pMeta)} violations (${formatMeta(pMeta)}) \n\n`; | ||
let lMessage = `\n${figures.cross} ${sumMeta(pMeta)} dependency violations (${formatMeta(pMeta)}) \n\n`; | ||
@@ -38,3 +38,3 @@ return pMeta.error > 0 ? chalk.red(lMessage) : lMessage; | ||
{ | ||
dependencies: "" | ||
dependencies: `\n${chalk.green(figures.tick)} no dependency violations found \n\n` | ||
} | ||
@@ -41,0 +41,0 @@ ); |
@@ -12,61 +12,3 @@ { | ||
"items": { | ||
"type": "object", | ||
"required": [ "from", "to" ], | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "A short name for the rule - will appear in reporters to enable customers to quickly identify a violated rule. Try to keep them short, eslint style. E.g. 'not-to-core' for a rule forbidding dependencies on core modules, or 'not-to-unresolvable' for one that prevents dependencies on modules that probably don't exist." | ||
}, | ||
"severity": { | ||
"type": "string", | ||
"description": "How severe a violation of this rule is. The 'error' severity will make some reporters return a non-zero exit code, so if you want e.g. a build to stop when there's a rule violated use that.", | ||
"enum": [ | ||
"error", | ||
"warn", | ||
"info" | ||
] | ||
}, | ||
"comment": { | ||
"type": "string", | ||
"description": "You can use this field to document why the rule is there." | ||
}, | ||
"from": { | ||
"type": "object", | ||
"description": "Criteria a 'from' end of a dependency should match to be catched by this rule. Leave it empty if you want any module to be matched.", | ||
"additionalProperties": false, | ||
"properties": { | ||
"path": { | ||
"type": "string", | ||
"description": "A regular expression the 'from' end of a dependency should match to be catched by this rule." | ||
}, | ||
"pathNot": { | ||
"type": "string", | ||
"description": "A regular expression the 'from' end of a dependency should NOT match to be catched by this rule." | ||
} | ||
} | ||
}, | ||
"to": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"path": { | ||
"type": "string", | ||
"description": "A regular expression the 'to' end of a dependency should match to be catched by this rule." | ||
}, | ||
"pathNot": { | ||
"type": "string", | ||
"description": "A regular expression the 'to' end of a dependency should NOT match to be catched by this rule." | ||
}, | ||
"coreModule": { | ||
"type": "boolean", | ||
"description": "Whether or not to match node.js core modules. Leave out if you don't care either way." | ||
}, | ||
"couldNotResolve": { | ||
"type": "boolean", | ||
"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." | ||
} | ||
} | ||
} | ||
} | ||
"$ref": "#/definitions/ForiddenRuleType" | ||
} | ||
@@ -78,43 +20,93 @@ }, | ||
"items": { | ||
"type": "object", | ||
"required": [ "from", "to" ], | ||
"additionalProperties": false, | ||
"properties": { | ||
"comment" : { | ||
"type": "string" | ||
}, | ||
"from": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"path": { | ||
"type": "string" | ||
}, | ||
"pathNot": { | ||
"type": "string" | ||
} | ||
} | ||
}, | ||
"to": { | ||
"type": "object", | ||
"additionalProperties": false, | ||
"properties": { | ||
"path": { | ||
"type": "string" | ||
}, | ||
"pathNot": { | ||
"type": "string" | ||
}, | ||
"coreModule": { | ||
"type": "boolean" | ||
}, | ||
"couldNotResolve": { | ||
"type": "boolean" | ||
} | ||
} | ||
} | ||
"$ref" :"#/definitions/RuleType" | ||
} | ||
} | ||
}, | ||
"definitions": { | ||
"RuleType": { | ||
"type": "object", | ||
"required": [ "from", "to" ], | ||
"additionalProperties": false, | ||
"properties": { | ||
"comment" : { | ||
"type": "string" | ||
}, | ||
"from": { | ||
"$ref": "#/definitions/RestrictionType" | ||
}, | ||
"to": { | ||
"$ref": "#/definitions/ToRestrictionType" | ||
} | ||
} | ||
}, | ||
"ForiddenRuleType": { | ||
"type": "object", | ||
"required": [ "from", "to" ], | ||
"additionalProperties": false, | ||
"properties": { | ||
"name": { | ||
"type": "string", | ||
"description": "A short name for the rule - will appear in reporters to enable customers to quickly identify a violated rule. Try to keep them short, eslint style. E.g. 'not-to-core' for a rule forbidding dependencies on core modules, or 'not-to-unresolvable' for one that prevents dependencies on modules that probably don't exist." | ||
}, | ||
"severity": { "$ref": "#/definitions/SeverityType"}, | ||
"comment": { | ||
"type": "string", | ||
"description": "You can use this field to document why the rule is there." | ||
}, | ||
"from": { | ||
"$ref": "#/definitions/RestrictionType" | ||
}, | ||
"to": { | ||
"$ref": "#/definitions/ToRestrictionType" | ||
} | ||
} | ||
}, | ||
"RestrictionType": { | ||
"type": "object", | ||
"description": "Criteria an end of a dependency should match to be catched by this rule. Leave it empty if you want any module to be matched.", | ||
"additionalProperties": false, | ||
"properties": { | ||
"path": { | ||
"type": "string", | ||
"description": "A regular expression an end of a dependency should match to be catched by this rule." | ||
}, | ||
"pathNot": { | ||
"type": "string", | ||
"description": "A regular expression an end of a dependency should NOT match to be catched by this rule." | ||
} | ||
} | ||
}, | ||
"ToRestrictionType": { | ||
"type": "object", | ||
"description": "blablabla", | ||
"additionalProperties": false, | ||
"properties" : { | ||
"path": { | ||
"type": "string", | ||
"description": "A regular expression an end of a dependency should match to be catched by this rule." | ||
}, | ||
"pathNot": { | ||
"type": "string", | ||
"description": "A regular expression an end of a dependency should NOT match to be catched by this rule." | ||
}, | ||
"coreModule": { | ||
"type": "boolean", | ||
"description": "Whether or not to match node.js core modules. Leave out if you don't care either way." | ||
}, | ||
"couldNotResolve": { | ||
"type": "boolean", | ||
"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." | ||
} | ||
} | ||
}, | ||
"SeverityType": { | ||
"type": "string", | ||
"description": "How severe a violation of a rule is. The 'error' severity will make some reporters return a non-zero exit code, so if you want e.g. a build to stop when there's a rule violated: use that.", | ||
"enum": [ | ||
"error", | ||
"warn", | ||
"info" | ||
] | ||
} | ||
} | ||
} |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
430701
1851
+ Addedresolve@1.2.0(transitive)
- Removedresolve@1.1.7(transitive)
Updatedresolve@1.2.0