vue-tsc 2.0.13 → 2.0.14
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 -9
- package/package.json +4 -4
package/index.js
CHANGED
|
@@ -3,7 +3,6 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.removeEmitGlobalTypes = exports.run = void 0;
|
|
4
4
|
const runTsc_1 = require("@volar/typescript/lib/quickstart/runTsc");
|
|
5
5
|
const vue = require("@vue/language-core");
|
|
6
|
-
const path = require("path");
|
|
7
6
|
const windowsPathReg = /\\/g;
|
|
8
7
|
function run() {
|
|
9
8
|
let runExtensions = ['.vue'];
|
|
@@ -17,14 +16,9 @@ function run() {
|
|
|
17
16
|
&& runExtensions.every(ext => vueOptions.extensions.includes(ext))) {
|
|
18
17
|
const writeFile = options.host.writeFile.bind(options.host);
|
|
19
18
|
options.host.writeFile = (fileName, contents, ...args) => {
|
|
20
|
-
|
|
21
|
-
return writeFile(fileName, contents, ...args);
|
|
22
|
-
}
|
|
23
|
-
const writeFileName = path.basename(vueLanguagePlugin.getCanonicalFileName(fileName));
|
|
24
|
-
const globalTypesFileName = path.basename(vueLanguagePlugin.getCanonicalFileName(vueLanguagePlugin.pluginContext.globalTypesHolder));
|
|
25
|
-
return writeFile(fileName, writeFileName.startsWith(globalTypesFileName) ? removeEmitGlobalTypes(contents) : contents, ...args);
|
|
19
|
+
return writeFile(fileName, removeEmitGlobalTypes(contents), ...args);
|
|
26
20
|
};
|
|
27
|
-
const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, id => id, options.host?.useCaseSensitiveFileNames?.() ?? false, () => '', () => options.rootNames.map(rootName => rootName.replace(windowsPathReg, '/')), options.options, vueOptions
|
|
21
|
+
const vueLanguagePlugin = vue.createVueLanguagePlugin(ts, id => id, options.host?.useCaseSensitiveFileNames?.() ?? false, () => '', () => options.rootNames.map(rootName => rootName.replace(windowsPathReg, '/')), options.options, vueOptions);
|
|
28
22
|
return [vueLanguagePlugin];
|
|
29
23
|
}
|
|
30
24
|
else {
|
|
@@ -47,7 +41,7 @@ function run() {
|
|
|
47
41
|
}
|
|
48
42
|
}
|
|
49
43
|
exports.run = run;
|
|
50
|
-
const removeEmitGlobalTypesRegexp =
|
|
44
|
+
const removeEmitGlobalTypesRegexp = /^[^\n]*__VLS_globalTypesStart[\w\W]*__VLS_globalTypesEnd[^\n]*\n?$/mg;
|
|
51
45
|
function removeEmitGlobalTypes(dts) {
|
|
52
46
|
return dts.replace(removeEmitGlobalTypesRegexp, '');
|
|
53
47
|
}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "2.0.
|
|
3
|
+
"version": "2.0.14",
|
|
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.2.0-alpha.
|
|
20
|
-
"@vue/language-core": "2.0.
|
|
19
|
+
"@volar/typescript": "2.2.0-alpha.10",
|
|
20
|
+
"@vue/language-core": "2.0.14",
|
|
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": "ce1412067f88b7f9af03a2d3e04c220b4921c363"
|
|
30
30
|
}
|