vue-tsc 2.0.26 → 2.0.29
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/index.js +3 -13
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -13,24 +13,14 @@ function run() {
|
|
|
13
13
|
const vueOptions = typeof configFilePath === 'string'
|
|
14
14
|
? vue.createParsedCommandLine(ts, ts.sys, configFilePath.replace(windowsPathReg, '/')).vueOptions
|
|
15
15
|
: vue.resolveVueCompilerOptions({});
|
|
16
|
-
const allExtensions =
|
|
17
|
-
...vueOptions.extensions,
|
|
18
|
-
...vueOptions.vitePressExtensions,
|
|
19
|
-
...vueOptions.petiteVueExtensions,
|
|
20
|
-
];
|
|
16
|
+
const allExtensions = vue.getAllExtensions(vueOptions);
|
|
21
17
|
if (runExtensions.length === allExtensions.length
|
|
22
18
|
&& runExtensions.every(ext => allExtensions.includes(ext))) {
|
|
23
19
|
const writeFile = options.host.writeFile.bind(options.host);
|
|
24
20
|
options.host.writeFile = (fileName, contents, ...args) => {
|
|
25
21
|
return writeFile(fileName, removeEmitGlobalTypes(contents), ...args);
|
|
26
22
|
};
|
|
27
|
-
const vueLanguagePlugin = vue.
|
|
28
|
-
const fileMap = new vue.FileMap(options.host?.useCaseSensitiveFileNames?.() ?? false);
|
|
29
|
-
for (const vueFileName of options.rootNames.map(rootName => rootName.replace(windowsPathReg, '/'))) {
|
|
30
|
-
fileMap.set(vueFileName, undefined);
|
|
31
|
-
}
|
|
32
|
-
return fileMap.has(fileName);
|
|
33
|
-
}, options.options, vueOptions);
|
|
23
|
+
const vueLanguagePlugin = vue.createVueLanguagePlugin2(ts, id => id, vue.createRootFileChecker(undefined, () => options.rootNames.map(rootName => rootName.replace(windowsPathReg, '/')), options.host?.useCaseSensitiveFileNames?.() ?? false), options.options, vueOptions);
|
|
34
24
|
return { languagePlugins: [vueLanguagePlugin] };
|
|
35
25
|
}
|
|
36
26
|
else {
|
|
@@ -46,7 +36,7 @@ function run() {
|
|
|
46
36
|
main();
|
|
47
37
|
}
|
|
48
38
|
else {
|
|
49
|
-
|
|
39
|
+
throw err;
|
|
50
40
|
}
|
|
51
41
|
}
|
|
52
42
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.29",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"files": [
|
|
6
6
|
"bin",
|
|
@@ -16,8 +16,8 @@
|
|
|
16
16
|
"vue-tsc": "./bin/vue-tsc.js"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@volar/typescript": "~2.4.0-alpha.
|
|
20
|
-
"@vue/language-core": "2.0.
|
|
19
|
+
"@volar/typescript": "~2.4.0-alpha.18",
|
|
20
|
+
"@vue/language-core": "2.0.29",
|
|
21
21
|
"semver": "^7.5.4"
|
|
22
22
|
},
|
|
23
23
|
"peerDependencies": {
|
|
@@ -26,5 +26,5 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/node": "latest"
|
|
28
28
|
},
|
|
29
|
-
"gitHead": "
|
|
29
|
+
"gitHead": "49ad9563e6f2677595878a000179dfea83fb910c"
|
|
30
30
|
}
|