dependency-cruiser 11.17.0 → 11.18.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.
@@ -49,6 +49,10 @@ try {
49
49
  "-R, --reaches <regex>",
50
50
  "only include modules matching the regex + all modules that can reach it"
51
51
  )
52
+ .option(
53
+ "-H, --highlight <regex>",
54
+ "mark modules matching the regex as 'highlighted'"
55
+ )
52
56
  .option("-x, --exclude <regex>", "exclude all modules matching the regex")
53
57
  .option(
54
58
  "-S, --collapse <regex>",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dependency-cruiser",
3
- "version": "11.17.0",
3
+ "version": "11.18.0",
4
4
  "description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
5
5
  "keywords": [
6
6
  "static analysis",
@@ -140,7 +140,7 @@
140
140
  "version": "npm-run-all build depcruise:graph:doc scm:stage"
141
141
  },
142
142
  "dependencies": {
143
- "acorn": "8.8.0",
143
+ "acorn": "8.8.1",
144
144
  "acorn-jsx": "5.3.2",
145
145
  "acorn-jsx-walk": "2.0.0",
146
146
  "acorn-loose": "8.3.0",
@@ -165,25 +165,25 @@
165
165
  "semver-try-require": "5.0.4",
166
166
  "teamcity-service-messages": "0.1.14",
167
167
  "tsconfig-paths-webpack-plugin": "4.0.0",
168
- "watskeburt": "0.7.0",
168
+ "watskeburt": "0.8.1",
169
169
  "wrap-ansi": "^7.0.0"
170
170
  },
171
171
  "devDependencies": {
172
- "@babel/core": "7.19.3",
173
- "@babel/plugin-transform-modules-commonjs": "7.18.6",
172
+ "@babel/core": "7.19.6",
173
+ "@babel/plugin-transform-modules-commonjs": "7.19.6",
174
174
  "@babel/preset-typescript": "7.18.6",
175
- "@swc/core": "1.3.8",
175
+ "@swc/core": "1.3.10",
176
176
  "@types/lodash": "4.14.186",
177
- "@types/node": "18.11.0",
177
+ "@types/node": "18.11.5",
178
178
  "@types/prompts": "2.4.1",
179
- "@typescript-eslint/eslint-plugin": "5.40.0",
180
- "@typescript-eslint/parser": "5.40.0",
179
+ "@typescript-eslint/eslint-plugin": "5.41.0",
180
+ "@typescript-eslint/parser": "5.41.0",
181
181
  "@vue/compiler-sfc": "3.2.41",
182
182
  "c8": "7.12.0",
183
183
  "chai": "4.3.6",
184
184
  "chai-json-schema": "1.5.1",
185
185
  "coffeescript": "2.7.0",
186
- "eslint": "8.25.0",
186
+ "eslint": "8.26.0",
187
187
  "eslint-config-moving-meadow": "4.0.2",
188
188
  "eslint-config-prettier": "8.5.0",
189
189
  "eslint-plugin-budapestian": "5.0.1",
package/src/cli/format.js CHANGED
@@ -4,20 +4,6 @@ const validateFileExistence = require("./utl/validate-file-existence");
4
4
  const normalizeOptions = require("./normalize-cli-options");
5
5
  const io = require("./utl/io");
6
6
 
7
- const KNOWN_FMT_OPTIONS = [
8
- "collapse",
9
- "exclude",
10
- "focus",
11
- "focusDepth",
12
- "help",
13
- "includeOnly",
14
- "outputTo",
15
- "outputType",
16
- "prefix",
17
- "reaches",
18
- "version",
19
- ];
20
-
21
7
  /**
22
8
  *
23
9
  * @param {string} pResultFile the name of the file with cruise results
@@ -25,7 +11,7 @@ const KNOWN_FMT_OPTIONS = [
25
11
  * @returns {Number} an exitCode
26
12
  */
27
13
  module.exports = async (pResultFile, pOptions) => {
28
- const lOptions = normalizeOptions(pOptions, KNOWN_FMT_OPTIONS);
14
+ const lOptions = normalizeOptions(pOptions);
29
15
 
30
16
  if (pResultFile !== "-") {
31
17
  validateFileExistence(pResultFile);
@@ -7,38 +7,6 @@ const clone = require("lodash/clone");
7
7
  const loadConfig = require("../config-utl/extract-depcruise-config");
8
8
  const defaults = require("./defaults");
9
9
 
10
- const KNOWN_DEPCRUISE_CLI_OPTIONS = [
11
- "babelConfig",
12
- "baseDir",
13
- "cache",
14
- "collapse",
15
- "config",
16
- "doNotFollow",
17
- "exclude",
18
- "focus",
19
- "focusDepth",
20
- "help",
21
- "highlight",
22
- "ignoreKnown",
23
- "includeOnly",
24
- "info",
25
- "init",
26
- "maxDepth",
27
- "metrics",
28
- "moduleSystems",
29
- "outputTo",
30
- "outputType",
31
- "prefix",
32
- "preserveSymlinks",
33
- "progress",
34
- "reaches",
35
- "tsPreCompilationDeps",
36
- "tsConfig",
37
- "validate",
38
- "version",
39
- "webpackConfig",
40
- ];
41
-
42
10
  function getOptionValue(pDefault) {
43
11
  return (pValue) => {
44
12
  let lReturnValue = pDefault;
@@ -50,27 +18,6 @@ function getOptionValue(pDefault) {
50
18
  };
51
19
  }
52
20
 
53
- function isKnownCLIOption(pKnownOptions) {
54
- return (pCandidateString) => pKnownOptions.includes(pCandidateString);
55
- }
56
-
57
- /**
58
- * Remove all attributes from the input object (which'd typically be
59
- * originating from commander) that are not functional dependency-cruiser
60
- * options so a clean object can be passed through to the main function
61
- *
62
- * @param {any} pCliOptions - an options object e.g. as output from commander
63
- * @returns {ICruiseOptions} - an options object that only contains stuff we care about
64
- */
65
- function ejectNonCLIOptions(pCliOptions, pKnownCliOptions) {
66
- return Object.keys(pCliOptions)
67
- .filter(isKnownCLIOption(pKnownCliOptions))
68
- .reduce((pAll, pKey) => {
69
- pAll[pKey] = pCliOptions[pKey];
70
- return pAll;
71
- }, {});
72
- }
73
-
74
21
  function normalizeConfigFileName(pCliOptions, pConfigWrapperName, pDefault) {
75
22
  let lOptions = clone(pCliOptions);
76
23
 
@@ -218,14 +165,12 @@ function normalizeCacheFolderName(pCliOptions) {
218
165
  * @param {any} pKnownCliOptions [description]
219
166
  * @return {object} [description]
220
167
  */
221
- module.exports = function normalizeOptions(
222
- pOptionsAsPassedFromCommander,
223
- pKnownCliOptions = KNOWN_DEPCRUISE_CLI_OPTIONS
224
- ) {
168
+ module.exports = function normalizeOptions(pOptionsAsPassedFromCommander) {
225
169
  let lOptions = {
226
170
  outputTo: defaults.OUTPUT_TO,
227
171
  outputType: defaults.OUTPUT_TYPE,
228
- ...ejectNonCLIOptions(pOptionsAsPassedFromCommander, pKnownCliOptions),
172
+ ...pOptionsAsPassedFromCommander,
173
+ // ...ejectNonCLIOptions(pOptionsAsPassedFromCommander, pKnownCliOptions),
229
174
  };
230
175
 
231
176
  if (has(lOptions, "moduleSystems")) {
@@ -205,6 +205,7 @@ function normalizeFormatOptions(pFormatOptions) {
205
205
  lFormatOptions = normalizeFilterOptions(lFormatOptions, [
206
206
  "exclude",
207
207
  "focus",
208
+ "highlight",
208
209
  "includeOnly",
209
210
  "reaches",
210
211
  ]);
package/src/meta.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* generated - don't edit */
2
2
 
3
3
  module.exports = {
4
- version: "11.17.0",
4
+ version: "11.18.0",
5
5
  engines: {
6
6
  node: "^12.20||^14||>=16",
7
7
  },