dependency-cruiser 18.5.0 → 18.6.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/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "dependency-cruiser",
|
|
3
|
-
"version": "18.
|
|
3
|
+
"version": "18.6.0",
|
|
4
4
|
"description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"static analysis",
|
|
@@ -143,14 +143,14 @@
|
|
|
143
143
|
"README.md"
|
|
144
144
|
],
|
|
145
145
|
"dependencies": {
|
|
146
|
-
"acorn": "8.
|
|
146
|
+
"acorn": "8.19.0",
|
|
147
147
|
"acorn-jsx": "5.3.2",
|
|
148
148
|
"acorn-jsx-walk": "2.0.0",
|
|
149
149
|
"acorn-loose": "8.5.2",
|
|
150
150
|
"acorn-walk": "8.3.5",
|
|
151
151
|
"commander": "15.0.0",
|
|
152
152
|
"enhanced-resolve": "5.26.0",
|
|
153
|
-
"ignore": "7.0.
|
|
153
|
+
"ignore": "7.0.12",
|
|
154
154
|
"interpret": "3.1.1",
|
|
155
155
|
"is-installed-globally": "1.0.1",
|
|
156
156
|
"json5": "2.2.3",
|
|
@@ -20,12 +20,33 @@ function getTranspiler(pTranspilerWrapper) {
|
|
|
20
20
|
? /* c8 ignore next */
|
|
21
21
|
preProcess(pSource, pTranspilerWrapper, pTranspilerOptions)
|
|
22
22
|
: pSource;
|
|
23
|
+
return compileWithAsyncFallback(lPreProcessedSource);
|
|
24
|
+
};
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
/**
|
|
28
|
+
* svelte >= 5.36 compiles `await` at a component's top level, in $derived and
|
|
29
|
+
* in markup only when the `experimental.async` compiler option is set (svelte 6
|
|
30
|
+
* makes async the default and drops the option). Compile without it first, so
|
|
31
|
+
* the output of every other component stays exactly what it was, and retry
|
|
32
|
+
* with the option only when svelte reports the `experimental_async` error.
|
|
33
|
+
*
|
|
34
|
+
* @param {string} pSource
|
|
35
|
+
* @returns {string}
|
|
36
|
+
*/
|
|
37
|
+
function compileWithAsyncFallback(pSource) {
|
|
38
|
+
try {
|
|
23
39
|
// in svelte 5 one must provide the second argument
|
|
24
40
|
// lest it throws because it's accessing a property
|
|
25
41
|
// in it. In svelte 4 (which also takes compiler
|
|
26
42
|
// options there) this isn't necessary.
|
|
27
|
-
return compile(
|
|
28
|
-
}
|
|
43
|
+
return compile(pSource, {}).js.code;
|
|
44
|
+
} catch (pError) {
|
|
45
|
+
if (pError?.code === "experimental_async") {
|
|
46
|
+
return compile(pSource, { experimental: { async: true } }).js.code;
|
|
47
|
+
}
|
|
48
|
+
throw pError;
|
|
49
|
+
}
|
|
29
50
|
}
|
|
30
51
|
|
|
31
52
|
export default function svelteWrap(pTranspilerWrapper) {
|