vue-tsc 1.8.0 → 1.8.1
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 +2 -61
- package/package.json +5 -6
package/out/index.js
CHANGED
|
@@ -5,8 +5,6 @@ const ts = require("typescript");
|
|
|
5
5
|
const vue = require("@vue/language-core");
|
|
6
6
|
const vueTs = require("@vue/typescript");
|
|
7
7
|
const shared_1 = require("./shared");
|
|
8
|
-
const vscode_uri_1 = require("vscode-uri");
|
|
9
|
-
const fs = require("fs");
|
|
10
8
|
function createProgram(options) {
|
|
11
9
|
if (!options.options.noEmit && !options.options.emitDeclarationOnly)
|
|
12
10
|
throw toThrow('js emit is not supported');
|
|
@@ -50,65 +48,8 @@ function createProgram(options) {
|
|
|
50
48
|
getCurrentDirectory: () => ctx.options.host.getCurrentDirectory().replace(/\\/g, '/'),
|
|
51
49
|
getCancellationToken: ctx.options.host.getCancellationToken ? () => ctx.options.host.getCancellationToken() : undefined,
|
|
52
50
|
};
|
|
53
|
-
const
|
|
54
|
-
|
|
55
|
-
const vueTsLs = vueTs.createLanguageService(languageHost, vueCompilerOptions, ts, {
|
|
56
|
-
uriToFileName,
|
|
57
|
-
fileNameToUri,
|
|
58
|
-
rootUri: vscode_uri_1.URI.parse(fileNameToUri(languageHost.getCurrentDirectory())),
|
|
59
|
-
fs: {
|
|
60
|
-
stat(uri) {
|
|
61
|
-
if (uri.startsWith('file://')) {
|
|
62
|
-
try {
|
|
63
|
-
const stats = fs.statSync(uriToFileName(uri), { throwIfNoEntry: false });
|
|
64
|
-
if (stats) {
|
|
65
|
-
return {
|
|
66
|
-
type: stats.isFile() ? 1
|
|
67
|
-
: stats.isDirectory() ? 2
|
|
68
|
-
: stats.isSymbolicLink() ? 64
|
|
69
|
-
: 0,
|
|
70
|
-
ctime: stats.ctimeMs,
|
|
71
|
-
mtime: stats.mtimeMs,
|
|
72
|
-
size: stats.size,
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
catch {
|
|
77
|
-
return undefined;
|
|
78
|
-
}
|
|
79
|
-
}
|
|
80
|
-
},
|
|
81
|
-
readFile(uri, encoding) {
|
|
82
|
-
if (uri.startsWith('file://')) {
|
|
83
|
-
try {
|
|
84
|
-
return fs.readFileSync(uriToFileName(uri), { encoding: encoding ?? 'utf-8' });
|
|
85
|
-
}
|
|
86
|
-
catch {
|
|
87
|
-
return undefined;
|
|
88
|
-
}
|
|
89
|
-
}
|
|
90
|
-
},
|
|
91
|
-
readDirectory(uri) {
|
|
92
|
-
if (uri.startsWith('file://')) {
|
|
93
|
-
try {
|
|
94
|
-
const dirName = uriToFileName(uri);
|
|
95
|
-
const files = fs.readdirSync(dirName, { withFileTypes: true });
|
|
96
|
-
return files.map(file => {
|
|
97
|
-
return [file.name, file.isFile() ? 1
|
|
98
|
-
: file.isDirectory() ? 2
|
|
99
|
-
: file.isSymbolicLink() ? 64
|
|
100
|
-
: 0];
|
|
101
|
-
});
|
|
102
|
-
}
|
|
103
|
-
catch {
|
|
104
|
-
return [];
|
|
105
|
-
}
|
|
106
|
-
}
|
|
107
|
-
return [];
|
|
108
|
-
},
|
|
109
|
-
},
|
|
110
|
-
});
|
|
111
|
-
program = vueTsLs.getProgram();
|
|
51
|
+
const vueTsLs = vueTs.createLanguageService(languageHost, vueCompilerOptions, ts, ts.sys);
|
|
52
|
+
program = vueTs.getProgram(ts, vueTsLs.__internal__.context, vueTsLs, ts.sys);
|
|
112
53
|
program.__vue = ctx;
|
|
113
54
|
function getVueCompilerOptions() {
|
|
114
55
|
const tsConfig = ctx.options.options.configFilePath;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.1",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -17,13 +17,12 @@
|
|
|
17
17
|
"vue-tsc": "./bin/vue-tsc.js"
|
|
18
18
|
},
|
|
19
19
|
"dependencies": {
|
|
20
|
-
"@vue/language-core": "1.8.
|
|
21
|
-
"@vue/typescript": "1.8.
|
|
22
|
-
"semver": "^7.3.8"
|
|
23
|
-
"vscode-uri": "^3.0.7"
|
|
20
|
+
"@vue/language-core": "1.8.1",
|
|
21
|
+
"@vue/typescript": "1.8.1",
|
|
22
|
+
"semver": "^7.3.8"
|
|
24
23
|
},
|
|
25
24
|
"peerDependencies": {
|
|
26
25
|
"typescript": "*"
|
|
27
26
|
},
|
|
28
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "3e31c6eb412a9e8145188190472f59c8b43aa9e6"
|
|
29
28
|
}
|