vue-component-meta 1.0.16 → 1.0.18
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 -5
- package/package.json +4 -4
package/out/index.js
CHANGED
|
@@ -95,7 +95,7 @@ function baseCreate(_host, checkerOptions, globalComponentName, ts) {
|
|
|
95
95
|
},
|
|
96
96
|
});
|
|
97
97
|
const vueLanguageModule = vue.createLanguageModule(host.getTypeScriptModule(), host.getCurrentDirectory(), host.getCompilationSettings(), host.getVueCompilationSettings());
|
|
98
|
-
const core = embedded.
|
|
98
|
+
const core = embedded.createLanguageContext(host, [vueLanguageModule]);
|
|
99
99
|
const proxyApis = checkerOptions.forceUseTs ? {
|
|
100
100
|
getScriptKind: (fileName) => {
|
|
101
101
|
if (fileName.endsWith('.vue.js')) {
|
|
@@ -104,10 +104,10 @@ function baseCreate(_host, checkerOptions, globalComponentName, ts) {
|
|
|
104
104
|
if (fileName.endsWith('.vue.jsx')) {
|
|
105
105
|
return ts.ScriptKind.TSX;
|
|
106
106
|
}
|
|
107
|
-
return core.
|
|
107
|
+
return core.typescript.languageServiceHost.getScriptKind(fileName);
|
|
108
108
|
},
|
|
109
109
|
} : {};
|
|
110
|
-
const proxyHost = new Proxy(core.
|
|
110
|
+
const proxyHost = new Proxy(core.typescript.languageServiceHost, {
|
|
111
111
|
get(target, propKey) {
|
|
112
112
|
if (propKey in proxyApis) {
|
|
113
113
|
return proxyApis[propKey];
|
|
@@ -181,9 +181,9 @@ function baseCreate(_host, checkerOptions, globalComponentName, ts) {
|
|
|
181
181
|
// fill defaults
|
|
182
182
|
const printer = ts.createPrinter(checkerOptions.printer);
|
|
183
183
|
const snapshot = host.getScriptSnapshot(componentPath);
|
|
184
|
-
const vueSourceFile = (_a = core.
|
|
184
|
+
const vueSourceFile = (_a = core.virtualFiles.get(componentPath)) === null || _a === void 0 ? void 0 : _a[1];
|
|
185
185
|
const vueDefaults = vueSourceFile && exportName === 'default'
|
|
186
|
-
? (vueSourceFile instanceof vue.
|
|
186
|
+
? (vueSourceFile instanceof vue.VueFile ? readVueComponentDefaultProps(vueSourceFile, printer, ts) : {})
|
|
187
187
|
: {};
|
|
188
188
|
const tsDefaults = !vueSourceFile ? readTsComponentDefaultProps(componentPath.substring(componentPath.lastIndexOf('.') + 1), // ts | js | tsx | jsx
|
|
189
189
|
snapshot.getText(0, snapshot.getLength()), exportName, printer, ts) : {};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-component-meta",
|
|
3
|
-
"version": "1.0.
|
|
3
|
+
"version": "1.0.18",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -13,12 +13,12 @@
|
|
|
13
13
|
"directory": "vue-language-tools/vue-component-meta"
|
|
14
14
|
},
|
|
15
15
|
"dependencies": {
|
|
16
|
-
"@volar/language-core": "1.0.
|
|
17
|
-
"@volar/vue-language-core": "1.0.
|
|
16
|
+
"@volar/language-core": "1.0.18",
|
|
17
|
+
"@volar/vue-language-core": "1.0.18",
|
|
18
18
|
"typesafe-path": "^0.2.2"
|
|
19
19
|
},
|
|
20
20
|
"peerDependencies": {
|
|
21
21
|
"typescript": "*"
|
|
22
22
|
},
|
|
23
|
-
"gitHead": "
|
|
23
|
+
"gitHead": "f102ee7bfc96792c63746a5dcb9742e3346d5cc7"
|
|
24
24
|
}
|