vue-component-meta 2.1.6 → 2.1.8
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/lib/base.js +3 -3
- package/package.json +6 -5
package/lib/base.js
CHANGED
|
@@ -407,7 +407,7 @@ function createSchemaResolvers(typeChecker, symbolNode, { rawType, schema: optio
|
|
|
407
407
|
function resolveSlotProperties(prop) {
|
|
408
408
|
const propType = typeChecker.getNonNullableType(typeChecker.getTypeOfSymbolAtLocation(prop, symbolNode));
|
|
409
409
|
const signatures = propType.getCallSignatures();
|
|
410
|
-
const paramType = signatures[0]
|
|
410
|
+
const paramType = signatures[0]?.parameters[0];
|
|
411
411
|
const subtype = paramType ? typeChecker.getTypeOfSymbolAtLocation(paramType, symbolNode) : typeChecker.getAnyType();
|
|
412
412
|
let schema;
|
|
413
413
|
let declarations;
|
|
@@ -564,7 +564,7 @@ function readVueComponentDefaultProps(vueSourceFile, printer, ts, vueCompilerOpt
|
|
|
564
564
|
scriptWorker();
|
|
565
565
|
return result;
|
|
566
566
|
function scriptSetupWorker() {
|
|
567
|
-
const descriptor = vueSourceFile.
|
|
567
|
+
const descriptor = vueSourceFile._sfc;
|
|
568
568
|
const scriptSetupRanges = descriptor.scriptSetup ? vue.parseScriptSetupRanges(ts, descriptor.scriptSetup.ast, vueCompilerOptions) : undefined;
|
|
569
569
|
if (descriptor.scriptSetup && scriptSetupRanges?.props.withDefaults?.arg) {
|
|
570
570
|
const defaultsText = descriptor.scriptSetup.content.substring(scriptSetupRanges.props.withDefaults.arg.start, scriptSetupRanges.props.withDefaults.arg.end);
|
|
@@ -608,7 +608,7 @@ function readVueComponentDefaultProps(vueSourceFile, printer, ts, vueCompilerOpt
|
|
|
608
608
|
}
|
|
609
609
|
}
|
|
610
610
|
function scriptWorker() {
|
|
611
|
-
const descriptor = vueSourceFile.
|
|
611
|
+
const descriptor = vueSourceFile._sfc;
|
|
612
612
|
if (descriptor.script) {
|
|
613
613
|
const scriptResult = readTsComponentDefaultProps(descriptor.script.lang, descriptor.script.content, 'default', printer, ts);
|
|
614
614
|
for (const [key, value] of Object.entries(scriptResult)) {
|
package/package.json
CHANGED
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-component-meta",
|
|
3
|
-
"version": "2.1.
|
|
3
|
+
"version": "2.1.8",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"**/*.js",
|
|
7
7
|
"**/*.d.ts"
|
|
8
8
|
],
|
|
9
|
+
"sideEffects": false,
|
|
9
10
|
"repository": {
|
|
10
11
|
"type": "git",
|
|
11
12
|
"url": "https://github.com/vuejs/language-tools.git",
|
|
12
13
|
"directory": "packages/component-meta"
|
|
13
14
|
},
|
|
14
15
|
"dependencies": {
|
|
15
|
-
"@volar/typescript": "~2.4.
|
|
16
|
-
"@vue/language-core": "2.1.
|
|
16
|
+
"@volar/typescript": "~2.4.8",
|
|
17
|
+
"@vue/language-core": "2.1.8",
|
|
17
18
|
"path-browserify": "^1.0.1",
|
|
18
|
-
"vue-component-type-helpers": "2.1.
|
|
19
|
+
"vue-component-type-helpers": "2.1.8"
|
|
19
20
|
},
|
|
20
21
|
"peerDependencies": {
|
|
21
22
|
"typescript": "*"
|
|
@@ -29,5 +30,5 @@
|
|
|
29
30
|
"@types/node": "latest",
|
|
30
31
|
"@types/path-browserify": "latest"
|
|
31
32
|
},
|
|
32
|
-
"gitHead": "
|
|
33
|
+
"gitHead": "25cccedc53e7361ed4e34296d6ecd43d7de2a095"
|
|
33
34
|
}
|