dependency-cruiser 18.3.0 → 18.4.0
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/README.md +1 -1
- package/bin/dependency-cruiser.mjs +2 -2
- package/package.json +1 -1
- package/src/analyze/summarize/get-stats.mjs +38 -3
- package/src/analyze/summarize/index.mjs +30 -6
- package/src/extract/swc/dependency-visitor.mjs +5 -1
- package/src/meta.cjs +1 -1
- package/src/report/azure-devops.mjs +6 -2
- package/src/report/baseline.mjs +22 -7
- package/src/report/error-html/error-html-template.mjs +2 -0
- package/src/report/error-html/index.mjs +84 -8
- package/src/report/error.mjs +62 -13
- package/src/report/markdown.mjs +17 -9
- package/src/report/null.mjs +6 -3
- package/src/report/teamcity.mjs +4 -1
- package/src/schema/configuration.validate.mjs +1 -1
- package/src/schema/cruise-result.validate.mjs +1 -1
- package/types/cruise-result.d.mts +14 -0
- package/types/options.d.mts +16 -2
|
@@ -342,6 +342,20 @@ export interface ISummary {
|
|
|
342
342
|
* the number of informational level notices in the dependencies
|
|
343
343
|
*/
|
|
344
344
|
info: number;
|
|
345
|
+
/**
|
|
346
|
+
* the number of violations in the baseline
|
|
347
|
+
*/
|
|
348
|
+
baselineSize?: number;
|
|
349
|
+
/**
|
|
350
|
+
* the number of violations in the baseline that matched violations from the current cruise
|
|
351
|
+
*/
|
|
352
|
+
baselineStale?: number;
|
|
353
|
+
/**
|
|
354
|
+
* for reporters that emit non-zero exit codes: the number of errors encountered OR, in case
|
|
355
|
+
* options.baseline.staleEntriesSeverity equals 'error' - the number of errors encountered +
|
|
356
|
+
* the number of stale entries in the baseline.
|
|
357
|
+
*/
|
|
358
|
+
advisedExitCode: number;
|
|
345
359
|
optionsUsed: IOptions;
|
|
346
360
|
/**
|
|
347
361
|
* rules used in the cruise
|
package/types/options.d.mts
CHANGED
|
@@ -10,13 +10,17 @@ import type {
|
|
|
10
10
|
} from "./filter-types.mjs";
|
|
11
11
|
import type { IReporterOptions } from "./reporter-options.mjs";
|
|
12
12
|
import type { IFlattenedRuleSet } from "./rule-set.mjs";
|
|
13
|
-
import type {
|
|
13
|
+
import type {
|
|
14
|
+
ModuleSystemType,
|
|
15
|
+
OutputType,
|
|
16
|
+
SeverityType,
|
|
17
|
+
} from "./shared-types.mjs";
|
|
14
18
|
|
|
15
19
|
export type ExternalModuleResolutionStrategyType = "node_modules" | "yarn-pnp";
|
|
16
20
|
export type ProgressType =
|
|
17
21
|
"cli-feedback" | "performance-log" | "ndjson" | "none";
|
|
18
22
|
export type ParserType = "acorn" | "tsc" | "swc";
|
|
19
|
-
export type BaselineModeType = "full" | "shrink-only";
|
|
23
|
+
export type BaselineModeType = "full" | "shrink-only" | "format";
|
|
20
24
|
|
|
21
25
|
export interface ITsConfig {
|
|
22
26
|
fileName?: string;
|
|
@@ -437,8 +441,18 @@ export interface ICruiseOptions {
|
|
|
437
441
|
* 'full' - replaces all violations with the current set (the default behaviour)
|
|
438
442
|
* 'shrink-only' - keeps existing violations, removes fixed violations, but
|
|
439
443
|
* does not add new ones.
|
|
444
|
+
* 'format' - rewrites the baseline, but doesn't remove or add anything - only
|
|
445
|
+
* showing the stats.
|
|
440
446
|
*/
|
|
441
447
|
mode?: BaselineModeType;
|
|
448
|
+
/**
|
|
449
|
+
* Severity to use when there's stale entries in the baseline. In reporters that can
|
|
450
|
+
* emit non-zero exit codes (like err, err-long and null), when the value of this attribute
|
|
451
|
+
* equals 'error' and there's stale entries in the baseline, they'll exit with a non-zero
|
|
452
|
+
* exit code.
|
|
453
|
+
* Defaults to 'warn'
|
|
454
|
+
*/
|
|
455
|
+
staleEntriesSeverity?: SeverityType;
|
|
442
456
|
};
|
|
443
457
|
}
|
|
444
458
|
|