vue-component-meta 1.8.18 → 1.8.20
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 +5 -6
- package/package.json +5 -5
package/out/index.js
CHANGED
|
@@ -336,7 +336,6 @@ ${vue_component_type_helpers_1.code}
|
|
|
336
336
|
exports.baseCreate = baseCreate;
|
|
337
337
|
function createSchemaResolvers(typeChecker, symbolNode, { rawType, schema: options, noDeclarations }, ts, core) {
|
|
338
338
|
const visited = new Set();
|
|
339
|
-
;
|
|
340
339
|
function shouldIgnore(subtype) {
|
|
341
340
|
const name = typeChecker.typeToString(subtype);
|
|
342
341
|
if (name === 'any') {
|
|
@@ -541,9 +540,9 @@ function readVueComponentDefaultProps(vueSourceFile, printer, ts, vueCompilerOpt
|
|
|
541
540
|
return result;
|
|
542
541
|
function scriptSetupWorker() {
|
|
543
542
|
const descriptor = vueSourceFile.sfc;
|
|
544
|
-
const scriptSetupRanges = descriptor.
|
|
545
|
-
if (descriptor.scriptSetup && scriptSetupRanges?.
|
|
546
|
-
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.
|
|
543
|
+
const scriptSetupRanges = descriptor.scriptSetup ? vue.parseScriptSetupRanges(ts, descriptor.scriptSetup.ast, vueCompilerOptions) : undefined;
|
|
544
|
+
if (descriptor.scriptSetup && scriptSetupRanges?.props.withDefaults?.arg) {
|
|
545
|
+
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.props.withDefaults.arg.start, scriptSetupRanges.props.withDefaults.arg.end);
|
|
547
546
|
const ast = ts.createSourceFile('/tmp.' + descriptor.scriptSetup.lang, '(' + defaultsText + ')', ts.ScriptTarget.Latest);
|
|
548
547
|
const obj = findObjectLiteralExpression(ast);
|
|
549
548
|
if (obj) {
|
|
@@ -559,8 +558,8 @@ function readVueComponentDefaultProps(vueSourceFile, printer, ts, vueCompilerOpt
|
|
|
559
558
|
}
|
|
560
559
|
}
|
|
561
560
|
}
|
|
562
|
-
else if (descriptor.scriptSetup && scriptSetupRanges?.
|
|
563
|
-
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.
|
|
561
|
+
else if (descriptor.scriptSetup && scriptSetupRanges?.props.define?.arg) {
|
|
562
|
+
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.props.define.arg.start, scriptSetupRanges.props.define.arg.end);
|
|
564
563
|
const ast = ts.createSourceFile('/tmp.' + descriptor.scriptSetup.lang, '(' + defaultsText + ')', ts.ScriptTarget.Latest);
|
|
565
564
|
const obj = findObjectLiteralExpression(ast);
|
|
566
565
|
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.20",
|
|
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.20",
|
|
18
18
|
"typesafe-path": "^0.2.2",
|
|
19
|
-
"vue-component-type-helpers": "1.8.
|
|
19
|
+
"vue-component-type-helpers": "1.8.20"
|
|
20
20
|
},
|
|
21
21
|
"peerDependencies": {
|
|
22
22
|
"typescript": "*"
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"optional": true
|
|
27
27
|
}
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "c5f0a7f2bec182880504e250fb3c8615a21ebd1e"
|
|
30
30
|
}
|