dependency-cruiser 11.2.0 → 11.2.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dependency-cruiser",
3
- "version": "11.2.0",
3
+ "version": "11.2.1",
4
4
  "description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
5
5
  "keywords": [
6
6
  "static analysis",
package/src/cli/format.js CHANGED
@@ -6,7 +6,6 @@ const io = require("./utl/io");
6
6
 
7
7
  const KNOWN_FMT_OPTIONS = [
8
8
  "collapse",
9
- "doNotFollow",
10
9
  "exclude",
11
10
  "focus",
12
11
  "help",
package/src/meta.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* generated - don't edit */
2
2
 
3
3
  module.exports = {
4
- version: "11.2.0",
4
+ version: "11.2.1",
5
5
  engines: {
6
6
  node: "^12.20||^14||>=16",
7
7
  },
@@ -1,6 +1,5 @@
1
1
  import { ICruiseResult } from "./cruise-result";
2
- import { ICruiseOptions } from "./options";
3
- import { OutputType } from "./shared-types";
2
+ import { ICruiseOptions, IFormatOptions } from "./options";
4
3
 
5
4
  export * from "./rule-set";
6
5
  export * from "./options";
@@ -128,7 +127,7 @@ export function futureCruise(
128
127
  */
129
128
  export function format(
130
129
  pResult: ICruiseResult,
131
- pOutputType: OutputType
130
+ pFormatOptions: IFormatOptions
132
131
  ): IReporterOutput;
133
132
 
134
133
  /**
@@ -245,3 +245,35 @@ export interface ICruiseOptions {
245
245
  */
246
246
  metrics?: boolean;
247
247
  }
248
+
249
+ export interface IFormatOptions {
250
+ /**
251
+ * regular expression describing which dependencies the function
252
+ * should not cruise
253
+ */
254
+ exclude?: string | string[] | IExcludeType;
255
+ /**
256
+ * regular expression describing which dependencies the function
257
+ * should cruise - anything not matching this will be skipped
258
+ */
259
+ includeOnly?: string | string[] | IIncludeOnlyType;
260
+ /**
261
+ * dependency-cruiser will include modules matching this regular expression
262
+ * in its output, as well as their neighbours (direct dependencies and
263
+ * dependents)
264
+ */
265
+ focus?: string | string[] | IFocusType;
266
+ /**
267
+ * collapse a to a folder depth by passing a single digit (e.g. 2).
268
+ * When passed a regex collapse to that pattern
269
+ *
270
+ * E.g. ^packages/[^/]+/ would collapse to modules/ folders directly under
271
+ * your packages folder.
272
+ */
273
+ collapse?: string | number;
274
+ /**
275
+ * one of "json", "html", "dot", "csv" or "err". When left
276
+ * out the function will return a javascript object as dependencies
277
+ */
278
+ outputType?: OutputType;
279
+ }