dependency-cruiser 13.1.2 → 13.1.3

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": "13.1.2",
3
+ "version": "13.1.3",
4
4
  "description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
5
5
  "keywords": [
6
6
  "static analysis",
@@ -177,22 +177,21 @@
177
177
  "wrap-ansi": "8.1.0"
178
178
  },
179
179
  "devDependencies": {
180
- "@babel/core": "7.22.9",
180
+ "@babel/core": "7.22.10",
181
181
  "@babel/plugin-transform-modules-commonjs": "7.22.5",
182
182
  "@babel/preset-typescript": "7.22.5",
183
- "@swc/core": "1.3.74",
184
- "@types/lodash": "4.14.196",
185
- "@types/node": "20.4.7",
183
+ "@swc/core": "1.3.76",
184
+ "@types/lodash": "4.14.197",
185
+ "@types/node": "20.4.10",
186
186
  "@types/prompts": "2.4.4",
187
- "@typescript-eslint/eslint-plugin": "6.2.1",
188
- "@typescript-eslint/parser": "6.2.1",
187
+ "@typescript-eslint/eslint-plugin": "6.3.0",
188
+ "@typescript-eslint/parser": "6.3.0",
189
189
  "@vue/compiler-sfc": "3.3.4",
190
190
  "c8": "8.0.1",
191
- "chai": "4.3.7",
192
191
  "coffeescript": "2.7.0",
193
- "eslint": "8.46.0",
192
+ "eslint": "8.47.0",
194
193
  "eslint-config-moving-meadow": "4.0.2",
195
- "eslint-config-prettier": "8.10.0",
194
+ "eslint-config-prettier": "9.0.0",
196
195
  "eslint-plugin-budapestian": "5.0.1",
197
196
  "eslint-plugin-eslint-comments": "3.2.0",
198
197
  "eslint-plugin-import": "2.28.0",
@@ -202,7 +201,7 @@
202
201
  "eslint-plugin-unicorn": "^48.0.1",
203
202
  "husky": "8.0.3",
204
203
  "intercept-stdout": "0.1.2",
205
- "lint-staged": "13.2.3",
204
+ "lint-staged": "13.3.0",
206
205
  "mocha": "10.2.0",
207
206
  "normalize-newline": "4.1.0",
208
207
  "npm-run-all": "4.1.5",
@@ -1,9 +1,6 @@
1
1
  // @ts-check
2
- import Handlebars from "handlebars/runtime.js";
3
2
  import { folderNameArrayToRE } from "./utl.mjs";
4
-
5
- /* eslint import/no-unassigned-import: 0 */
6
- await import("./config.js.template.js");
3
+ import configTemplate from "./config-template.mjs";
7
4
 
8
5
  /**
9
6
  * @param {string} pString
@@ -24,25 +21,166 @@ function extensionsToString(pExtensions) {
24
21
  return "";
25
22
  }
26
23
 
24
+ /**
25
+ * @param {import("./types.js").IInitConfig} pInitOptions
26
+ * @returns {string}
27
+ */
28
+ function buildNotToTestRule(pInitOptions) {
29
+ const lNotToTestRule = `{
30
+ name: 'not-to-test',
31
+ comment:
32
+ "This module depends on code within a folder that should only contain tests. As tests don't " +
33
+ "implement functionality this is odd. Either you're writing a test outside the test folder " +
34
+ "or there's something in the test folder that isn't a test.",
35
+ severity: 'error',
36
+ from: {
37
+ pathNot: '{{testLocationRE}}'
38
+ },
39
+ to: {
40
+ path: '{{testLocationRE}}'
41
+ }
42
+ },`;
43
+ return pInitOptions.hasTestsOutsideSource
44
+ ? lNotToTestRule.replace(
45
+ /{{testLocationRE}}/g,
46
+ folderNameArrayToRE(pInitOptions?.testLocation ?? []),
47
+ )
48
+ : "";
49
+ }
50
+
51
+ /**
52
+ * @param {import("./types.js").IInitConfig} pInitOptions
53
+ * @returns {string}
54
+ */
55
+ function buildTsPreCompilationDepsAttribute(pInitOptions) {
56
+ return pInitOptions.tsPreCompilationDeps
57
+ ? "tsPreCompilationDeps: true,"
58
+ : "// tsPreCompilationDeps: false,";
59
+ }
60
+
61
+ /**
62
+ * @param {import("./types.js").IInitConfig} pInitOptions
63
+ * @returns {string}
64
+ */
65
+ function buildCombinedDependenciesAttribute(pInitOptions) {
66
+ return pInitOptions.combinedDependencies
67
+ ? "combinedDependencies: true,"
68
+ : "// combinedDependencies: false,";
69
+ }
70
+
71
+ /**
72
+ * @param {import("./types.js").IInitConfig} pInitOptions
73
+ * @returns {string}
74
+ */
75
+ function buildTsOrJsConfigAttribute(pInitOptions) {
76
+ if (pInitOptions.useTsConfig) {
77
+ return `tsConfig: {
78
+ fileName: '${pInitOptions.tsConfig}'
79
+ },`;
80
+ }
81
+ if (pInitOptions.useJsConfig) {
82
+ return `tsConfig: {
83
+ fileName: '${pInitOptions.jsConfig}'
84
+ },`;
85
+ }
86
+ return `// tsConfig: {
87
+ // fileName: 'tsconfig.json'
88
+ // },`;
89
+ }
90
+
91
+ /**
92
+ * @param {import("./types.js").IInitConfig} pInitOptions
93
+ * @returns {string}
94
+ */
95
+ function buildWebpackConfigAttribute(pInitOptions) {
96
+ return pInitOptions.webpackConfig
97
+ ? `webpackConfig: {
98
+ fileName: '${pInitOptions.webpackConfig}',
99
+ // env: {},
100
+ // arguments: {}
101
+ },`
102
+ : `// webpackConfig: {
103
+ // fileName: 'webpack.config.js',
104
+ // env: {},
105
+ // arguments: {}
106
+ // },`;
107
+ }
108
+
109
+ /**
110
+ * @param {import("./types.js").IInitConfig} pInitOptions
111
+ * @returns {string}
112
+ */
113
+ function buildBabelConfigAttribute(pInitOptions) {
114
+ return pInitOptions.babelConfig
115
+ ? `babelConfig: {
116
+ fileName: '${pInitOptions.babelConfig}'
117
+ },`
118
+ : `// babelConfig: {
119
+ // fileName: '.babelrc',
120
+ // },`;
121
+ }
122
+
123
+ /**
124
+ * @param {import("./types.js").IInitConfig} pInitOptions
125
+ * @returns {string}
126
+ */
127
+ function buildExtensionsAttribute(pInitOptions) {
128
+ return pInitOptions.specifyResolutionExtensions
129
+ ? `extensions: ${extensionsToString(pInitOptions.resolutionExtensions)},`
130
+ : `// extensions: [".js", ".jsx", ".ts", ".tsx", ".d.ts"],`;
131
+ }
132
+
133
+ /**
134
+ * @param {import("./types.js").IInitConfig} pInitOptions
135
+ * @returns {string}
136
+ */
137
+ function buildMainFieldsAttribute(pInitOptions) {
138
+ return pInitOptions.usesTypeScript
139
+ ? `mainFields: ["main", "types"],`
140
+ : `// mainFields: ["main", "types"],`;
141
+ }
142
+
27
143
  /**
28
144
  * Creates a .dependency-cruiser config with a set of basic validations
29
145
  * to the current directory.
30
146
  *
31
- * @param {import("./types.js").IInitConfig} pNormalizedInitOptions Options that influence the shape of
147
+ * @param {import("./types.js").IInitConfig} pInitOptions ('Normalized') options that influence the shape of
32
148
  * the configuration
33
149
  * @returns {string} the configuration as a string
34
150
  */
35
-
36
- export default function buildConfig(pNormalizedInitOptions) {
37
- return Handlebars.templates["config.js.template.hbs"]({
38
- ...pNormalizedInitOptions,
39
-
40
- sourceLocationRE: folderNameArrayToRE(
41
- pNormalizedInitOptions.sourceLocation
42
- ),
43
- testLocationRE: folderNameArrayToRE(pNormalizedInitOptions.testLocation),
44
- resolutionExtensionsAsString: extensionsToString(
45
- pNormalizedInitOptions.resolutionExtensions
46
- ),
47
- });
151
+ export default function buildConfig(pInitOptions) {
152
+ return configTemplate
153
+ .replace(
154
+ /{{sourceLocationRE}}/g,
155
+ folderNameArrayToRE(pInitOptions.sourceLocation),
156
+ )
157
+ .replace(
158
+ /{{resolutionExtensionsAsString}}/g,
159
+ extensionsToString(pInitOptions.resolutionExtensions),
160
+ )
161
+ .replace("{{notToTestRule}}", buildNotToTestRule(pInitOptions))
162
+ .replace(
163
+ "{{tsPreCompilationDepsAttribute}}",
164
+ buildTsPreCompilationDepsAttribute(pInitOptions),
165
+ )
166
+ .replace(
167
+ "{{combinedDependenciesAttribute}}",
168
+ buildCombinedDependenciesAttribute(pInitOptions),
169
+ )
170
+ .replace(
171
+ "{{tsOrJsConfigAttribute}}",
172
+ buildTsOrJsConfigAttribute(pInitOptions),
173
+ )
174
+ .replace(
175
+ "{{webpackConfigAttribute}}",
176
+ buildWebpackConfigAttribute(pInitOptions),
177
+ )
178
+ .replace(
179
+ "{{babelConfigAttribute}}",
180
+ buildBabelConfigAttribute(pInitOptions),
181
+ )
182
+ .replace("{{extensionsAttribute}}", buildExtensionsAttribute(pInitOptions))
183
+ .replace("{{mainFieldsAttribute}}", buildMainFieldsAttribute(pInitOptions))
184
+ .replace("{{version}}", pInitOptions.version)
185
+ .replace("{{date}}", pInitOptions.date);
48
186
  }
@@ -0,0 +1,443 @@
1
+ /* eslint-disable max-lines, no-useless-escape */
2
+ export default `/** @type {import('dependency-cruiser').IConfiguration} */
3
+ module.exports = {
4
+ forbidden: [
5
+ {
6
+ name: 'no-circular',
7
+ severity: 'warn',
8
+ comment:
9
+ 'This dependency is part of a circular relationship. You might want to revise ' +
10
+ 'your solution (i.e. use dependency inversion, make sure the modules have a single responsibility) ',
11
+ from: {},
12
+ to: {
13
+ circular: true
14
+ }
15
+ },
16
+ {
17
+ name: 'no-orphans',
18
+ comment:
19
+ "This is an orphan module - it's likely not used (anymore?). Either use it or " +
20
+ "remove it. If it's logical this module is an orphan (i.e. it's a config file), " +
21
+ "add an exception for it in your dependency-cruiser configuration. By default " +
22
+ "this rule does not scrutinize dot-files (e.g. .eslintrc.js), TypeScript declaration " +
23
+ "files (.d.ts), tsconfig.json and some of the babel and webpack configs.",
24
+ severity: 'warn',
25
+ from: {
26
+ orphan: true,
27
+ pathNot: [
28
+ '(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$', // dot files
29
+ '\\.d\\.ts$', // TypeScript declaration files
30
+ '(^|/)tsconfig\\.json$', // TypeScript config
31
+ '(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$' // other configs
32
+ ]
33
+ },
34
+ to: {},
35
+ },
36
+ {
37
+ name: 'no-deprecated-core',
38
+ comment:
39
+ 'A module depends on a node core module that has been deprecated. Find an alternative - these are ' +
40
+ "bound to exist - node doesn't deprecate lightly.",
41
+ severity: 'warn',
42
+ from: {},
43
+ to: {
44
+ dependencyTypes: [
45
+ 'core'
46
+ ],
47
+ path: [
48
+ '^(v8\/tools\/codemap)$',
49
+ '^(v8\/tools\/consarray)$',
50
+ '^(v8\/tools\/csvparser)$',
51
+ '^(v8\/tools\/logreader)$',
52
+ '^(v8\/tools\/profile_view)$',
53
+ '^(v8\/tools\/profile)$',
54
+ '^(v8\/tools\/SourceMap)$',
55
+ '^(v8\/tools\/splaytree)$',
56
+ '^(v8\/tools\/tickprocessor-driver)$',
57
+ '^(v8\/tools\/tickprocessor)$',
58
+ '^(node-inspect\/lib\/_inspect)$',
59
+ '^(node-inspect\/lib\/internal\/inspect_client)$',
60
+ '^(node-inspect\/lib\/internal\/inspect_repl)$',
61
+ '^(async_hooks)$',
62
+ '^(punycode)$',
63
+ '^(domain)$',
64
+ '^(constants)$',
65
+ '^(sys)$',
66
+ '^(_linklist)$',
67
+ '^(_stream_wrap)$'
68
+ ],
69
+ }
70
+ },
71
+ {
72
+ name: 'not-to-deprecated',
73
+ comment:
74
+ 'This module uses a (version of an) npm module that has been deprecated. Either upgrade to a later ' +
75
+ 'version of that module, or find an alternative. Deprecated modules are a security risk.',
76
+ severity: 'warn',
77
+ from: {},
78
+ to: {
79
+ dependencyTypes: [
80
+ 'deprecated'
81
+ ]
82
+ }
83
+ },
84
+ {
85
+ name: 'no-non-package-json',
86
+ severity: 'error',
87
+ comment:
88
+ "This module depends on an npm package that isn't in the 'dependencies' section of your package.json. " +
89
+ "That's problematic as the package either (1) won't be available on live (2 - worse) will be " +
90
+ "available on live with an non-guaranteed version. Fix it by adding the package to the dependencies " +
91
+ "in your package.json.",
92
+ from: {},
93
+ to: {
94
+ dependencyTypes: [
95
+ 'npm-no-pkg',
96
+ 'npm-unknown'
97
+ ]
98
+ }
99
+ },
100
+ {
101
+ name: 'not-to-unresolvable',
102
+ comment:
103
+ "This module depends on a module that cannot be found ('resolved to disk'). If it's an npm " +
104
+ 'module: add it to your package.json. In all other cases you likely already know what to do.',
105
+ severity: 'error',
106
+ from: {},
107
+ to: {
108
+ couldNotResolve: true
109
+ }
110
+ },
111
+ {
112
+ name: 'no-duplicate-dep-types',
113
+ comment:
114
+ "Likely this module depends on an external ('npm') package that occurs more than once " +
115
+ "in your package.json i.e. bot as a devDependencies and in dependencies. This will cause " +
116
+ "maintenance problems later on.",
117
+ severity: 'warn',
118
+ from: {},
119
+ to: {
120
+ moreThanOneDependencyType: true,
121
+ // as it's pretty common to have a type import be a type only import
122
+ // _and_ (e.g.) a devDependency - don't consider type-only dependency
123
+ // types for this rule
124
+ dependencyTypesNot: ["type-only"]
125
+ }
126
+ },
127
+
128
+ /* rules you might want to tweak for your specific situation: */
129
+ {{notToTestRule}}
130
+ {
131
+ name: 'not-to-spec',
132
+ comment:
133
+ 'This module depends on a spec (test) file. The sole responsibility of a spec file is to test code. ' +
134
+ "If there's something in a spec that's of use to other modules, it doesn't have that single " +
135
+ 'responsibility anymore. Factor it out into (e.g.) a separate utility/ helper or a mock.',
136
+ severity: 'error',
137
+ from: {},
138
+ to: {
139
+ path: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$'
140
+ }
141
+ },
142
+ {
143
+ name: 'not-to-dev-dep',
144
+ severity: 'error',
145
+ comment:
146
+ "This module depends on an npm package from the 'devDependencies' section of your " +
147
+ 'package.json. It looks like something that ships to production, though. To prevent problems ' +
148
+ "with npm packages that aren't there on production declare it (only!) in the 'dependencies'" +
149
+ 'section of your package.json. If this module is development only - add it to the ' +
150
+ 'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration',
151
+ from: {
152
+ path: '{{sourceLocationRE}}',
153
+ pathNot: '\\.(spec|test)\\.(js|mjs|cjs|ts|ls|coffee|litcoffee|coffee\\.md)$'
154
+ },
155
+ to: {
156
+ dependencyTypes: [
157
+ 'npm-dev'
158
+ ]
159
+ }
160
+ },
161
+ {
162
+ name: 'optional-deps-used',
163
+ severity: 'info',
164
+ comment:
165
+ "This module depends on an npm package that is declared as an optional dependency " +
166
+ "in your package.json. As this makes sense in limited situations only, it's flagged here. " +
167
+ "If you're using an optional dependency here by design - add an exception to your" +
168
+ "dependency-cruiser configuration.",
169
+ from: {},
170
+ to: {
171
+ dependencyTypes: [
172
+ 'npm-optional'
173
+ ]
174
+ }
175
+ },
176
+ {
177
+ name: 'peer-deps-used',
178
+ comment:
179
+ "This module depends on an npm package that is declared as a peer dependency " +
180
+ "in your package.json. This makes sense if your package is e.g. a plugin, but in " +
181
+ "other cases - maybe not so much. If the use of a peer dependency is intentional " +
182
+ "add an exception to your dependency-cruiser configuration.",
183
+ severity: 'warn',
184
+ from: {},
185
+ to: {
186
+ dependencyTypes: [
187
+ 'npm-peer'
188
+ ]
189
+ }
190
+ }
191
+ ],
192
+ options: {
193
+
194
+ /* conditions specifying which files not to follow further when encountered:
195
+ - path: a regular expression to match
196
+ - dependencyTypes: see https://github.com/sverweij/dependency-cruiser/blob/main/doc/rules-reference.md#dependencytypes-and-dependencytypesnot
197
+ for a complete list
198
+ */
199
+ doNotFollow: {
200
+ path: 'node_modules'
201
+ },
202
+
203
+ /* conditions specifying which dependencies to exclude
204
+ - path: a regular expression to match
205
+ - dynamic: a boolean indicating whether to ignore dynamic (true) or static (false) dependencies.
206
+ leave out if you want to exclude neither (recommended!)
207
+ */
208
+ // exclude : {
209
+ // path: '',
210
+ // dynamic: true
211
+ // },
212
+
213
+ /* pattern specifying which files to include (regular expression)
214
+ dependency-cruiser will skip everything not matching this pattern
215
+ */
216
+ // includeOnly : '',
217
+
218
+ /* dependency-cruiser will include modules matching against the focus
219
+ regular expression in its output, as well as their neighbours (direct
220
+ dependencies and dependents)
221
+ */
222
+ // focus : '',
223
+
224
+ /* list of module systems to cruise */
225
+ // moduleSystems: ['amd', 'cjs', 'es6', 'tsd'],
226
+
227
+ /* prefix for links in html and svg output (e.g. 'https://github.com/you/yourrepo/blob/develop/'
228
+ to open it on your online repo or \`vscode://file/$\{process.cwd()}/\` to
229
+ open it in visual studio code),
230
+ */
231
+ // prefix: '',
232
+
233
+ /* false (the default): ignore dependencies that only exist before typescript-to-javascript compilation
234
+ true: also detect dependencies that only exist before typescript-to-javascript compilation
235
+ "specify": for each dependency identify whether it only exists before compilation or also after
236
+ */
237
+ {{tsPreCompilationDepsAttribute}}
238
+
239
+ /*
240
+ list of extensions to scan that aren't javascript or compile-to-javascript.
241
+ Empty by default. Only put extensions in here that you want to take into
242
+ account that are _not_ parsable.
243
+ */
244
+ // extraExtensionsToScan: [".json", ".jpg", ".png", ".svg", ".webp"],
245
+
246
+ /* if true combines the package.jsons found from the module up to the base
247
+ folder the cruise is initiated from. Useful for how (some) mono-repos
248
+ manage dependencies & dependency definitions.
249
+ */
250
+ {{combinedDependenciesAttribute}}
251
+
252
+ /* if true leave symlinks untouched, otherwise use the realpath */
253
+ // preserveSymlinks: false,
254
+
255
+ /* TypeScript project file ('tsconfig.json') to use for
256
+ (1) compilation and
257
+ (2) resolution (e.g. with the paths property)
258
+
259
+ The (optional) fileName attribute specifies which file to take (relative to
260
+ dependency-cruiser's current working directory). When not provided
261
+ defaults to './tsconfig.json'.
262
+ */
263
+ {{tsOrJsConfigAttribute}}
264
+
265
+ /* Webpack configuration to use to get resolve options from.
266
+
267
+ The (optional) fileName attribute specifies which file to take (relative
268
+ to dependency-cruiser's current working directory. When not provided defaults
269
+ to './webpack.conf.js'.
270
+
271
+ The (optional) \`env\` and \`arguments\` attributes contain the parameters to be passed if
272
+ your webpack config is a function and takes them (see webpack documentation
273
+ for details)
274
+ */
275
+ {{webpackConfigAttribute}}
276
+
277
+ /* Babel config ('.babelrc', '.babelrc.json', '.babelrc.json5', ...) to use
278
+ for compilation (and whatever other naughty things babel plugins do to
279
+ source code). This feature is well tested and usable, but might change
280
+ behavior a bit over time (e.g. more precise results for used module
281
+ systems) without dependency-cruiser getting a major version bump.
282
+ */
283
+ {{babelConfigAttribute}}
284
+
285
+ /* List of strings you have in use in addition to cjs/ es6 requires
286
+ & imports to declare module dependencies. Use this e.g. if you've
287
+ re-declared require, use a require-wrapper or use window.require as
288
+ a hack.
289
+ */
290
+ // exoticRequireStrings: [],
291
+ /* options to pass on to enhanced-resolve, the package dependency-cruiser
292
+ uses to resolve module references to disk. You can set most of these
293
+ options in a webpack.conf.js - this section is here for those
294
+ projects that don't have a separate webpack config file.
295
+
296
+ Note: settings in webpack.conf.js override the ones specified here.
297
+ */
298
+ enhancedResolveOptions: {
299
+ /* List of strings to consider as 'exports' fields in package.json. Use
300
+ ['exports'] when you use packages that use such a field and your environment
301
+ supports it (e.g. node ^12.19 || >=14.7 or recent versions of webpack).
302
+
303
+ If you have an \`exportsFields\` attribute in your webpack config, that one
304
+ will have precedence over the one specified here.
305
+ */
306
+ exportsFields: ["exports"],
307
+ /* List of conditions to check for in the exports field. e.g. use ['imports']
308
+ if you're only interested in exposed es6 modules, ['require'] for commonjs,
309
+ or all conditions at once \`(['import', 'require', 'node', 'default']\`)
310
+ if anything goes for you. Only works when the 'exportsFields' array is
311
+ non-empty.
312
+
313
+ If you have a 'conditionNames' attribute in your webpack config, that one will
314
+ have precedence over the one specified here.
315
+ */
316
+ conditionNames: ["import", "require", "node", "default"],
317
+ /*
318
+ The extensions, by default are the same as the ones dependency-cruiser
319
+ can access (run \`npx depcruise --info\` to see which ones that are in
320
+ _your_ environment. If that list is larger than what you need (e.g.
321
+ it contains .js, .jsx, .ts, .tsx, .cts, .mts - but you don't use
322
+ TypeScript you can pass just the extensions you actually use (e.g.
323
+ [".js", ".jsx"]). This can speed up the most expensive step in
324
+ dependency cruising (module resolution) quite a bit.
325
+ */
326
+ {{extensionsAttribute}}
327
+ /*
328
+ If your TypeScript project makes use of types specified in 'types'
329
+ fields in package.jsons of external dependencies, specify "types"
330
+ in addition to "main" in here, so enhanced-resolve (the resolver
331
+ dependency-cruiser uses) knows to also look there. You can also do
332
+ this if you're not sure, but still use TypeScript. In a future version
333
+ of dependency-cruiser this will likely become the default.
334
+ */
335
+ {{mainFieldsAttribute}}
336
+ },
337
+ reporterOptions: {
338
+ dot: {
339
+ /* pattern of modules that can be consolidated in the detailed
340
+ graphical dependency graph. The default pattern in this configuration
341
+ collapses everything in node_modules to one folder deep so you see
342
+ the external modules, but not the innards your app depends upon.
343
+ */
344
+ collapsePattern: 'node_modules/(@[^/]+/[^/]+|[^/]+)',
345
+
346
+ /* Options to tweak the appearance of your graph.See
347
+ https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions
348
+ for details and some examples. If you don't specify a theme
349
+ don't worry - dependency-cruiser will fall back to the default one.
350
+ */
351
+ // theme: {
352
+ // graph: {
353
+ // /* use splines: "ortho" for straight lines. Be aware though
354
+ // graphviz might take a long time calculating ortho(gonal)
355
+ // routings.
356
+ // */
357
+ // splines: "true"
358
+ // },
359
+ // modules: [
360
+ // {
361
+ // criteria: { matchesFocus: true },
362
+ // attributes: {
363
+ // fillcolor: "lime",
364
+ // penwidth: 2,
365
+ // },
366
+ // },
367
+ // {
368
+ // criteria: { matchesFocus: false },
369
+ // attributes: {
370
+ // fillcolor: "lightgrey",
371
+ // },
372
+ // },
373
+ // {
374
+ // criteria: { matchesReaches: true },
375
+ // attributes: {
376
+ // fillcolor: "lime",
377
+ // penwidth: 2,
378
+ // },
379
+ // },
380
+ // {
381
+ // criteria: { matchesReaches: false },
382
+ // attributes: {
383
+ // fillcolor: "lightgrey",
384
+ // },
385
+ // },
386
+ // {
387
+ // criteria: { source: "^src/model" },
388
+ // attributes: { fillcolor: "#ccccff" }
389
+ // },
390
+ // {
391
+ // criteria: { source: "^src/view" },
392
+ // attributes: { fillcolor: "#ccffcc" }
393
+ // },
394
+ // ],
395
+ // dependencies: [
396
+ // {
397
+ // criteria: { "rules[0].severity": "error" },
398
+ // attributes: { fontcolor: "red", color: "red" }
399
+ // },
400
+ // {
401
+ // criteria: { "rules[0].severity": "warn" },
402
+ // attributes: { fontcolor: "orange", color: "orange" }
403
+ // },
404
+ // {
405
+ // criteria: { "rules[0].severity": "info" },
406
+ // attributes: { fontcolor: "blue", color: "blue" }
407
+ // },
408
+ // {
409
+ // criteria: { resolved: "^src/model" },
410
+ // attributes: { color: "#0000ff77" }
411
+ // },
412
+ // {
413
+ // criteria: { resolved: "^src/view" },
414
+ // attributes: { color: "#00770077" }
415
+ // }
416
+ // ]
417
+ // }
418
+ },
419
+ archi: {
420
+ /* pattern of modules that can be consolidated in the high level
421
+ graphical dependency graph. If you use the high level graphical
422
+ dependency graph reporter (\`archi\`) you probably want to tweak
423
+ this collapsePattern to your situation.
424
+ */
425
+ collapsePattern: '^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)',
426
+
427
+ /* Options to tweak the appearance of your graph.See
428
+ https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions
429
+ for details and some examples. If you don't specify a theme
430
+ for 'archi' dependency-cruiser will use the one specified in the
431
+ dot section (see above), if any, and otherwise use the default one.
432
+ */
433
+ // theme: {
434
+ // },
435
+ },
436
+ "text": {
437
+ "highlightFocused": true
438
+ },
439
+ }
440
+ }
441
+ };
442
+ // generated: dependency-cruiser@{{version}} on {{date}}
443
+ `;
package/src/meta.js CHANGED
@@ -1,7 +1,7 @@
1
1
  /* generated - don't edit */
2
2
 
3
3
  module.exports = {
4
- version: "13.1.2",
4
+ version: "13.1.3",
5
5
  engines: {
6
6
  node: "^16.14||>=18",
7
7
  },