dependency-cruiser 16.3.4 → 16.3.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "dependency-cruiser",
3
- "version": "16.3.4",
3
+ "version": "16.3.5",
4
4
  "description": "Validate and visualize dependencies. With your rules. JavaScript, TypeScript, CoffeeScript. ES6, CommonJS, AMD.",
5
5
  "keywords": [
6
6
  "static analysis",
@@ -57,7 +57,8 @@
57
57
  "Stefan Gojan (https://stefan-gojan.de)",
58
58
  "Tharun Rajendran (https://github.com/tharun208)",
59
59
  "electrovir (https://github.com/electrovir)",
60
- "fusheng (https://github.com/lin-hun)"
60
+ "fusheng (https://github.com/lin-hun)",
61
+ "Frederik Schubert (https://github.com/ferdynator)"
61
62
  ],
62
63
  "type": "module",
63
64
  "license": "MIT",
@@ -53,7 +53,15 @@ function vue3Transpile(pSource) {
53
53
  }
54
54
 
55
55
  function vue2Transpile(pSource) {
56
- return vueTemplateCompiler.parseComponent(pSource)?.script?.content ?? "";
56
+ const lParsedComponent = vueTemplateCompiler.parseComponent(pSource);
57
+ const lScriptContent = lParsedComponent?.script?.content ?? "";
58
+ const lScriptSetupContent = lParsedComponent?.scriptSetup?.content ?? "";
59
+
60
+ if (lScriptContent && lScriptSetupContent) {
61
+ return lScriptContent + EOL + lScriptSetupContent;
62
+ }
63
+
64
+ return lScriptContent || lScriptSetupContent;
57
65
  }
58
66
 
59
67
  module.exports = {
package/src/meta.cjs CHANGED
@@ -1,7 +1,7 @@
1
1
  /* generated - don't edit */
2
2
 
3
3
  module.exports = {
4
- version: "16.3.4",
4
+ version: "16.3.5",
5
5
  engines: {
6
6
  node: "^18.17||>=20",
7
7
  },