dependency-cruiser 16.2.2 → 16.2.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.
@@ -7,6 +7,6 @@ module.exports = {
7
7
  from: {},
8
8
  to: {
9
9
  dependencyTypes: ["core"],
10
- path: "^(punycode|domain|constants|sys|_linklist|_stream_wrap)$",
10
+ path: "^(?:punycode|domain|constants|sys|_linklist|_stream_wrap)$",
11
11
  },
12
12
  };
@@ -2,7 +2,7 @@ const DOT_FILE_PATTERN = "(^|/)\\.[^/]+\\.(js|cjs|mjs|ts|json)$";
2
2
  const TS_DECLARATION_FILE_PATTERN = "\\.d\\.(c|m)?ts$";
3
3
  const TS_CONFIG_FILE_PATTERN = "(^|/)tsconfig\\.json$";
4
4
  const OTHER_CONFIG_FILES_PATTERN =
5
- "(^|/)(babel|webpack)\\.config\\.(js|cjs|mjs|ts|json)$";
5
+ "(^|/)(?:babel|webpack)\\.config\\.(?:js|cjs|mjs|ts|json)$";
6
6
 
7
7
  const KNOWN_CONFIG_FILE_PATTERNS = [
8
8
  DOT_FILE_PATTERN,
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dependency-cruiser",
3
- "version": "16.2.2",
3
+ "version": "16.2.3",
4
4
  "description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
5
5
  "keywords": [
6
6
  "static analysis",
@@ -52,7 +52,7 @@
52
52
  "Daniel Edholm Ignat (https://github.com/dignite)",
53
53
  "Daniel Rodríguez Rivero (https://danielorodriguez.com)",
54
54
  "Nick Ribal (https://github.com/elektronik2k5)",
55
- "Richard Musiol https(://github.com/neelance)",
55
+ "Richard Musiol (https://github.com/neelance)",
56
56
  "Sharang Pai (https://sharangpai.me)",
57
57
  "Stefan Gojan (https://stefan-gojan.de)",
58
58
  "Tharun Rajendran (https://github.com/tharun208)",
@@ -140,7 +140,7 @@
140
140
  "chalk": "5.3.0",
141
141
  "commander": "12.0.0",
142
142
  "enhanced-resolve": "5.15.1",
143
- "figures": "6.0.1",
143
+ "figures": "6.1.0",
144
144
  "ignore": "5.3.1",
145
145
  "indent-string": "5.0.0",
146
146
  "interpret": "^3.1.1",
@@ -138,7 +138,11 @@ function buildMainFieldsAttribute(pInitOptions) {
138
138
  if (pInitOptions.isTypeModule) {
139
139
  return `mainFields: ["module", "main", "types", "typings"],`;
140
140
  }
141
- return `mainFields: ["main", "types", "typings"],`;
141
+ return `
142
+ // if you migrate to ESM (or are in an ESM environment already) you will want to
143
+ // have "module" in the list of mainFields, like so:
144
+ // mainFields: ["module", "main", "types", "typings"],
145
+ mainFields: ["main", "types", "typings"],`;
142
146
  }
143
147
 
144
148
  /**
@@ -25,10 +25,10 @@ module.exports = {
25
25
  from: {
26
26
  orphan: true,
27
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
28
+ '(^|/)[.][^/]+[.](?:js|cjs|mjs|ts|cts|mts|json)$', // dot files
29
+ '[.]d[.]ts$', // TypeScript declaration files
30
+ '(^|/)tsconfig[.]json$', // TypeScript config
31
+ '(^|/)(?:babel|webpack)[.]config[.](?:js|cjs|mjs|ts|cts|mts|json)$' // other configs
32
32
  ]
33
33
  },
34
34
  to: {},
@@ -45,26 +45,26 @@ module.exports = {
45
45
  'core'
46
46
  ],
47
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)$'
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
68
  ],
69
69
  }
70
70
  },
@@ -136,7 +136,7 @@ module.exports = {
136
136
  severity: 'error',
137
137
  from: {},
138
138
  to: {
139
- path: '[.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$'
139
+ path: '[.](?:spec|test)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx|ls|coffee|litcoffee|coffee[.]md)$'
140
140
  }
141
141
  },
142
142
  {
@@ -150,7 +150,7 @@ module.exports = {
150
150
  'from.pathNot re of the not-to-dev-dep rule in the dependency-cruiser configuration',
151
151
  from: {
152
152
  path: '{{sourceLocationRE}}',
153
- pathNot: '[.](spec|test)[.](js|mjs|cjs|ts|ls|coffee|litcoffee|coffee[.]md)$'
153
+ pathNot: '[.](?:spec|test)[.](?:js|mjs|cjs|jsx|ts|mts|cts|tsx|ls|coffee|litcoffee|coffee[.]md)$'
154
154
  },
155
155
  to: {
156
156
  dependencyTypes: [
@@ -338,7 +338,7 @@ module.exports = {
338
338
  collapses everything in node_modules to one folder deep so you see
339
339
  the external modules, but not the innards your app depends upon.
340
340
  */
341
- collapsePattern: 'node_modules/(@[^/]+/[^/]+|[^/]+)',
341
+ collapsePattern: 'node_modules/(?:@[^/]+/[^/]+|[^/]+)',
342
342
 
343
343
  /* Options to tweak the appearance of your graph.See
344
344
  https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions
@@ -362,7 +362,7 @@ module.exports = {
362
362
  dependency graph reporter (\`archi\`) you probably want to tweak
363
363
  this collapsePattern to your situation.
364
364
  */
365
- collapsePattern: '^(packages|src|lib|app|bin|test(s?)|spec(s?))/[^/]+|node_modules/(@[^/]+/[^/]+|[^/]+)',
365
+ collapsePattern: '^(?:packages|src|lib(s?)|app(s?)|bin|test(s?)|spec(s?))/[^/]+|node_modules/(?:@[^/]+/[^/]+|[^/]+)',
366
366
 
367
367
  /* Options to tweak the appearance of your graph.See
368
368
  https://github.com/sverweij/dependency-cruiser/blob/main/doc/options-reference.md#reporteroptions
package/src/meta.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  /* generated - don't edit */
2
2
 
3
3
  module.exports = {
4
- version: "16.2.2",
4
+ version: "16.2.3",
5
5
  engines: {
6
6
  node: "^18.17||>=20",
7
7
  },