vue-component-meta 1.8.18 → 1.8.19
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/out/index.js +4 -4
- package/package.json +5 -5
package/out/index.js
CHANGED
|
@@ -542,8 +542,8 @@ function readVueComponentDefaultProps(vueSourceFile, printer, ts, vueCompilerOpt
|
|
|
542
542
|
function scriptSetupWorker() {
|
|
543
543
|
const descriptor = vueSourceFile.sfc;
|
|
544
544
|
const scriptSetupRanges = descriptor.scriptSetupAst ? vue.parseScriptSetupRanges(ts, descriptor.scriptSetupAst, vueCompilerOptions) : undefined;
|
|
545
|
-
if (descriptor.scriptSetup && scriptSetupRanges?.
|
|
546
|
-
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.
|
|
545
|
+
if (descriptor.scriptSetup && scriptSetupRanges?.props.withDefaults?.arg) {
|
|
546
|
+
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.props.withDefaults.arg.start, scriptSetupRanges.props.withDefaults.arg.end);
|
|
547
547
|
const ast = ts.createSourceFile('/tmp.' + descriptor.scriptSetup.lang, '(' + defaultsText + ')', ts.ScriptTarget.Latest);
|
|
548
548
|
const obj = findObjectLiteralExpression(ast);
|
|
549
549
|
if (obj) {
|
|
@@ -559,8 +559,8 @@ function readVueComponentDefaultProps(vueSourceFile, printer, ts, vueCompilerOpt
|
|
|
559
559
|
}
|
|
560
560
|
}
|
|
561
561
|
}
|
|
562
|
-
else if (descriptor.scriptSetup && scriptSetupRanges?.
|
|
563
|
-
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.
|
|
562
|
+
else if (descriptor.scriptSetup && scriptSetupRanges?.props.define?.arg) {
|
|
563
|
+
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.props.define.arg.start, scriptSetupRanges.props.define.arg.end);
|
|
564
564
|
const ast = ts.createSourceFile('/tmp.' + descriptor.scriptSetup.lang, '(' + defaultsText + ')', ts.ScriptTarget.Latest);
|
|
565
565
|
const obj = findObjectLiteralExpression(ast);
|
|
566
566
|
if (obj) {
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-component-meta",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.19",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,10 +13,10 @@
|
|
|
13
13
|
"directory": "packages/vue-component-meta"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/typescript": "~1.10.
|
|
17
|
-
"@vue/language-core": "1.8.
|
|
16
|
+
"@volar/typescript": "~1.10.4",
|
|
17
|
+
"@vue/language-core": "1.8.19",
|
|
18
18
|
"typesafe-path": "^0.2.2",
|
|
19
|
-
"vue-component-type-helpers": "1.8.
|
|
19
|
+
"vue-component-type-helpers": "1.8.19"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"typescript": "*"
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"optional": true
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "2e17f3c9cfa827c71e1ed07331730b3ee2596b76"
|
|
30
30
|
}
|