dependency-cruiser 13.0.4 → 13.0.5
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 +23 -12
- package/src/main/resolve-options/normalize.mjs +26 -10
- package/src/meta.js +1 -1
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dependency-cruiser",
|
|
3
|
-
"version": "13.0.
|
|
3
|
+
"version": "13.0.5",
|
|
4
4
|
"description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"static analysis",
|
|
@@ -154,11 +154,11 @@
|
|
|
154
154
|
"acorn-loose": "8.3.0",
|
|
155
155
|
"acorn-walk": "8.2.0",
|
|
156
156
|
"ajv": "8.12.0",
|
|
157
|
-
"chalk": "5.
|
|
157
|
+
"chalk": "5.3.0",
|
|
158
158
|
"commander": "11.0.0",
|
|
159
159
|
"enhanced-resolve": "5.15.0",
|
|
160
160
|
"figures": "5.0.0",
|
|
161
|
-
"glob": "10.
|
|
161
|
+
"glob": "10.3.1",
|
|
162
162
|
"handlebars": "4.7.7",
|
|
163
163
|
"ignore": "5.2.4",
|
|
164
164
|
"indent-string": "5.0.0",
|
|
@@ -169,8 +169,8 @@
|
|
|
169
169
|
"prompts": "2.4.2",
|
|
170
170
|
"rechoir": "^0.8.0",
|
|
171
171
|
"safe-regex": "2.1.1",
|
|
172
|
-
"semver": "^7.5.
|
|
173
|
-
"semver-try-require": "6.2.
|
|
172
|
+
"semver": "^7.5.3",
|
|
173
|
+
"semver-try-require": "6.2.3",
|
|
174
174
|
"teamcity-service-messages": "0.1.14",
|
|
175
175
|
"tsconfig-paths-webpack-plugin": "4.0.1",
|
|
176
176
|
"watskeburt": "0.11.5",
|
|
@@ -180,18 +180,18 @@
|
|
|
180
180
|
"@babel/core": "7.22.5",
|
|
181
181
|
"@babel/plugin-transform-modules-commonjs": "7.22.5",
|
|
182
182
|
"@babel/preset-typescript": "7.22.5",
|
|
183
|
-
"@swc/core": "1.3.
|
|
183
|
+
"@swc/core": "1.3.67",
|
|
184
184
|
"@types/lodash": "4.14.195",
|
|
185
|
-
"@types/node": "20.3.
|
|
185
|
+
"@types/node": "20.3.3",
|
|
186
186
|
"@types/prompts": "2.4.4",
|
|
187
|
-
"@typescript-eslint/eslint-plugin": "5.60.
|
|
188
|
-
"@typescript-eslint/parser": "5.60.
|
|
187
|
+
"@typescript-eslint/eslint-plugin": "5.60.1",
|
|
188
|
+
"@typescript-eslint/parser": "5.60.1",
|
|
189
189
|
"@vue/compiler-sfc": "3.3.4",
|
|
190
190
|
"c8": "8.0.0",
|
|
191
191
|
"chai": "4.3.7",
|
|
192
192
|
"chai-json-schema": "1.5.1",
|
|
193
193
|
"coffeescript": "2.7.0",
|
|
194
|
-
"eslint": "8.
|
|
194
|
+
"eslint": "8.44.0",
|
|
195
195
|
"eslint-config-moving-meadow": "4.0.2",
|
|
196
196
|
"eslint-config-prettier": "8.8.0",
|
|
197
197
|
"eslint-plugin-budapestian": "5.0.1",
|
|
@@ -203,7 +203,7 @@
|
|
|
203
203
|
"eslint-plugin-unicorn": "^47.0.0",
|
|
204
204
|
"husky": "8.0.3",
|
|
205
205
|
"intercept-stdout": "0.1.2",
|
|
206
|
-
"lint-staged": "13.2.
|
|
206
|
+
"lint-staged": "13.2.3",
|
|
207
207
|
"mocha": "10.2.0",
|
|
208
208
|
"normalize-newline": "4.1.0",
|
|
209
209
|
"npm-run-all": "4.1.5",
|
|
@@ -212,11 +212,17 @@
|
|
|
212
212
|
"shx": "0.3.4",
|
|
213
213
|
"svelte": "3.59.1",
|
|
214
214
|
"symlink-dir": "5.1.1",
|
|
215
|
-
"typescript": "5.1.
|
|
215
|
+
"typescript": "5.1.6",
|
|
216
216
|
"upem": "8.0.0",
|
|
217
217
|
"vue-template-compiler": "2.7.14",
|
|
218
218
|
"yarn": "1.22.19"
|
|
219
219
|
},
|
|
220
|
+
"overrides": {
|
|
221
|
+
"semver": "^7.5.3"
|
|
222
|
+
},
|
|
223
|
+
"resolutions": {
|
|
224
|
+
"semver": "^7.5.3"
|
|
225
|
+
},
|
|
220
226
|
"upem": {
|
|
221
227
|
"policies": [
|
|
222
228
|
{
|
|
@@ -228,6 +234,11 @@
|
|
|
228
234
|
"package": "rechoir",
|
|
229
235
|
"policy": "wanted",
|
|
230
236
|
"because": "we want to keep rechoir ~similar to what webpack-cli uses (which is ^0.8.0 since 2022-11-15). See https://github.com/webpack/webpack-cli/blame/master/packages/webpack-cli/package.json"
|
|
237
|
+
},
|
|
238
|
+
{
|
|
239
|
+
"package": "svelte",
|
|
240
|
+
"policy": "pin",
|
|
241
|
+
"because": "upgrading to supporting svelte 4 will require a non-trivial amount of labour (which we are going to invest, but not right now)"
|
|
231
242
|
}
|
|
232
243
|
]
|
|
233
244
|
},
|
|
@@ -63,10 +63,7 @@ function pushPlugin(pPlugins, pPluginToPush) {
|
|
|
63
63
|
return (pPlugins || []).concat(pPluginToPush);
|
|
64
64
|
}
|
|
65
65
|
|
|
66
|
-
|
|
67
|
-
return has(pTSConfig, "options.baseUrl");
|
|
68
|
-
}
|
|
69
|
-
|
|
66
|
+
// eslint-disable-next-line max-lines-per-function
|
|
70
67
|
async function compileResolveOptions(
|
|
71
68
|
pResolveOptions,
|
|
72
69
|
pTSConfig,
|
|
@@ -74,16 +71,12 @@ async function compileResolveOptions(
|
|
|
74
71
|
) {
|
|
75
72
|
let lResolveOptions = {};
|
|
76
73
|
|
|
77
|
-
//
|
|
78
|
-
// otherwise it prints scary messages that it didn't and read the tsConfig
|
|
79
|
-
// (potentially making users think it's dependency-cruiser disregarding the
|
|
80
|
-
// tsconfig). Hence: only load TsConfigPathsPlugin when an options.baseUrl exists
|
|
81
|
-
// Also: there's a performance impact of ~1 ms per resolve even when there
|
|
74
|
+
// There's a performance impact of ~1 ms per resolve even when there
|
|
82
75
|
// are 0 paths in the tsconfig, so not loading it when not necessary
|
|
83
76
|
// will be a win.
|
|
84
77
|
// Also: requiring the plugin only when it's necessary will save some
|
|
85
78
|
// startup time (especially on a cold require cache)
|
|
86
|
-
if (pResolveOptions.tsConfig
|
|
79
|
+
if (pResolveOptions.tsConfig) {
|
|
87
80
|
const { default: TsConfigPathsPlugin } = await import(
|
|
88
81
|
"tsconfig-paths-webpack-plugin"
|
|
89
82
|
);
|
|
@@ -92,6 +85,29 @@ async function compileResolveOptions(
|
|
|
92
85
|
// @ts-expect-error TS2351 "TsConfPathsPlugin is not constructable" - is unjustified
|
|
93
86
|
new TsConfigPathsPlugin({
|
|
94
87
|
configFile: pResolveOptions.tsConfig,
|
|
88
|
+
// TsConfigPathsPlugin requires a baseUrl to be present in the tsconfig,
|
|
89
|
+
// otherwise it prints scary messages that it didn't and read the tsConfig
|
|
90
|
+
// (potentially making users think it's dependency-cruiser disregarding the
|
|
91
|
+
// tsconfig). Hence up till version 13.0.4 dependency-cruiser only loaded
|
|
92
|
+
// TsConfigPathsPlugin when an options.baseUrl existed. However, this
|
|
93
|
+
// isn't necessary anymore:
|
|
94
|
+
// - [tsconfig#baseUrl documentation](https://www.typescriptlang.org/tsconfig#baseUrl)
|
|
95
|
+
// UNrecommends the use of the baseUrl for non-AMD projects
|
|
96
|
+
// - [tsconfig-paths PR #207](https://github.com/dividab/tsconfig-paths/pull/208)
|
|
97
|
+
// 'tolerates' undefined baseUrls
|
|
98
|
+
//
|
|
99
|
+
// Hence, until
|
|
100
|
+
// [tpwp issue #99](https://github.com/dividab/tsconfig-paths-webpack-plugin/issues/99)
|
|
101
|
+
// lands:
|
|
102
|
+
// - pass a default baseUrl to TsConfigPathsPlugin if the baseUrl isn't available
|
|
103
|
+
// - pass undefined in all other cases; TsConfigPathsPlugin will read
|
|
104
|
+
// it from the tsconfig.json in that case. Passing the processed baseUrl
|
|
105
|
+
// (pTSConfig?.options?.baseUrl) instead would've been more obvious, but
|
|
106
|
+
// doesn't work, as that is an absolute path and tsconfig-paths(-wpp)
|
|
107
|
+
// seems to process that again resulting in invalid paths and unresolved
|
|
108
|
+
// or erroneous dependencies
|
|
109
|
+
// eslint-disable-next-line no-undefined
|
|
110
|
+
baseUrl: pTSConfig?.options?.baseUrl ? undefined : "./",
|
|
95
111
|
// TsConfigPathsPlugin doesn't (can't) read enhanced-resolve's
|
|
96
112
|
// list of extensions, and the default it uses for extensions
|
|
97
113
|
// so we do it ourselves - either with the extensions passed
|