vue-tsc 1.8.3 → 1.8.5
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 +4 -2
- package/package.json +4 -4
package/out/index.js
CHANGED
|
@@ -5,6 +5,7 @@ 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 windowsPathReg = /\\/g;
|
|
8
9
|
function createProgram(options) {
|
|
9
10
|
if (!options.options.noEmit && !options.options.emitDeclarationOnly)
|
|
10
11
|
throw toThrow('js emit is not supported');
|
|
@@ -36,16 +37,17 @@ function createProgram(options) {
|
|
|
36
37
|
const vueCompilerOptions = getVueCompilerOptions();
|
|
37
38
|
const scripts = new Map();
|
|
38
39
|
const languageHost = {
|
|
40
|
+
workspacePath: ctx.options.host.getCurrentDirectory().replace(windowsPathReg, '/'),
|
|
41
|
+
rootPath: ctx.options.host.getCurrentDirectory().replace(windowsPathReg, '/'),
|
|
39
42
|
getCompilationSettings: () => ctx.options.options,
|
|
40
43
|
getScriptFileNames: () => {
|
|
41
44
|
return ctx.options.rootNames;
|
|
42
45
|
},
|
|
43
46
|
getScriptSnapshot,
|
|
44
47
|
getProjectVersion: () => {
|
|
45
|
-
return ctx.projectVersion;
|
|
48
|
+
return ctx.projectVersion.toString();
|
|
46
49
|
},
|
|
47
50
|
getProjectReferences: () => ctx.options.projectReferences,
|
|
48
|
-
getCurrentDirectory: () => ctx.options.host.getCurrentDirectory().replace(/\\/g, '/'),
|
|
49
51
|
getCancellationToken: ctx.options.host.getCancellationToken ? () => ctx.options.host.getCancellationToken() : undefined,
|
|
50
52
|
};
|
|
51
53
|
const vueTsLs = vueTs.createLanguageService(languageHost, vueCompilerOptions, ts, ts.sys);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vue-tsc",
|
|
3
|
-
"version": "1.8.
|
|
3
|
+
"version": "1.8.5",
|
|
4
4
|
"main": "out/index.js",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"files": [
|
|
@@ -17,12 +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.
|
|
20
|
+
"@vue/language-core": "1.8.5",
|
|
21
|
+
"@vue/typescript": "1.8.5",
|
|
22
22
|
"semver": "^7.3.8"
|
|
23
23
|
},
|
|
24
24
|
"peerDependencies": {
|
|
25
25
|
"typescript": "*"
|
|
26
26
|
},
|
|
27
|
-
"gitHead": "
|
|
27
|
+
"gitHead": "971820b55ea42cb7e8c8ba7c35c8998d5572b420"
|
|
28
28
|
}
|